/* AC Avis Clients — charte « Tableau électrique » (au-courant.fr) */

.acav {
	--acav-accent: #F28C1E;
	--acav-accent-ink: #0F1A2B;
	--acav-label: #B45309;
	--acav-navy: #0F1A2B;
	--acav-navy-2: #18263C;
	--acav-navy-line: #3A4C66;
	--acav-ink: #1C2533;
	--acav-title: #0F1A2B;
	--acav-muted: #4A5566;
	--acav-grey: #586273;
	--acav-line: #DDE3EA;
	--acav-soft: #F4F6F8;
	--acav-card: #FFFFFF;
	--acav-head: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
	--acav-body: inherit;
	box-sizing: border-box;
	font-family: var(--acav-body);
	color: var(--acav-ink);
	line-height: 1.55;
}
.acav *, .acav *::before, .acav *::after { box-sizing: inherit; }

.acav--barlow {
	--acav-head: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
	--acav-body: Barlow, Arial, sans-serif;
}
.acav--sombre {
	--acav-ink: #FFFFFF;
	--acav-title: #FFFFFF;
	--acav-muted: #C9D2DF;
	--acav-line: #3A4C66;
	--acav-soft: #0F1A2B;
	--acav-card: #18263C;
}

.acav-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ---------- Titres ---------- */
.acav-head { margin: 0 0 20px; }
.acav .acav-eyebrow {
	margin: 0 0 8px;
	font-family: var(--acav-body);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--acav-label);
}
.acav .acav-title {
	margin: 0;
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--acav-title);
}

/* ---------- Disjoncteurs (note) ---------- */
.acav-breakers { display: inline-flex; gap: 3px; flex: none; }
.acav-breaker {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 20px; height: 28px;
	padding-top: 4px;
	background: var(--acav-navy-2);
	border: 1px solid var(--acav-navy-line);
}
.acav-breaker > span {
	display: block;
	width: 8px; height: 12px;
	background: var(--acav-grey);
	transform: translateY(8px);
	transition: transform .25s ease, background-color .25s ease;
}
.acav-breaker.is-on > span { background: var(--acav-accent); transform: none; }

.acav-breakers--lg .acav-breaker,
.acav-breaker--lg { width: 30px; height: 42px; padding-top: 6px; }
.acav-breakers--lg .acav-breaker > span,
.acav-breaker--lg > span { width: 12px; height: 18px; transform: translateY(12px); }
.acav-breakers--lg .acav-breaker.is-on > span,
.acav-breaker--lg.is-on > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
	.acav-breaker > span { transition: none; }
}

