/* =====================================================================
   Agentique Québec — Diagnostic IA & outils (/diagnostic-ia-pme), refonte du 15 octobre 2026.
   Direction : « relevé de l'existant ». Le diagnostic est présenté comme un relevé avant travaux : repères posés sur
   la photo de l'entrevue, prix posé comme une cote, livrables en bordereau, déroulement en cheminement de stations,
   limites du mandat en bande hachurée, exemple fictif en trait interrompu (élément projeté), mire de l'appel final.
   Se charge APRÈS /assets/premium/aq-premium.css ; couleurs tirées des jetons communs.
   ===================================================================== */

.page-releve {
  --releve-trait: rgba(10, 22, 40, .42);      /* traits des dessins de contenu (pâlis comme le plan d'arrière-plan) */
  --releve-trait-fin: rgba(10, 22, 40, .26);
}

/* Cible d'une dérivation du schéma : enveloppe du titre, interligne du titre (la dérivation vise sa première ligne) */
.titre-prise { --t-h2: var(--taille-h2); line-height: calc(var(--t-h2) * 1.1); }
.titre-prise h2 { font-size: var(--t-h2); }

/* =====================================================================
   HÉRO : l'entrevue relevée (repères R-01… posés sur la photo par diagnostic.js)
   ===================================================================== */
.releve-photo img { object-position: 58% 50%; }
.releve-panneau { width: min(680px, 54%); position: relative; z-index: 1; }   /* le visage de l'interlocuteur reste dégagé */
.releve-panneau h1 { margin-bottom: 22px; }
.releve-bref {
  max-width: 60ch;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--cyan-500);
  font-size: clamp(1rem, .95rem + .2vw, 1.08rem); line-height: 1.66; color: #26354a;
}
.releve-bref strong { color: var(--marine-900); font-weight: 700; }
.releve-panneau .aq-boutons { margin-top: 28px; }

