/* =====================================================================
   Agentique Québec — FAQ (FR /faq et EN /en/faq) : « nomenclature de panneau »
   Chaque question est un circuit : un module-disjoncteur en verre marine, numéroté (impairs à gauche, pairs à
   droite), branché sur les barres omnibus dessinées entre les deux colonnes. Ouvrir une réponse ferme le
   disjoncteur : la manette passe du côté des barres, le module s'allume en cyan et l'impulsion court sur la
   languette. La question 8 (niveaux d'une automatisation) est un disjoncteur bipolaire qui chevauche les barres.
   La dérivation P-1 du schéma latéral alimente le disjoncteur principal (DP) en tête du panneau.
   Chargée après /assets/premium/aq-premium.css. Comportements : script d'origine de la page (accordéons, ancre).
   ===================================================================== */

/* ---------- Héro : l'électricien au panneau reste visible à droite ---------- */
.faq-entete .aq-entete-cadre { min-height: clamp(420px, 58svh, 600px); }
.faq-entete .aq-entete-photo img { object-position: 64% 46%; }
.faq-entete .aq-entete-panneau { max-width: min(660px, 100%); }
.faq-entete .aq-entete-texte { max-width: 52ch; }

/* ---------- En-tête de la section ---------- */
.faq-tete { margin-bottom: clamp(18px, 2.4vw, 30px); }

/* ---------- Le panneau ---------- */
.faq-panneau {
  --bus: 76px;                         /* canal des barres omnibus entre les deux colonnes */
  --bus-encre: rgba(10, 22, 40, .5);
  --languette: rgba(10, 22, 40, .42);
  --cyan-vif: #00d4ff;
  position: relative;
  padding: 0 0 6px;
}
/* Enveloppe dessinée sur le papier : trait fin et repères d'angle, comme l'élévation d'un panneau */
.faq-panneau::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: -2px -14px -18px -14px;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1.2px rgba(10, 22, 40, .2);
  background:
    radial-gradient(circle at 22px 22px, rgba(10, 22, 40, .28) 0 3.5px, transparent 4.2px),
    radial-gradient(circle at calc(100% - 22px) 22px, rgba(10, 22, 40, .28) 0 3.5px, transparent 4.2px),
    radial-gradient(circle at 22px calc(100% - 22px), rgba(10, 22, 40, .28) 0 3.5px, transparent 4.2px),
    radial-gradient(circle at calc(100% - 22px) calc(100% - 22px), rgba(10, 22, 40, .28) 0 3.5px, transparent 4.2px);
}

/* Disjoncteur principal (DP), alimenté par la dérivation P-1 */
.faq-principal { position: relative; z-index: 2; width: 136px; height: 66px; margin: 18px auto 0; }
.faq-dp { display: block; overflow: visible; }
.faq-dp .dp-corps { fill: rgba(255, 255, 255, .88); stroke: var(--bus-encre); stroke-width: 1.3; }
.faq-dp .dp-fente { fill: rgba(10, 22, 40, .14); }
.faq-dp .dp-levier rect { fill: #2b3c52; }
.faq-dp .dp-levier { transform: translateX(-7px); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.faq-dp .dp-code { font: 650 8.5px/1 var(--font-text); letter-spacing: .1em; fill: rgba(10, 22, 40, .66); }
.faq.est-alimentee .faq-dp .dp-levier { transform: translateX(7px); }
.faq.est-alimentee .faq-dp .dp-levier rect { fill: var(--cyan-500); }
.faq.est-alimentee .faq-dp .dp-corps { stroke: var(--cyan-500); }

/* Les circuits : deux colonnes et le canal des barres omnibus */
.faq-circuits {
  counter-reset: circuit;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--bus); row-gap: 10px; align-items: start;
  margin-top: 18px;
}
.faq-bus {
  position: absolute; z-index: 0; left: calc(50% - 6px); top: -18px; bottom: 6px; width: 12px;
  transform-origin: 50% 0;
  background: linear-gradient(90deg, var(--bus-encre) 0 2.4px, transparent 2.4px 9.6px, var(--bus-encre) 9.6px 12px);
  pointer-events: none;
}
.faq.est-alimentee .faq-bus {
  background: linear-gradient(90deg, var(--cyan-500) 0 2.4px, transparent 2.4px 9.6px, var(--cyan-500) 9.6px 12px);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, .45));
}
.faq-item--g { grid-column: 1; }
.faq-item--d { grid-column: 2; }
.faq-item--2p { grid-column: 1 / -1; }
.faq-reserve { grid-column: 2; }