/* ---------- En-tête de note ---------- */
.acav-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
	margin: 0 0 16px;
	padding: 14px 20px;
	background: var(--acav-navy);
	border: 1px solid var(--acav-navy-line);
	color: #FFFFFF;
}
.acav .acav-summary__score {
	margin: 0;
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: 46px;
	line-height: 1;
	color: #FFFFFF;
}
.acav-summary__score small { font-size: 20px; color: #C9D2DF; }
.acav-summary__info { display: flex; flex-direction: column; gap: 6px; }
.acav-summary .acav-breakers--lg .acav-breaker { width: 24px; height: 34px; padding-top: 5px; }
.acav-summary .acav-breakers--lg .acav-breaker > span { width: 10px; height: 14px; transform: translateY(10px); }
.acav-summary .acav-breakers--lg .acav-breaker.is-on > span { transform: none; }
.acav-summary__count { font-size: 16px; color: #D6DDE7; }
.acav-summary__actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.acav-summary .acav-btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.acav-badge {
	display: inline-flex; align-items: center;
	min-height: 48px; padding: 10px 18px;
	border: 1px solid var(--acav-navy-line);
	font-weight: 700; color: #FFFFFF;
}
@media (max-width: 640px) {
	.acav-summary { padding: 14px 16px; }
	.acav .acav-summary__score { font-size: 40px; }
	.acav-summary__actions { margin-left: 0; width: 100%; }
	.acav-summary__actions .acav-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Boutons ---------- */
.acav .acav-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 22px;
	border: 2px solid transparent;
	border-radius: 0;
	font-family: var(--acav-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease;
}
.acav .acav-btn:focus-visible { outline: 3px solid var(--acav-accent); outline-offset: 2px; }
.acav .acav-btn--accent,
.acav .acav-btn--accent:hover,
.acav .acav-btn--accent:focus { background: var(--acav-accent); color: var(--acav-accent-ink); text-decoration: none; }
.acav .acav-btn--accent:hover { filter: brightness(1.08); }
.acav .acav-btn--ghost,
.acav .acav-btn--ghost:hover,
.acav .acav-btn--ghost:focus { background: transparent; border-color: #FFFFFF; color: #FFFFFF; text-decoration: none; }
.acav .acav-btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.acav .acav-btn--ghost:focus-visible { outline-color: #FFFFFF; }

/* ---------- Cartes ---------- */
.acav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 16px;
}
.acav-layout--liste .acav-grid { grid-template-columns: 1fr; }

.acav .acav-card {
	margin: 0;
	display: flex;
	flex-direction: column;
	background: var(--acav-card);
	border: 1px solid var(--acav-line);
}
.acav .acav-card.is-featured { border-color: var(--acav-accent); box-shadow: inset 0 0 0 1px var(--acav-accent); }

.acav-card__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: var(--acav-navy);
	color: #FFFFFF;
}
.acav-card__score {
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: .5px;
}
.acav-card__src {
	margin-left: auto;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #C9D2DF;
}
.acav-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 18px 18px;
}

/* Remise à zéro des styles de citation du thème */
.acav .acav-card__text {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	quotes: none;
	font-family: var(--acav-body);
	font-style: normal;
	font-size: 16px;
	line-height: 1.6;
	color: var(--acav-ink);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	overflow: hidden;
}
.acav .acav-card__text::before,
.acav .acav-card__text::after { content: none; display: none; }
.acav .acav-card__text p {
	margin: 0 0 .7em;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-style: normal;
	font-weight: 400;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
}
.acav .acav-card__text p:last-child { margin-bottom: 0; }

.acav-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 15px; }

.acav .acav-more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-family: var(--acav-body);
	font-weight: 700;
	font-size: 15px;
	color: var(--acav-label);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.acav .acav-more[hidden] { display: none; }
.acav .acav-more:hover { text-decoration-thickness: 2px; }
.acav .acav-more:focus-visible { outline: 3px solid var(--acav-accent); outline-offset: 2px; }
.acav-card__meta strong { font-size: 16px; color: var(--acav-title); }
.acav-card__meta span { color: var(--acav-muted); }

.acav-chip {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border: 1px solid var(--acav-line);
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--acav-muted);
}
.acav-chip::before { content: ""; width: 6px; height: 6px; background: var(--acav-accent); }

.acav-reply {
	padding: 14px 16px;
	background: var(--acav-soft);
	font-size: 15px;
	color: var(--acav-muted);
}
.acav-reply strong {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--acav-title);
}
.acav-reply p { margin: 0; }

.acav-empty { margin: 0; color: var(--acav-muted); }

/* ---------- Carrousel ---------- */
.acav-carousel { position: relative; }
.acav-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(100%, 360px);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.acav-track::-webkit-scrollbar { display: none; }
.acav-track:focus-visible { outline: 3px solid var(--acav-accent); outline-offset: 4px; }
.acav-track > .acav-card { scroll-snap-align: start; }
.acav-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.acav-nav button {
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0;
	background: var(--acav-navy);
	border: 1px solid var(--acav-navy-line);
	border-radius: 0;
	color: #FFFFFF;
	cursor: pointer;
}
.acav-nav button:hover:not(:disabled) { background: var(--acav-accent); color: var(--acav-accent-ink); }
.acav-nav button:focus-visible { outline: 3px solid var(--acav-accent); outline-offset: 2px; }
.acav-nav button:disabled { opacity: .35; cursor: default; }
.acav-carousel--static .acav-nav { display: none; }

