/* =========================================================
   Sitero — « Comprendre les trois formules »
   Bloc pédagogique : ce qu'est un bloc, une page ou plusieurs,
   tableau de comparaison en langage courant, trois situations.

   Préfixe : .cmp / .cmp__*  (vérifié : aucun autre fichier du site
   n'utilise ce préfixe, contrairement à .cta, .tl et .ph qui se sont
   déjà écrasés entre eux).

   Aucune variable nouvelle : tout vient de style.css (--ink, --line,
   --paper, --blue, --r-*, --pad-s, --e-out).
   ========================================================= */

.cmp{padding:var(--pad-s) 0}

/* ---------------------------------------------------------
   1. Les deux traductions : « un bloc » et « une page »
   --------------------------------------------------------- */
.cmp__deux{
  display:grid;grid-template-columns:1fr 1fr;
  gap:clamp(16px,2vw,24px);
  margin-bottom:clamp(56px,7vw,96px);
}

.cmp__mot{
  background:var(--paper);border:1px solid transparent;
  border-radius:var(--r-l);
  padding:clamp(26px,3vw,40px);
  display:flex;flex-direction:column;
}
.cmp__mot h3{
  font-size:clamp(1.15rem,1.9vw,1.5rem);line-height:1.2;
  font-weight:640;letter-spacing:-.02em;
}
.cmp__mot h3 b{color:var(--blue);font-weight:640}
.cmp__def{
  margin-top:14px;color:var(--ink-2);
  font-size:1rem;line-height:1.55;letter-spacing:-.012em;
  max-width:48ch;
}
.cmp__apres{
  margin-top:20px;color:var(--ink-2);
  font-size:.95rem;line-height:1.5;
}

/* --- la petite maquette : une page vue comme une pile de blocs --- */
.cmp__pile{
  margin-top:24px;
  background:var(--white);
  border:1px solid var(--line);border-radius:var(--r-m);
  overflow:hidden;
  counter-reset:cmpbloc;
}
/* Le libellé et sa précision sont empilés dans la même colonne : sur un
   téléphone, une seule ligne ne tiendrait pas et la précision serait
   revenue sous le numéro, sans alignement. */
.cmp__pile li{
  display:grid;grid-template-columns:auto 1fr;
  column-gap:14px;align-items:center;
  padding:13px 18px;
  font-size:.93rem;line-height:1.35;letter-spacing:-.01em;
  color:var(--ink);
  border-top:1px solid var(--line);
}
.cmp__pile li:first-child{border-top:0}
.cmp__pile li::before{
  counter-increment:cmpbloc;content:counter(cmpbloc);
  width:24px;height:24px;border-radius:8px;
  display:grid;place-items:center;
  background:var(--paper);color:var(--ink-2);
  font-size:.78rem;font-weight:620;font-variant-numeric:tabular-nums;
}
/* Les deux textes vont dans la colonne 2, l'un sous l'autre : sans
   grid-column, le second repasserait sous le numéro et écraserait la
   première colonne. */
.cmp__pile li b{grid-column:2;font-weight:560;letter-spacing:-.01em}
.cmp__pile li span{grid-column:2;color:var(--ink-2);font-size:.86rem;line-height:1.4}

/* --- la maquette du menu : plusieurs pages --- */
.cmp__menu{
  margin-top:24px;
  background:var(--white);
  border:1px solid var(--line);border-radius:var(--r-m);
  padding:14px 16px;
  display:flex;flex-wrap:wrap;gap:8px;
}
.cmp__menu li{
  padding:7px 14px;border-radius:999px;
  background:var(--paper);color:var(--ink-2);
  font-size:.86rem;font-weight:540;letter-spacing:-.01em;
  white-space:nowrap;
}
.cmp__menu li:first-child{
  background:var(--ink);color:#fff;
}

/* ---------------------------------------------------------
   2. Le tableau de comparaison
   --------------------------------------------------------- */
.cmp__bloc-tab{margin-bottom:clamp(56px,7vw,96px)}
.cmp__bloc-tab > h3{
  font-size:clamp(1.15rem,1.9vw,1.5rem);line-height:1.2;
  font-weight:640;letter-spacing:-.02em;margin-bottom:10px;
}
.cmp__intro{
  color:var(--ink-2);font-size:1rem;line-height:1.55;
  max-width:60ch;margin-bottom:28px;
}

/* Le tableau glisse horizontalement sur petit écran plutôt que d'être
   dénaturé en cartes : la structure <table> reste intacte pour les
   lecteurs d'écran. La zone est focusable au clavier, c'est ce que
   demandent les règles d'accessibilité pour un contenu défilant. */
.cmp__scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--line);border-radius:var(--r-l);
  background:var(--white);
}
.cmp__scroll:focus-visible{outline:2.5px solid var(--blue);outline-offset:3px}

/* border-collapse:separate et non collapse : avec « collapse », Chrome
   n'affiche pas les bordures des cellules en position:sticky, et la
   colonne de gauche perdrait ses filets pendant le glissement. */
.cmp__tab{
  width:100%;min-width:660px;
  border-collapse:separate;border-spacing:0;
  font-size:.93rem;line-height:1.45;
}
/* La légende reste lue par les lecteurs d'écran ; la version visible de
   cette phrase est au-dessus du tableau, hors de la zone qui défile. */