/* Repères : cercle, croisée, point cyan, attache et étiquette de code (SVG construit par le script) */
.reperes { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.reperes .rp-halo { fill: rgba(10, 22, 40, .3); stroke: none; }
.reperes .rp-cercle { fill: none; stroke: #fff; stroke-width: 1.6; }
.reperes .rp-croix { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; }
.reperes .rp-point { fill: var(--cyan-400); stroke: none; }
.reperes .rp-attache { fill: none; stroke: rgba(255, 255, 255, .92); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.reperes .rp-puce { fill: rgba(10, 22, 40, .66); stroke: rgba(255, 255, 255, .55); stroke-width: 1; }
.reperes .rp-code { fill: #fff; font-family: var(--font-text); font-size: 10.5px; font-weight: 650; letter-spacing: .09em; font-variant-numeric: tabular-nums; }

/* =====================================================================
   POUR QUI : texte et cote du prix
   ===================================================================== */
.releve-pourqui-grille {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center; gap: 40px clamp(36px, 6vw, 104px);
}
.releve-tete { margin-bottom: 0; }

/* La cote : lignes d'attache, ligne de cote à traits obliques, valeur au-dessus, note dessous */
.cote {
  --taille-cote: clamp(3.4rem, 2.1rem + 3.9vw, 5.9rem);
  position: relative; isolation: isolate;
  padding: 0 4px 6px;
}
.cote::before {
  content: ""; position: absolute; z-index: -1; inset: -30px -40px -26px; border-radius: 40px;
  background: var(--halo-fond); filter: blur(18px); pointer-events: none;
}
.cote-attache {
  position: absolute; top: 10px; width: 0;
  height: calc(var(--taille-cote) + 30px);
  border-left: 1px solid var(--releve-trait);
}
.cote-attache--g { left: 4px; }
.cote-attache--d { right: 4px; }
.cote-prix { margin: 0; display: block; text-align: center; color: var(--marine-900); }
.cote-valeur {
  display: block; height: var(--taille-cote);
  font-size: var(--taille-cote); font-weight: 850; line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--marine-900);
}
.cote-ligne {
  position: relative; display: block; height: 1.5px; margin: 18px 4px 0;
  background: var(--marine-900); opacity: .78;
  transform-origin: 50% 50%;
}
.cote-trait { position: absolute; top: -8px; width: 1.6px; height: 17px; background: var(--marine-900); transform: rotate(45deg); }
.cote-trait--g { left: -1px; }
.cote-trait--d { right: -1px; }
.cote-note {
  display: block; margin-top: 16px;
  font-size: .98rem; font-weight: 560; letter-spacing: .005em; line-height: 1.4;
  color: var(--ardoise-600);
}

/* =====================================================================
   CE QUE VOUS RECEVEZ : bordereau des livrables (verre marine)
   ===================================================================== */
.bordereau {
  display: grid; grid-template-columns: minmax(0, 4.2fr) minmax(0, 7.8fr);
  align-items: start; gap: 26px clamp(30px, 4.4vw, 72px);
  padding: clamp(28px, 3.6vw, 52px) clamp(24px, 3.6vw, 52px) clamp(22px, 3vw, 40px);
  border-radius: 34px;
}
.bordereau-tete { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding-top: 4px; }
/* Petit cartouche du bordereau (codes seulement), posé au pied de la colonne du titre */
.cartouche { display: block; width: min(100%, 320px); height: auto; overflow: visible; }
.cartouche-cadre, .cartouche-filet { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cartouche-code { fill: var(--panneau-accent); fill-opacity: .78; font-family: var(--font-text); font-size: 12px; font-weight: 620; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.cartouche-code--fort { fill: #fff; fill-opacity: .9; font-size: 16px; font-weight: 800; letter-spacing: .08em; }
.bordereau-tete .titre-prise { --t-h2: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); }
.bordereau-liste { list-style: none; margin: 0; padding: 0; counter-reset: livrable; border-top: 1.5px solid rgba(255, 255, 255, .3); }
.calque .bordereau-liste li {
  --trace: 1;
  position: relative; counter-increment: livrable;
  display: grid; grid-template-columns: 74px minmax(0, 1fr) 30px; align-items: center; column-gap: 20px;
  min-height: 70px; padding: 16px 2px 16px 0;
  font-size: 1.05rem; line-height: 1.5; color: var(--panneau-texte);
}
.bordereau-liste li::before {
  content: "L-" counter(livrable, decimal-leading-zero);
  content: "L-" counter(livrable, decimal-leading-zero) / "";
  align-self: stretch; display: flex; align-items: center;
  border-right: 1px solid var(--panneau-filet);
  font-size: .78rem; font-weight: 680; letter-spacing: .12em; font-variant-numeric: tabular-nums;
  color: var(--panneau-accent);
}
.bordereau-liste li::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(0, 212, 255, .55), rgba(255, 255, 255, .16) 38%, rgba(255, 255, 255, .16));
  transform: scaleX(var(--trace, 1)); transform-origin: 0 50%;
}
.coche { width: 26px; height: 26px; overflow: visible; }
.coche-boite { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 1.4; }
.coche-trait { fill: none; stroke: var(--cyan-400); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

/* =====================================================================
   COMMENT ÇA SE PASSE : cheminement de quatre stations (tracé par le script)
   ===================================================================== */
.cheminement { position: relative; padding-top: 58px; }
.cheminement-trace { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cheminement-trace .trace-fond { fill: none; stroke: var(--releve-trait); stroke-width: 1.3; stroke-dasharray: 14 5 2 5; stroke-linecap: butt; }
.cheminement-trace .trace-vive { fill: none; stroke: var(--cyan-500); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cheminement-trace .trace-angle { fill: none; stroke: var(--releve-trait-fin); stroke-width: 1; }
.cheminement-trace .trace-cote { fill: rgba(10, 22, 40, .5); font-family: var(--font-text); font-size: 10px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.stations {
  position: relative; z-index: 1;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 22px;
}
.station { position: relative; padding: 26px 24px 28px; border-radius: 26px; font-size: .97rem; line-height: 1.62; }
.station::after { opacity: .45; }
.station strong { display: block; margin-bottom: 10px; font-size: 1.12rem; font-weight: 750; line-height: 1.3; letter-spacing: -.01em; }
.station:nth-child(2) { margin-top: 64px; }
.station:nth-child(3) { margin-top: 18px; }
.station:nth-child(4) { margin-top: 84px; }
/* Repère de station : cercle, triangle et point (s'allume quand le cheminement l'atteint) */
.station-repere {
  position: absolute; top: -45px; left: 50%; width: 30px; height: 30px; margin-left: -15px;
  border-radius: 50%;
  background: no-repeat center / 30px 30px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='13.2' fill='%23f8f7f3' stroke='%230a1628' stroke-opacity='.62' stroke-width='1.5'/%3E%3Cpath d='M15 8.2 21.2 19.6H8.8Z' fill='none' stroke='%230a1628' stroke-opacity='.7' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='15' cy='15.6' r='1.7' fill='%230a1628'/%3E%3C/svg%3E");
  transition: box-shadow .5s var(--ease-std);
}
.station-repere::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  background: no-repeat center / 30px 30px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='13.2' fill='%23e9fbff' stroke='%2300b4d8' stroke-width='1.8'/%3E%3Cpath d='M15 8.2 21.2 19.6H8.8Z' fill='%2300b4d8' fill-opacity='.22' stroke='%23007a99' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='15' cy='15.6' r='1.9' fill='%23007a99'/%3E%3C/svg%3E");
  transition: opacity .45s var(--ease-std);
}
.station.est-relevee .station-repere { box-shadow: 0 0 0 5px rgba(0, 180, 216, .14), 0 0 22px rgba(0, 180, 216, .45); }
.station.est-relevee .station-repere::after { opacity: 1; }
/* La mise sous tension de la section n'éclaire que les stations déjà relevées */
.releve-deroulement.est-alimentee .station:not(.est-relevee) { box-shadow: var(--panneau-ombre); }
.releve-deroulement .station.est-relevee { box-shadow: var(--panneau-ombre), 0 0 0 1px var(--panneau-allume), 0 0 38px -12px var(--panneau-allume); }

/* =====================================================================
   CE QUE LE DIAGNOSTIC N'EST PAS : la limite du relevé (bande hachurée) et l'exemple projeté (trait interrompu)
   ===================================================================== */
.limite { --hachure: 1; position: relative; isolation: isolate; padding: 14px; border-radius: 40px; }
.limite::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, rgba(10, 22, 40, .19) 0 1.2px, rgba(10, 22, 40, 0) 1.2px 9px);
  box-shadow: inset 0 0 0 1.4px rgba(10, 22, 40, .3);
  clip-path: inset(0 calc((1 - var(--hachure)) * 100%) 0 0 round 40px);
}
.limite-feuille {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  grid-template-areas: "titre note" "texte note" "liens note";
  grid-template-rows: auto auto 1fr;
  align-items: start; gap: 20px clamp(30px, 4.6vw, 72px);
  padding: clamp(28px, 4vw, 58px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .95);
  box-shadow: inset 0 0 0 1px rgba(10, 22, 40, .06), var(--ombre-2);
}
.limite-titre { grid-area: titre; }
.limite-titre { --t-h2: clamp(2rem, 1.3rem + 2.5vw, 3.2rem); }
.limite-texte { grid-area: texte; max-width: 56ch; font-size: 1.1rem; line-height: 1.66; color: var(--ardoise-700); }
.limite-liens { grid-area: liens; max-width: 56ch; font-size: 1rem; line-height: 1.7; color: var(--ardoise-600); }
.limite-liens a { color: var(--cyan-750); font-weight: 650; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.limite-liens a:hover { color: var(--marine-900); }
.limite-note {
  grid-area: note; align-self: center; position: relative;
  padding: 28px 30px 30px;
  border: 1.6px dashed rgba(0, 111, 139, .6); border-radius: 24px;
  background: rgba(0, 180, 216, .055);
  font-size: 1rem; line-height: 1.68; color: var(--ardoise-700);
}
.limite-note strong { display: block; margin-bottom: 8px; font-size: .98rem; font-weight: 760; letter-spacing: .01em; color: var(--cyan-750); }

/* =====================================================================
   QUESTIONS FRÉQUENTES : notes au relevé dans un verre marine ; la mire tourne en croix à l'ouverture
   ===================================================================== */
.releve-questions-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: 28px clamp(30px, 4.4vw, 72px); }
.releve-questions-tete { margin-bottom: 0; }
.notes { padding: 8px clamp(20px, 2.6vw, 34px); border-radius: 30px; interpolate-size: allow-keywords; }
.notes::after { opacity: .5; }
.note + .note { border-top: 1px solid var(--panneau-filet); }
.note summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 20px;
  min-height: 68px; padding: 18px 2px;
  list-style: none; cursor: pointer;
  font-size: 1.08rem; font-weight: 700; line-height: 1.4; letter-spacing: -.005em;
  color: var(--panneau-titre);
  border-radius: 14px;
}
.note summary::-webkit-details-marker { display: none; }
.note summary::marker { content: ""; }
.note summary::after {
  content: ""; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .42);
  background:
    linear-gradient(var(--panneau-icone), var(--panneau-icone)) center / 1.6px 62% no-repeat,
    linear-gradient(var(--panneau-icone), var(--panneau-icone)) center / 62% 1.6px no-repeat;
  transition: transform .45s var(--ease-sortie), background-color .3s var(--ease-std), border-color .3s var(--ease-std);
}
.note summary:hover::after { border-color: var(--panneau-accent); }
.note[open] summary::after { transform: rotate(45deg); border-color: var(--cyan-400); background-color: rgba(0, 212, 255, .16); }
.note summary:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: 2px; }
.calque .note p { padding: 0 56px 24px 2px; font-size: 1rem; line-height: 1.7; color: var(--panneau-texte-2); }
/* Ouverture adoucie là où le navigateur le permet (sinon : ouverture native, immédiate) */
.note::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-sortie), content-visibility .45s allow-discrete; }
.note[open]::details-content { block-size: auto; }