/* ---------- Formulaire ---------- */
.acav-form {
	display: grid;
	gap: 22px;
	padding: clamp(20px, 4vw, 36px);
	background: var(--acav-card);
	border: 1px solid var(--acav-line);
}
.acav-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 22px;
}
.acav-field { display: flex; flex-direction: column; gap: 6px; }
.acav .acav-field label,
.acav .acav-legend { font-family: var(--acav-body); font-weight: 700; font-size: 15px; color: var(--acav-title); }
.acav-req { color: var(--acav-label); }
.acav .acav-field input,
.acav .acav-field select,
.acav .acav-field textarea {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #8C98A8;
	border-radius: 0;
	background: #FFFFFF;
	box-shadow: none;
	color: #1C2533;
	font: inherit;
	font-size: 16px;
}
.acav .acav-field textarea { min-height: 150px; resize: vertical; }
.acav .acav-field input:focus,
.acav .acav-field select:focus,
.acav .acav-field textarea:focus { outline: 3px solid var(--acav-accent); outline-offset: 0; border-color: var(--acav-navy); }
.acav-hint { font-size: 14px; color: var(--acav-muted); }

.acav-rate-set { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.acav-rate-set legend { padding: 0; margin-bottom: 10px; }
.acav-rate {
	display: inline-flex;
	align-self: flex-start;
	gap: 6px;
	padding: 12px 14px 10px;
	background: var(--acav-navy);
	border: 1px solid var(--acav-navy-line);
}
.acav .acav-rate__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 44px;
	cursor: pointer;
}
.acav-rate__item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.acav-rate__item:hover .acav-breaker { border-color: var(--acav-accent); }
.acav-rate__item input:focus-visible + .acav-breaker { outline: 3px solid var(--acav-accent); outline-offset: 2px; }
.acav-rate__n { font-family: var(--acav-head); font-weight: 700; font-size: 14px; color: #C9D2DF; }
.acav-rate-label { min-height: 1.5em; font-weight: 700; color: var(--acav-title); }

.acav .acav-consent { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--acav-ink); cursor: pointer; }
.acav-consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--acav-accent); }