/* ---------- Un module-disjoncteur ---------- */
.faq-item.calque {
  counter-increment: circuit;
  position: relative; z-index: 1;
  border-radius: 20px;
  background: var(--panneau-fond-plein);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 34px -26px rgba(10, 22, 40, .75);
  transition: box-shadow .35s var(--ease-std), background-color .35s var(--ease-std);
}
/* Arrivée par une ancre : le scroll-padding-top de la page (barre + 24 px) suffit. */
/* La section mise sous tension n'allume que les circuits fermés (pas tout le panneau) */
.faq.est-alimentee .faq-item.calque { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 34px -26px rgba(10, 22, 40, .75); }
.faq .faq-item.calque.active,
.faq.est-alimentee .faq-item.calque.active {
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, .55), 0 0 0 1px rgba(0, 212, 255, .16), 0 0 34px -12px rgba(0, 212, 255, .55), 0 22px 40px -26px rgba(10, 22, 40, .8);
}
/* Languette : du module jusqu'à la barre omnibus la plus proche */
.faq-item::after {
  content: ""; position: absolute; top: 33px; height: 2px; width: calc(var(--bus) / 2 - 7px);
  background: var(--languette); pointer-events: none;
}
.faq-item--g::after { left: 100%; }
.faq-item--d::after { right: 100%; }
.faq-item--2p::after { display: none; }
.faq-item.active::after {
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-vif), var(--cyan-500)) 0 0 / 300% 100%;
  box-shadow: 0 0 10px rgba(0, 212, 255, .7);
  animation: faq-impulsion .7s var(--ease-sortie) both;
}
.faq-item--g.active::after { animation-name: faq-impulsion-g; }
@keyframes faq-impulsion { from { background-position: 0 0; opacity: .3; } to { background-position: 100% 0; opacity: 1; } }
@keyframes faq-impulsion-g { from { background-position: 100% 0; opacity: .3; } to { background-position: 0 0; opacity: 1; } }

/* La question (bouton) : texte vers l'extérieur, numéro et disjoncteur du côté des barres */
.faq-question {
  display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 66px; margin: 0; padding: 12px 16px 12px 22px;
  border: 0; border-radius: 20px; background: none; cursor: pointer;
  color: var(--panneau-titre); font: 650 1.02rem/1.38 var(--font-text); letter-spacing: -.005em; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.faq-question > span:first-child { flex: 1 1 auto; min-width: 0; text-wrap: pretty; }
.faq-item--d .faq-question { flex-direction: row-reverse; padding: 12px 22px 12px 16px; }
.faq-question:hover { background: rgba(255, 255, 255, .035); }
.faq-question:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: -3px; }