/* =====================================================================
   APPEL FINAL : les plans sur la table, la mire (le centre s'allume avec la lampe L-1)
   ===================================================================== */
.releve-appel-scene { justify-content: flex-end; }
.releve-appel-scene::after { background: linear-gradient(270deg, rgba(10, 22, 40, .3) 0%, rgba(10, 22, 40, .08) 62%, rgba(10, 22, 40, .14) 100%); }
.releve-appel-boite { max-width: 640px; }
.mire {
  position: absolute; z-index: 0; left: 24%; top: 50%;
  width: clamp(210px, 25vw, 380px); height: auto; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible; pointer-events: none;
}
.mire .mire-anneau { fill: none; stroke: rgba(255, 255, 255, .82); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mire .mire-anneau--ext { stroke-dasharray: 10 6; stroke: rgba(255, 255, 255, .62); }
.mire .mire-anneau--int { stroke: #fff; stroke-width: 1.8; }
.mire .mire-quart { fill: rgba(255, 255, 255, .78); stroke: none; }
.mire .mire-croix { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mire .mire-graduations { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.mire .mire-centre { fill: rgba(255, 255, 255, .92); transition: fill .6s var(--ease-std); }
.mire { filter: drop-shadow(0 2px 8px rgba(10, 22, 40, .45)); transition: filter .8s var(--ease-std); }
.releve-appel.est-alimentee .mire-centre { fill: var(--cyan-400); }
.releve-appel.est-alimentee .mire { filter: drop-shadow(0 2px 8px rgba(10, 22, 40, .45)) drop-shadow(0 0 18px rgba(0, 212, 255, .55)); }

/* =====================================================================
   PIED DE PAGE (pied de production : marque, droits, liens)
   ===================================================================== */
.pied-mini { display: flex; align-items: center; }
.pied-mini .footer-brand { display: flex; align-items: center; gap: 16px; }
.pied-mini .footer-logo { margin-bottom: 0; }
.pied-mini .logo-text { margin-bottom: 0; }

/* =====================================================================
   ADAPTATIF
   ===================================================================== */
@media (max-width: 1180px) {
  .stations { gap: 16px; }
  .station { padding: 22px 20px 24px; }
}
@media (max-width: 1023px) {
  /* Tablette et téléphone : la photo occupe le haut du cadre et se fond dans le marine ; le verre (dense) la chevauche */
  .releve-cadre { --haut-photo: clamp(280px, 34svh, 400px); padding-top: var(--haut-photo); align-items: flex-end; background: var(--marine-800); }
  .releve-photo { bottom: auto; height: calc(var(--haut-photo) + 230px); }
  .releve-photo img { object-position: 64% 50%; }
  .releve-photo::after { background: linear-gradient(180deg, rgba(10, 22, 40, .2) 0%, rgba(10, 22, 40, 0) 22%, rgba(12, 29, 53, 0) 62%, var(--marine-800) 100%); }
  .releve-panneau { width: 100%; background: var(--verre-fond-dense); }
  .releve-pourqui-grille { grid-template-columns: minmax(0, 1fr); }
  .cote { max-width: 560px; }
  .bordereau { grid-template-columns: minmax(0, 1fr); }
  .cartouche { display: none; }
  .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 70px 20px; }
  .station:nth-child(2) { margin-top: 48px; }
  .station:nth-child(3) { margin-top: 0; }
  .station:nth-child(4) { margin-top: 48px; }
  .releve-questions-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .limite-feuille { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "texte" "note" "liens"; grid-template-rows: none; }
  .limite-note { align-self: start; }
}
@media (max-width: 700px) {
  .releve-cadre { --haut-photo: clamp(230px, 34svh, 300px); }
  .releve-photo img { object-position: 75% 50%; }
  .releve-bref { padding-left: 14px; }
  .cote { --taille-cote: clamp(3rem, 15vw, 4.2rem); padding-inline: 2px; }
  .cote::before { inset: -20px -16px -18px; }
  .bordereau { padding: 26px 20px 18px; border-radius: 28px; }
  .calque .bordereau-liste li { grid-template-columns: minmax(0, 1fr) 26px; column-gap: 14px; row-gap: 4px; padding: 14px 0 15px; font-size: 1rem; }
  .bordereau-liste li::before { grid-column: 1 / -1; border-right: 0; font-size: .72rem; letter-spacing: .12em; }
  .cheminement { padding-top: 44px; }
  .stations { grid-template-columns: minmax(0, 1fr); gap: 58px; }
  .station, .station:nth-child(n) { margin-top: 0; }
  .station:nth-child(even) { margin-left: 26px; }
  .station-repere { top: -44px; left: 34px; margin-left: -15px; }
  .limite { padding: 10px; border-radius: 32px; }
  .limite::before { clip-path: inset(0 calc((1 - var(--hachure)) * 100%) 0 0 round 32px); }
  .limite-feuille { padding: 26px 20px; border-radius: 24px; }
  .limite-note { padding: 22px 20px 24px; }
  .notes { padding: 4px 18px; border-radius: 26px; }
  .note summary { gap: 14px; font-size: 1.02rem; }
  .calque .note p { padding-right: 8px; }
  .mire { left: 50%; top: 27%; width: clamp(170px, 46vw, 230px); }
  .pied-mini .footer-brand { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Dessin immobile et complet : le cheminement est tracé, toutes les stations sont relevées */
  .station-repere::after { transition: none; opacity: 1; }
}

/* Modalités, extrait fictif du rapport (1er novembre 2026) */
.modalites { padding: clamp(26px, 3vw, 42px); border-radius: 28px; }
.modalites-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 30px; margin: 18px 0 0; }
.modalites-liste dt { margin-bottom: 6px; font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-600, #0b7f9a); }
.modalites-liste dd { margin: 0; line-height: 1.62; }
.modalites-liste a { font-weight: 650; }
.modalites-note { margin-top: 18px; }
.extrait-fictif { margin: 20px 0 0; }
.extrait-fictif figcaption { margin-bottom: 10px; font-size: .92rem; line-height: 1.55; }
.extrait-tableau { overflow-x: auto; }
.extrait-fictif table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .92rem; background: rgba(255, 255, 255, .7); }
.extrait-fictif th, .extrait-fictif td { padding: 9px 12px; border: 1px dashed rgba(10, 22, 40, .28); text-align: left; vertical-align: top; }
.extrait-fictif thead th { font-weight: 700; background: rgba(10, 22, 40, .05); }
@media (max-width: 800px) { .modalites-liste { grid-template-columns: minmax(0, 1fr); } }

/* Premier écran mobile (1er novembre 2026) : photo plus basse, bouton principal avant l'encadré « En bref » */
@media (max-width: 700px) {
  .releve-cadre { --haut-photo: clamp(150px, 22svh, 185px); }
  .releve-panneau { display: flex; flex-direction: column; }
  .releve-panneau h1 { margin-bottom: 12px; line-height: 1.1; }
  .releve-panneau .label { margin-bottom: 12px; }
  .releve-panneau .aq-boutons { order: 1; margin-top: 2px; margin-bottom: 16px; }
  .releve-panneau .releve-bref { order: 2; }
}
