/* ════════════════════════════════════════════════════════════════════
   La page d'accueil N15. Portée le 05/11/2026 depuis la maquette validée
   par Joël (maquettes/accueil/index.html, son LISEZ-MOI dit le pourquoi de
   chaque règle) : le style Paxter seul. Le socle commun (jetons, barre,
   boutons, pied, transitions) est dans vitrine.css.
   ════════════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
/* Le fond blanc de l'accueil (la connexion, elle, est sur le gris). */
body.page-accueil { display: block; background: var(--fond); }
.page-accueil main { display: block; }
/* La barre prend son ombre une fois la page défilée (comme le site). */
.page-accueil .barre { box-shadow: none; transition: box-shadow .15s ease-in-out; }
html[data-defile="1"] .page-accueil .barre { box-shadow: 0 4px 2px -2px #f3f5f3; }

.section { padding: 88px 0; }
.section.alt { background: var(--fond-alt); }
/* Un bloc se détache par le fond OPPOSÉ à celui de sa section (blanc sur
   gris, comme les blocs du site). */
.section { --fond-bloc: var(--fond-alt); }
.section.alt { --fond-bloc: var(--fond); }
h2, h3 { font-family: var(--police-titre); font-weight: var(--graisse-titre); line-height: 1.12; margin: 0; }
/* Les titres de section sur toute la ligne ; s'ils passent à la ligne, les
   deux lignes sont équilibrées (Joël, 02/11). */
h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); text-wrap: balance; }
h3 { font-size: 1.2rem; }
.mot { color: var(--action); }
.bouton-grand { padding: 16px 28px; font-size: 1.05rem; }

/* ── La promesse ──────────────────────────────────────────────────── */
.promesse h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); letter-spacing: -.015em; }
.chapeau { margin-top: 22px; font-size: 1.3rem; color: var(--encre-2); }
.promesse .texte { margin-top: 12px; color: var(--encre-2); }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 56px 0 0; padding: 0; list-style: none; border-top: .8px solid var(--filet); }
.chiffres li { padding: 26px 24px 4px 0; }
.chiffres li + li { padding-left: 24px; border-left: .8px solid var(--filet); }
.nombre { display: block; font-family: var(--police-titre); font-weight: var(--graisse-titre); font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; letter-spacing: -.02em; }
.chiffres span:last-child { display: block; margin-top: 10px; color: var(--encre-2); max-width: 24ch; }

/* ── Comment ça marche : quatre blocs qui ouvrent leur détail ─────── */
.constat { margin-top: 18px; font-size: 1.15rem; color: var(--encre-2); }
.etapes { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.etapes > li { display: contents; }
.etape-tete {
  grid-row: 1; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-height: 188px; padding: 22px 22px 48px; text-align: left;
  border: 0; border-radius: var(--rayon-bloc); background: var(--fond-bloc); color: var(--encre);
  font: inherit; cursor: pointer;
  /* Le fond rouge de l'étape ouverte vient d'un coup : un fondu le faisait
     passer par le rose (audit des rouges, 02/11). */
  transition: color .15s ease-in-out;
}
.etape-tete:hover { color: var(--action); }
.etape-tete[aria-expanded="true"] { background: var(--action); color: #fff; }
.etape-num { font-family: var(--police-titre); font-weight: var(--graisse-titre); font-size: 1rem; color: var(--encre-3); }
.etape-tete[aria-expanded="true"] .etape-num { color: rgba(255, 255, 255, .8); }
.etape-titre { font-family: var(--police-titre); font-weight: var(--graisse-titre); font-size: 1.25rem; line-height: 1.2; }
.etape-resume { font-size: .95rem; opacity: .85; }
.plus { position: absolute; right: 18px; bottom: 14px; width: 22px; height: 22px; }
.plus::before, .plus::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2px; background: currentColor; transition: transform .2s ease; }
.plus::after { transform: rotate(90deg); }
.etape-tete[aria-expanded="true"] .plus::after { transform: rotate(0deg); }
.etape-detail {
  grid-column: 1 / -1; grid-row: 2;
  padding: 26px 28px; border-radius: var(--rayon-bloc);
  background: var(--action); color: #fff; font-size: 1.05rem; line-height: 1.6;
}
.etape-detail p { max-width: 70ch; }

/* ── Tarification ─────────────────────────────────────────────────── */
.tarifs-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 24px; }
.tarifs-texte { font-size: 1.3rem; line-height: 1.45; color: var(--encre-2); }
/* La grille des tarifs (18/11) : les chiffres alignés à droite, en
   chiffres de même largeur ; le prix par poste plus discret. */