/* Le disjoncteur : numéro de circuit (compteur CSS, décoratif) + module à manette ; « + » d'origine masqué */
.faq-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 10px;
  font-size: 0; line-height: 0; color: transparent;
}
.faq-toggle::before {
  content: counter(circuit, decimal-leading-zero);
  min-width: 2.1em;
  font: 700 .74rem/1 var(--font-text); letter-spacing: .08em; font-variant-numeric: tabular-nums; text-align: center;
  color: rgba(216, 228, 239, .62);
  transition: color .3s var(--ease-std);
}
.faq-item--d .faq-toggle { flex-direction: row-reverse; }
.faq-item.active .faq-toggle::before { color: var(--panneau-accent); }
.disj { display: block; overflow: visible; }
.disj-corps { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .34); stroke-width: 1; transition: stroke .3s var(--ease-std), fill .3s var(--ease-std); }
.disj-fente { fill: rgba(2, 10, 22, .6); }
.disj-levier rect { fill: #dfe8f0; transition: fill .25s var(--ease-std); }
.disj-levier rect.disj-barre { fill: #b9c8d6; }
/* Manette : vers l'extérieur = ouvert ; vers les barres = fermé */
.faq-item { --hors: -6px; --sous: 6px; }
.faq-item--d { --hors: 6px; --sous: -6px; }
.disj-levier { transform: translateX(var(--hors)); transition: transform .38s cubic-bezier(.34, 1.56, .64, 1); }
.faq-item.active .disj-levier { transform: translateX(var(--sous)); }
.faq-item.active .disj-corps { stroke: var(--cyan-vif); fill: rgba(0, 212, 255, .12); }
.faq-item.active .disj-levier rect { fill: var(--cyan-vif); }
.faq-item.active .disj { filter: drop-shadow(0 0 6px rgba(0, 212, 255, .55)); }

/* Disjoncteur bipolaire (niveaux) : centré sur les barres */
.faq-item--2p .faq-question { padding-right: calc(50% + 74px); }
.faq-item--2p .faq-toggle { position: absolute; left: 50%; top: 19px; transform: translateX(-50%); }
.faq-item--2p .faq-toggle::before { order: -1; }

/* Espace de réserve (position libre du panneau) */
.faq-reserve {
  position: relative; align-self: stretch; min-height: 66px;
  border-radius: 20px;
  border: 1.2px dashed rgba(10, 22, 40, .24);
  background: repeating-linear-gradient(135deg, rgba(10, 22, 40, .045) 0 1px, transparent 1px 11px);
}
.faq-reserve span { position: absolute; left: 22px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px rgba(10, 22, 40, .3); }
.faq-reserve::after { content: ""; position: absolute; top: 33px; right: 100%; width: calc(var(--bus) / 2 - 7px); height: 0; border-top: 1.4px dashed rgba(10, 22, 40, .3); }

/* ---------- La réponse ---------- */
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-sortie); }
.faq-item.active .faq-answer { grid-template-rows: 1fr; }
/* Réponse repliée : hauteur nulle (comme à l'origine) ; ses liens sortent de l'ordre de tabulation */
.faq-answer a { transition: visibility 0s; }
.faq-item:not(.active) .faq-answer a { visibility: hidden; transition: visibility 0s linear .45s; }
.faq-answer-inner {
  min-height: 0; overflow: hidden;
  padding: 0 24px 0 22px;
  font-size: .97rem; line-height: 1.7;
}
.faq-item--d .faq-answer-inner { padding: 0 22px 0 24px; }
.faq-answer-inner::before { content: ""; display: block; height: 1px; margin: 0 0 16px; background: linear-gradient(90deg, rgba(0, 212, 255, .5), rgba(255, 255, 255, .08) 70%); }
.faq-answer-inner::after { content: ""; display: block; height: 22px; }
.calque .faq-answer-inner p { color: var(--panneau-texte); }
.faq-answer-inner p + p { margin-top: .8em; }
.faq-answer-inner ul { margin: .5rem 0 .5rem 1.3rem; }
.calque .faq-answer-inner a { color: var(--panneau-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.calque .faq-answer-inner a:hover { color: #fff; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Tableau des niveaux (dans le disjoncteur bipolaire) */
.levels-table { width: 100%; margin: 18px 0 6px; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
.levels-table th, .levels-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid rgba(255, 255, 255, .12); }
.levels-table thead th { padding-top: 4px; padding-bottom: 12px; border-top: 0; vertical-align: bottom; }
.calque .levels-table thead th:first-child { color: var(--panneau-texte-2); font-size: .7rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.lvl-name { display: block; color: #fff; font-size: .92rem; font-weight: 800; }
.lvl-price { display: block; margin-top: 2px; color: var(--panneau-accent); font-size: 1.16rem; font-weight: 850; letter-spacing: -.02em; }
.lvl-price small { display: block; color: var(--panneau-texte-2); font-size: .72rem; font-weight: 650; letter-spacing: 0; }
.levels-table tbody th { width: 22%; font-weight: 750; }
.levels-table td { width: 26%; }
.levels-table tbody tr:nth-child(odd) td, .levels-table tbody tr:nth-child(odd) th { background: rgba(255, 255, 255, .025); }
.calque .faq-answer-inner .levels-note { margin-top: 10px; font-size: .84rem; color: var(--panneau-texte-2); }

/* ---------- Appel final : texte sur verre clair, photo à droite ---------- */
.faq-appel {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: stretch;
  min-height: clamp(380px, 34vw, 500px);
  border-radius: var(--r-xl);
  background: rgba(252, 252, 250, .78);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(10, 22, 40, .07), var(--ombre-3);
  overflow: hidden;
  isolation: isolate;
}
.faq-appel-texte { align-self: center; padding: clamp(32px, 4.6vw, 72px) clamp(26px, 4vw, 64px); }
.faq-appel-texte h2 { margin-bottom: 16px; font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
.faq-appel-texte p { max-width: 54ch; margin-bottom: 28px; font-size: 1.06rem; line-height: 1.65; color: var(--ardoise-700); }
.faq-appel-photo { position: relative; overflow: hidden; margin: 12px; border-radius: 28px; background: #1d2a44; }
.faq-appel-photo img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; object-position: 30% 50%; }

/* ---------- Pied de page court (liens de la barre) ---------- */
.pied-court { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1fr); }
.footer-col.pied-action { align-items: flex-start; justify-content: flex-start; }
.footer-col.pied-action a.btn { min-height: 48px; padding: 0 22px; font-size: .92rem; color: var(--marine-900); text-decoration: none; }
.footer-col.pied-action a.btn:hover { color: var(--marine-900); text-decoration: none; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1180px) {
  .faq-panneau { --bus: 60px; }
  .faq-question { font-size: .98rem; }
}
/* Une seule colonne : les barres omnibus passent à gauche, tous les disjoncteurs s'y branchent */
@media (max-width: 1023px) {
  .faq-panneau { --bus: 34px; }
  .faq-principal { margin: 14px 0 0 calc(var(--bus) / 2 - 22px); width: 112px; height: 54px; }
  .faq-dp { width: 112px; height: 54px; }
  .faq-circuits { grid-template-columns: minmax(0, 1fr); padding-left: var(--bus); column-gap: 0; }
  .faq-bus { left: calc(var(--bus) / 2 - 6px); }
  .faq-item--g, .faq-item--d, .faq-item--2p { grid-column: 1; }
  .faq-reserve { display: none; }
  .faq-item { --hors: 6px; --sous: -6px; }
  .faq-item::after, .faq-item--g::after, .faq-item--d::after { display: block; left: auto; right: 100%; width: calc(var(--bus) / 2 - 1px); }
  .faq-item--g.active::after { animation-name: faq-impulsion; }
  .faq-question, .faq-item--d .faq-question { flex-direction: row-reverse; padding: 12px 18px 12px 14px; gap: 14px; }
  .faq-toggle, .faq-item--d .faq-toggle { flex-direction: row-reverse; }
  .faq-answer-inner, .faq-item--d .faq-answer-inner { padding: 0 20px; }
  .faq-item--2p .faq-question { padding-right: 18px; }
  .faq-item--2p .faq-toggle { position: static; transform: none; }
  .faq-item--2p .faq-toggle::before { order: 0; }
  .faq-appel { grid-template-columns: minmax(0, 1fr); }
  .faq-appel-photo { order: -1; min-height: clamp(220px, 42vw, 340px); margin: 10px 10px 0; }
  .faq-appel-texte { padding: 26px clamp(20px, 4vw, 40px) 30px; }
  .pied-court { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .faq-entete .aq-entete-cadre { min-height: clamp(560px, 84svh, 720px); align-items: flex-start; }
  .faq-entete .aq-entete-photo img { object-position: 64% 50%; }
  .faq-panneau { --bus: 22px; }
  .faq-panneau::before { inset: -2px -8px -14px -8px; border-radius: 24px; }
  .faq-principal { margin-left: calc(var(--bus) / 2 - 14px); width: 88px; height: 43px; }
  .faq-dp { width: 88px; height: 43px; }
  .faq-question, .faq-item--d .faq-question, .faq-item--2p .faq-question { min-height: 58px; padding: 10px 14px 10px 10px; gap: 10px; font-size: .97rem; }
  .faq-item::after, .faq-item--g::after, .faq-item--d::after { top: 29px; }
  .faq-toggle, .faq-item--d .faq-toggle { gap: 5px; }
  .faq-toggle::before { min-width: 1.6em; font-size: .66rem; letter-spacing: .04em; }
  .disj { width: 34px; height: 21px; }
  .disj--2p { width: 72px; height: 21px; }
  .faq-reserve::after { display: none; }
  .faq-answer-inner, .faq-item--d .faq-answer-inner { padding: 0 16px; font-size: .95rem; }
  .levels-table, .levels-table tbody, .levels-table tr, .levels-table th, .levels-table td { display: block; width: 100%; }
  .levels-table thead { display: none; }
  .levels-table tbody tr { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .levels-table tbody tr:nth-child(odd) td, .levels-table tbody tr:nth-child(odd) th { background: none; }
  .levels-table tbody th { width: 100%; padding: 0 0 6px; border: 0; }
  .levels-table td { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: 10px; width: 100%; padding: 5px 0; border: 0; }
  .levels-table td::before { content: attr(data-label); color: #fff; font-weight: 700; }
  .faq-appel-texte { padding: 24px 20px 26px; }
  .faq-appel-texte .btn { width: 100%; }
  .pied-court { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col.pied-action { grid-column: 1 / -1; }
}

/* ---------- Mouvement réduit : panneau sous tension, sans animation ---------- */
@media (prefers-reduced-motion: reduce) {
  .faq .faq-bus { background: linear-gradient(90deg, var(--cyan-500) 0 2.4px, transparent 2.4px 9.6px, var(--cyan-500) 9.6px 12px); }
  .faq .faq-dp .dp-levier { transform: translateX(7px); }
  .faq .faq-dp .dp-levier rect { fill: var(--cyan-500); }
  .faq-item.active::after { animation: none; }
}

/* Groupes thématiques du panneau et questions en h3 (1er novembre 2026) */
.faq-q { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.faq-groupe {
  grid-column: 1 / -1; justify-self: center; position: relative; z-index: 1;
  margin: 26px 0 4px; padding: 8px 18px; border-radius: 999px;
  background: var(--panneau-fond-plein); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 24px -18px rgba(10, 22, 40, .7);
  font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; line-height: 1.3; text-align: center;
  color: var(--panneau-accent, #7fe6ff);
}
.faq-circuits > .faq-groupe:first-of-type { margin-top: 6px; }
@media (max-width: 760px) {
  .faq-groupe { grid-column: 1; justify-self: start; margin: 22px 0 2px; text-align: left; }
}