.cmp__cap{
  position:absolute;width:1px;height:1px;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
.cmp__tab th,.cmp__tab td{
  padding:15px 18px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--line);
}
.cmp__tab tbody tr:last-child th,
.cmp__tab tbody tr:last-child td{border-bottom:0}

/* en-tête de colonne : le nom de la formule et son prix */
.cmp__th{
  border-bottom:1px solid var(--line);
  padding-top:22px;padding-bottom:18px;
  font-weight:620;letter-spacing:-.02em;
  white-space:nowrap;
}
.cmp__th b{display:block;font-size:1.05rem;font-weight:620;color:var(--ink)}
.cmp__th i{
  display:block;margin-top:4px;font-style:normal;
  font-size:1.35rem;font-weight:640;letter-spacing:-.035em;color:var(--ink);
}
.cmp__th--star b{color:var(--blue)}
.cmp__coin{border-bottom:1px solid var(--line);background:var(--white)}

/* la colonne de gauche reste visible quand on fait glisser le tableau */
.cmp__tab th[scope="row"],
.cmp__coin{
  position:sticky;left:0;z-index:1;
  background:var(--white);
}
.cmp__tab th[scope="row"]{
  font-weight:560;color:var(--ink);letter-spacing:-.012em;
  min-width:200px;
}
.cmp__tab td{color:var(--ink-2)}
.cmp__tab tbody tr:nth-child(even) th[scope="row"],
.cmp__tab tbody tr:nth-child(even) td{background:#fafafa}
.cmp__tab tbody tr:nth-child(even) th[scope="row"]{background:#fafafa}

/* oui / non */
.cmp__oui,.cmp__non{display:flex;gap:8px;align-items:flex-start}
.cmp__oui .ic{color:var(--green);font-size:1.05em;margin-top:.2em;stroke-width:2.6;flex:none}
.cmp__non .ic{color:var(--ink-3);font-size:1.05em;margin-top:.2em;stroke-width:2.6;flex:none}
.cmp__non{color:var(--ink-3)}

.cmp__note{
  margin-top:22px;color:var(--ink-2);
  font-size:.88rem;line-height:1.55;max-width:74ch;
}

/* ---------------------------------------------------------
   3. Trois situations
   --------------------------------------------------------- */
.cmp__cas-tit{
  font-size:clamp(1.15rem,1.9vw,1.5rem);line-height:1.2;
  font-weight:640;letter-spacing:-.02em;margin-bottom:10px;
}
.cmp__cas{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(16px,1.8vw,24px);
  margin-top:28px;margin-bottom:clamp(56px,7vw,96px);
}
.cmp__cas-un{
  background:var(--white);border:1px solid var(--line);
  border-radius:var(--r-l);
  padding:clamp(24px,2.6vw,32px);
  display:flex;flex-direction:column;
  transition:transform .35s var(--e-out),box-shadow .35s var(--e-out);
}
.cmp__cas-un:hover{transform:translateY(-3px);box-shadow:0 20px 44px -30px rgba(0,0,0,.4)}
.cmp__qui{
  font-size:1.02rem;font-weight:620;letter-spacing:-.02em;
  line-height:1.3;color:var(--ink);
}
.cmp__cas-un p{
  margin-top:12px;color:var(--ink-2);
  font-size:.95rem;line-height:1.5;
}
.cmp__vers{
  margin-top:auto;padding-top:20px;
  display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
  border-top:1px solid var(--line);
}
.cmp__vers b{font-size:.95rem;font-weight:620;letter-spacing:-.015em;color:var(--blue)}
.cmp__vers span{font-size:.88rem;color:var(--ink-2)}

/* ---------------------------------------------------------
   4. Aide au choix
   --------------------------------------------------------- */
.cmp__aide{
  background:var(--paper);border-radius:var(--r-l);
  padding:clamp(28px,3.4vw,48px);
}
.cmp__aide h3{
  font-size:clamp(1.15rem,1.9vw,1.5rem);line-height:1.2;
  font-weight:640;letter-spacing:-.02em;
}
.cmp__aide p{
  margin-top:16px;color:var(--ink-2);
  font-size:1rem;line-height:1.6;max-width:66ch;
}
.cmp__aide p b{color:var(--ink);font-weight:600}
.cmp__btns{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}

/* ---------------------------------------------------------
   Adaptations aux petits écrans
   --------------------------------------------------------- */
@media (max-width:980px){
  .cmp__cas{grid-template-columns:1fr;gap:14px}
}
@media (max-width:860px){
  .cmp__deux{grid-template-columns:1fr;gap:14px}
}
/* L'ombre qui détache la colonne de gauche n'apparaît qu'aux largeurs où
   le tableau déborde vraiment : sur grand écran, elle dessinerait un trait
   vertical inutile au milieu d'un tableau qui tient tout entier. */
@media (max-width:780px){
  .cmp__tab th[scope="row"],
  .cmp__coin{box-shadow:10px 0 12px -12px rgba(0,0,0,.35)}
}

@media (max-width:640px){
  .cmp__tab{font-size:.88rem;min-width:600px}
  .cmp__tab th,.cmp__tab td{padding:13px 14px}
  .cmp__tab th[scope="row"]{min-width:160px}
  .cmp__btns .btn{width:100%}
}

/* ---------------------------------------------------------
   Mouvement réduit : plus aucune transition ici.
   (Les apparitions .reveal sont déjà neutralisées par style.css.)
   --------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .cmp__cas-un{transition:none}
  .cmp__cas-un:hover{transform:none}
  .cmp__scroll{scroll-behavior:auto}
}