.tarifs-notes { margin-top: 16px; color: var(--encre-2); max-width: 52ch; }
.tarifs-notes a { color: var(--action); }
.tarifs-tableau table { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.tarifs-tableau th, .tarifs-tableau td { padding: 11px 14px; border-bottom: .8px solid var(--filet); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tarifs-tableau thead th { font-family: var(--police-titre); font-weight: 600; font-size: .86rem; color: var(--encre-3); border-bottom-color: var(--encre-3); }
.tarifs-tableau th:first-child, .tarifs-tableau td:first-child { text-align: left; padding-left: 0; }
.tarifs-tableau tbody th { font-weight: 700; color: var(--encre); }
.tarifs-tableau tbody td:nth-child(2) { font-weight: 600; color: var(--encre); }
.tarifs-tableau tbody td:last-child { color: var(--encre-3); padding-right: 0; }
@media (max-width: 420px) { .tarifs-tableau th, .tarifs-tableau td { padding: 10px 8px; font-size: .95rem; } }
/* La grille se déplie (19/11), son bouton en haut de la colonne de droite
   (Joël) ; il parle comme « Voir le détail » des cartes. */
.tarifs-droite { display: flex; flex-direction: column; align-items: flex-end; }
.tarifs-plus { margin: 0; padding: 4px 32px 4px 0; }
.tarifs-plus .plus { top: 3px; }
.tarifs-zone { align-self: stretch; margin-top: 14px; opacity: 0; transition: opacity .15s ease; }
.tarifs-grille.ouverte .tarifs-zone { opacity: 1; transition: opacity .3s ease .05s; }
/* Le lien vers les questions sur l'offre (FAQ), quand elle en a. */
.tarifs-faq { margin-top: 14px; }
.tarifs-faq a { color: var(--action); text-underline-offset: 3px; }
.appel { margin-top: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 36px; border-radius: var(--rayon-bloc); background: var(--fond-bloc); }
.appel p { font-family: var(--police-titre); font-weight: var(--graisse-titre); font-size: 1.45rem; line-height: 1.25; max-width: 26ch; }

/* ── Conçue pour les décideurs les plus exigeants ─────────────────── */
/* Trois carrés (Joël, 04/11). Celui qu'on ouvre s'élargit en rectangle sur
   toute la largeur, PAR-DESSUS les deux autres, et montre son détail ; un
   seul ouvert à la fois (accueil.js). Sur écran étroit, il s'allonge. */
.trois { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; transition: min-height .3s ease; }
.carte {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 240px; padding: 26px 26px 18px;
  border-radius: var(--rayon-bloc); background: var(--fond-bloc);
}
.carte p { margin-top: 12px; color: var(--encre-2); }
.carte.deployee { position: absolute; top: 0; z-index: 2; box-shadow: 0 12px 32px rgba(29, 36, 39, .14); }
.carte.en-largeur { transition: left .45s cubic-bezier(.3, 0, .2, 1), right .45s cubic-bezier(.3, 0, .2, 1); }
.carte.en-hauteur { transition: height .3s ease; overflow: hidden; }
.carte-place { visibility: hidden; }
.carte-plus {
  position: relative; margin-top: auto; padding: 18px 32px 4px 0;
  border: 0; background: none; font: inherit; font-weight: 600; color: var(--encre); cursor: pointer;
  transition: color .15s ease-in-out;
}
.carte-plus:hover, .carte-plus[aria-expanded="true"] { color: var(--action); }
.carte-plus .plus { right: 0; bottom: auto; top: 17px; }
.carte-plus[aria-expanded="true"] .plus::after { transform: rotate(0deg); }
.carte-plus .si-ouvert, .carte-plus[aria-expanded="true"] .si-ferme { display: none; }
.carte-plus[aria-expanded="true"] .si-ouvert { display: inline; }
.carte-detail { margin-top: 18px; color: var(--encre-2); font-size: 1.05rem; line-height: 1.6; opacity: 0; transition: opacity .15s ease; }
.carte.detail-vu .carte-detail { opacity: 1; transition: opacity .3s ease .1s; }
.carte-detail p { margin: 0; max-width: 70ch; }
/* Le comparatif d'une carte : la colonne de N15 ressort (18/11). */
.carte-detail.lecture td:last-child { color: var(--encre); font-weight: 600; }
/* Une carte ouverte sur grand écran (Joël, 19/11 : trop de vide à droite).
   Ses points (« - **Titre.** texte ») se rangent côte à côte, chacun sous
   son titre ; quatre points font deux colonnes, pas trois et un orphelin.
   Les paragraphes s'allongent un peu, le comparatif prend la largeur. */
@media (min-width: 961px) {
  .carte.deployee .carte-detail p { max-width: 86ch; }
  .carte.deployee .carte-detail ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 32px;
    max-width: none; margin: 16px 0 1.3em; padding: 0; list-style: none; }
  .carte.deployee .carte-detail ul:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carte.deployee .carte-detail li { margin: 0; padding-top: 12px; border-top: .8px solid var(--filet); }
  .carte.deployee .carte-detail li > strong:first-child { display: block; margin-bottom: 6px; color: var(--encre); }
  .carte.deployee .carte-detail table { max-width: none; }
}

/* ── En savoir plus ───────────────────────────────────────────────── */
.liens-plus { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.liens-plus a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px;
  border-radius: var(--rayon-bloc); background: var(--fond-bloc); text-decoration: none;
  transition: color .15s ease-in-out;
}
.liens-plus a:hover .lp-titre { color: var(--action); }
.lp-titre { font-family: var(--police-titre); font-weight: var(--graisse-titre); font-size: 1.15rem; line-height: 1.25; }
.lp-texte { color: var(--encre-2); font-size: .95rem; }

/* ── Le pied de l'accueil : logo, liens, mention (plus grand que celui de
   la connexion, comme dans la maquette). ──────────────────────────── */
.pied-grand { padding: 56px 0 24px; font-size: .92rem; }
.pied-grand .cadre { display: block; }
.pied-haut { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.pied-logo { height: 40px; width: auto; filter: brightness(0) invert(.86); }
.pied-grand .pied-liens { gap: 12px 28px; }
.pied-bas { margin-top: 40px; padding-top: 18px; border-top: 1px solid #66757c; font-size: .82rem; }

/* ── La transition vers la connexion ─────────────────────────────────
   La mosaïque de l'animation glisse vers le fond de la connexion. */
.m-pile { view-transition-name: n15-mosaique; }
/* Retour depuis la connexion : sa carte s'efface vite plutôt que de rester
   un instant transparente au-dessus de l'accueil. */
::view-transition-old(n15-carte), ::view-transition-old(n15-carte-demo) { animation-duration: .12s; }

/* ── Écrans étroits ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .tarifs-grille { grid-template-columns: 1fr; gap: 32px; }
  .tarifs-grille { gap: 20px; }
  .tarifs-droite { align-items: flex-start; }
  .etapes { grid-template-columns: repeat(2, 1fr); }
  .etapes > li { display: block; }
  .etape-tete, .etape-detail { grid-row: auto; }
  .etape-tete { width: 100%; }
  .etape-detail { margin-top: 8px; }
  /* Sur écran étroit, les carrés s'empilent et s'allongent pour s'ouvrir. */
  .trois { grid-template-columns: 1fr; }
  .carte { min-height: 0; }
  .liens-plus { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .chiffres { grid-template-columns: 1fr; }
  .chiffres li + li { padding-left: 0; border-left: 0; border-top: .8px solid var(--filet); }
  .etapes, .liens-plus { grid-template-columns: 1fr; }
  .appel { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