.acav-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.acav-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.acav-notice { margin: 0 0 20px; padding: 14px 18px; border: 1px solid; font-weight: 600; }
.acav-notice--ok { background: #E8F5EA; border-color: #2E7D32; color: #1B4D20; }
.acav-notice--err { background: #FDECEA; border-color: #B3261E; color: #7A1A14; }

/* ---------- Pop-up « écran connecté » ---------- */
.acav-modal {
	width: min(560px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #FFFFFF;
	overflow: visible;
}
.acav-modal::backdrop {
	background: rgba(5, 9, 16, .74);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.acav-modal[open] .acav-screen { animation: acav-screen-on .28s ease-out; }
@keyframes acav-screen-on {
	from { opacity: 0; transform: scale(.96); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.acav-modal[open] .acav-screen { animation: none; }
}

/* Cadre de l'écran */
.acav-screen {
	position: relative;
	padding: 12px 12px 22px;
	border-radius: 26px;
	background: linear-gradient(160deg, #2a313c 0%, #161b22 45%, #0f1318 100%);
	box-shadow:
		0 0 0 1px #59626f,
		0 0 0 2px #0b0e12,
		inset 0 1px 0 rgba(255, 255, 255, .12),
		0 28px 70px rgba(0, 0, 0, .6);
}
/* LED de veille */
.acav-screen::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 8px;
	width: 6px;
	height: 6px;
	margin-left: -3px;
	border-radius: 50%;
	background: var(--acav-accent);
	box-shadow: 0 0 8px 2px var(--acav-accent);
}

/* Dalle vitrée */
.acav-screen__glass {
	position: relative;
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	overflow-y: auto;
	padding: 14px 16px 20px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .07);
	background: radial-gradient(130% 100% at 0% 0%, #1f2d44 0%, #101a2b 50%, #0a111d 100%);
	scrollbar-width: thin;
	scrollbar-color: #3a4c66 transparent;
}
.acav-screen__glass::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(120deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 34%);
	pointer-events: none;
}

.acav-screen__top {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.acav-screen__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--acav-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #9FB0C6;
}
.acav-screen__brand svg { color: var(--acav-accent); }
.acav .acav-screen__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(255, 255, 255, .07);
	color: #FFFFFF;
	cursor: pointer;
}
.acav .acav-screen__close:hover { background: rgba(255, 255, 255, .14); }
.acav .acav-screen__close:focus-visible { outline: 3px solid var(--acav-accent); outline-offset: 2px; }

.acav-screen__body { position: relative; display: flex; flex-direction: column; gap: 14px; }

/* Tuiles, comme les boutons d'un écran domotique */
.acav-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.acav-tile {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 8px 14px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, .12);
	background: rgba(255, 255, 255, .06);
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: 20px;
	letter-spacing: .5px;
	color: #FFFFFF;
}
.acav-tile .acav-breaker { border-radius: 3px; }
.acav-tile--src { font-family: var(--acav-body); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #C9D2DF; }

.acav .acav-modal__name {
	margin: 4px 0 0;
	font-family: var(--acav-head);
	font-weight: 700;
	font-size: 26px;
	line-height: 1.1;
	text-transform: uppercase;
	color: #FFFFFF;
}
.acav-modal__meta { margin-top: -8px; font-size: 14px; color: #9FB0C6; }
.acav .acav-modal__text { font-size: 17px; line-height: 1.65; color: #E6ECF4; }
.acav .acav-modal__text p { margin: 0 0 .8em; font-style: normal; font-weight: 400; }
.acav .acav-modal__text p:last-child { margin-bottom: 0; }
.acav-modal .acav-chip { border-color: rgba(255, 255, 255, .16); border-radius: 999px; color: #C9D2DF; }
.acav-modal .acav-reply { border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: #C9D2DF; }
.acav-modal .acav-reply strong { color: #FFFFFF; }

html.acav-noscroll, html.acav-noscroll body { overflow: hidden; }

/* ---------- Arrivée depuis un lien #avis ---------- */
/* Les disjoncteurs de la note s'enclenchent un à un, puis le bloc s'illumine */
.acav-arrive .acav-summary .acav-breaker.is-on > span { animation: acav-switch .45s cubic-bezier(.3, 1.4, .6, 1) both; }
.acav-arrive .acav-summary .acav-breaker:nth-child(2) > span { animation-delay: .12s; }
.acav-arrive .acav-summary .acav-breaker:nth-child(3) > span { animation-delay: .24s; }
.acav-arrive .acav-summary .acav-breaker:nth-child(4) > span { animation-delay: .36s; }
.acav-arrive .acav-summary .acav-breaker:nth-child(5) > span { animation-delay: .48s; }
@keyframes acav-switch {
	0% { transform: translateY(10px); background: var(--acav-grey); }
	100% { transform: none; }
}
.acav-arrive .acav-summary { animation: acav-glow 1.6s ease .55s both; }
@keyframes acav-glow {
	0% { box-shadow: 0 0 0 0 rgba(242, 140, 30, 0); }
	25% { box-shadow: 0 0 0 2px var(--acav-accent), 0 0 30px rgba(242, 140, 30, .45); }
	100% { box-shadow: 0 0 0 0 rgba(242, 140, 30, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.acav-arrive .acav-summary,
	.acav-arrive .acav-summary .acav-breaker.is-on > span { animation: none; }
}
