/* ==========================================================================
   Cadran — frames.css — cadres, lumière de survol et allègement.
   Chargé après les feuilles de sections : il ne redéclare aucune couleur,
   il n'utilise que les variables de tokens.css.
   1. .cadre : un bloc de grandes lignes posé dans un cadre (même peau que .card)
   2. Lumière de survol : .fx-spot (posé dans chaque .card par assets/js/fx.js) et .cadre::after
   3. Blocs encadrés : cadrans de l'accueil, « Ce que vous recevez », délais, questions
   4. Allègement : plus de réglets verticaux de fond, plus d'index en double
   ========================================================================== */

/* ---- 1. Cadre ----------------------------------------------------------- */
.cadre{
  position:relative; isolation:isolate; min-width:0;
  border:1px solid var(--color-line-1); border-radius:var(--radius-2);
  background-color:var(--color-surface-1); background-image:var(--grad-surface);
  transition:border-color var(--dur-fast);
}
@media (hover:hover){
  .cadre:hover{ border-color:var(--color-line-2); }
}

/* ---- 2. Lumière de survol ------------------------------------------------
   Une lueur suit le pointeur (--cx / --cy, écrits par fx.js) et un trait de lumière
   parcourt le bord haut à l'entrée du pointeur. Rien au toucher, rien sans survol. */
.fx-spot, .cadre::after{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; pointer-events:none;
  background:radial-gradient(340px circle at var(--cx,50%) var(--cy,0%), color-mix(in srgb, var(--color-ice) 9%, transparent), transparent 68%);
  opacity:0; transition:opacity var(--dur-base);
}
.fx-spot::before, .cadre::before{
  content:""; position:absolute; top:0; left:0; right:0; height:1px; z-index:1; pointer-events:none;
  background:linear-gradient(90deg, transparent, var(--color-ice), transparent) no-repeat;
  background-size:38% 100%; background-position:-62% 0; opacity:0;
}
@media (hover:hover){
  .card:hover > .fx-spot, .cadre:hover::after{ opacity:1; }
  .card:hover > .fx-spot::before, .cadre:hover::before{ animation:fx-trait 1.1s var(--ease-out) 1; }
}
@keyframes fx-trait{
  0%{ opacity:0; background-position:-62% 0; }
  18%{ opacity:1; }
  82%{ opacity:1; }
  100%{ opacity:0; background-position:162% 0; }
}
@media (prefers-reduced-motion: reduce){
  html:not([data-motion="full"]) .card:hover > .fx-spot::before,
  html:not([data-motion="full"]) .cadre:hover::before{ animation:none; }
}
html.motion-reduced .card:hover > .fx-spot::before, html.motion-reduced .cadre:hover::before,
html[data-motion="reduce"] .card:hover > .fx-spot::before, html[data-motion="reduce"] .cadre:hover::before{ animation:none; }
@media print{ .fx-spot, .cadre::before, .cadre::after{ display:none; } }

/* ---- 3. Blocs encadrés -------------------------------------------------- */
/* 3.1 Accueil : les trois cadrans de l'offre, dans un seul cadre à trois cellules */
.hero-dial{
  padding:var(--space-3) var(--space-4); border-top:1px solid var(--color-line-1);
  transition:background-color var(--dur-fast);
}
.hero-dial:first-child{ border-top:0; }
.hero-dial::before{ display:none; }
.hero-dial__value{ transition:color var(--dur-fast); }
@media (hover:hover){
  .hero-dial:hover{ background-color:color-mix(in srgb, var(--color-ice) 6%, transparent); }
  .hero-dial:hover .hero-dial__value{ color:var(--color-ice); }
}
@media (min-width:600px){
  .hero-dials{ column-gap:0; }
  .hero-dial{ padding:var(--space-4); border-top:0; border-left:1px solid var(--color-line-1); }
  .hero-dial:first-child{ border-left:0; }
}
@media (min-width:1280px){
  .hero-dial{ padding:var(--space-4) var(--space-5); }
}
/* Le cadre entre avec le reste de l'accueil, sans attendre le défilement :
   un cadre vide ne reste jamais visible en bas du premier écran. Animation CSS seule,
   donc visible aussi sans JavaScript. */
.hero-dials{ animation:cadre-in .8s var(--ease-out) .5s both; }
@keyframes cadre-in{
  from{ opacity:0; transform:translateY(16px); }
  to{ opacity:1; transform:none; }
}
@media (prefers-reduced-motion: reduce){
  html:not([data-motion="full"]) .hero-dials{ animation:none; }
}
html.motion-reduced .hero-dials, html[data-motion="reduce"] .hero-dials{ animation:none; }
@media print{ .hero-dials{ animation:none; } }

/* 3.2 Audit : « Ce que vous recevez » */
.ctc-receive__cadre{ display:grid; gap:var(--space-5); padding:var(--space-5); }
@media (min-width:600px){ .ctc-receive__cadre{ padding:var(--space-6); } }
.ctc-receive__cadre .ctc-list__item:last-child{ border-bottom:0; }

/* 3.3 Tarifs : le cadran des délais */
.tar-range.cadre{ padding:var(--space-5); border-top:1px solid var(--color-line-1); }
@media (min-width:600px){ .tar-range.cadre{ padding:var(--space-5) var(--space-6); } }

/* 3.4 Questions : la liste dans un cadre */
.faq-list.cadre{ padding:0 var(--space-4); }
@media (min-width:600px){ .faq-list.cadre{ padding:0 var(--space-6); } }
.faq-list.cadre > .accordion__item:first-child > .accordion__summary{ border-top-color:transparent; }

/* ---- 4. Allègement ------------------------------------------------------ */
/* Plus de réglets verticaux derrière les contenus. */
@media (min-width:1024px){
  main{ --trame:none; }
}
/* Le numéro de section n'est écrit qu'une fois, dans le surtitre ; le filet de séparation reste. */
.section__rule{ font-size:0; }

/* Jauges du rapport d'exemple : deux colonnes quand la colonne est étroite (1024–1279 px),
   pour que les libellés ne se touchent pas. */
@media (min-width:1024px) and (max-width:1279px){
  .ctc-report__gauges{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
