/* Calamo — feuille de style unique
   Encre sur papier franc. Un seul accent (validation), réservé au bouton principal et aux confirmations. */

/* ---------- Polices, hébergées sur le site (aucun appel à un tiers) ---------- */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Polices de repli ajustées pour limiter le décalage au chargement */
@font-face {
  font-family: "Newsreader Repli";
  src: local("Georgia");
  size-adjust: 97.5%;
}

@font-face {
  font-family: "Public Sans Repli";
  src: local("Arial");
  size-adjust: 105.4%;
}

/* ---------- Jetons ---------- */

:root {
  --encre: #16233a;
  --encre-2: #48546a;   /* texte secondaire, 7,7:1 sur blanc */
  --papier: #ffffff;
  --marge: #eff1f4;
  --trait: #c9cfd8;     /* filets décoratifs uniquement */
  --champ: #6b7689;     /* bordure des champs de formulaire, 4,6:1 */
  --validation: #2f6b4f;
  --validation-fonce: #255a41;

  --serif: "Newsreader", "Newsreader Repli", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Public Sans Repli", "Segoe UI", Roboto, Arial, sans-serif;

  --mesure: 38rem;
  --gouttiere: clamp(1.125rem, 4vw, 2.5rem);

  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.25rem;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

@media (max-width: 30rem) {
  p {
    hyphens: auto;
  }
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

.visuellement-masque {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--encre);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
}

.evitement:focus {
  top: 0.75rem;
  outline-color: var(--encre);
}

.wrap {
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.colonne {
  max-width: var(--mesure);
}

.prose > * + * {
  margin-top: 1.1em;
}

/* Décisions non tranchées : laissées visibles, jamais comblées */
.a-trancher {
  font-family: var(--sans);
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.05em 0.4em;
  border: 1px dashed currentColor;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-principal {
  background: var(--validation);
  border-color: var(--validation);
  color: #fff;
}

.btn-principal:hover {
  background: var(--validation-fonce);
  border-color: var(--validation-fonce);
}

.btn-encre {
  background: var(--encre);
  border-color: var(--encre);
  color: #fff;
}

.btn-encre:hover {
  background: #0c1626;
}

.btn-contour {
  background: transparent;
  border-color: var(--encre);
  color: var(--encre);
}

.btn-contour:hover {
  background: var(--marge);
}

@media (max-width: 30rem) {
  .btn {
    width: 100%;
  }
}

/* ---------- Bandeau ---------- */

.bandeau {
  border-bottom: 1px solid var(--trait);
}

.bandeau .wrap {
  display: flex;
  align-items: center;
  min-height: 4rem;
}

.marque {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

/* ---------- En-tête : titre, puis la transformation ---------- */

.entete {
  padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.entete h1 {
  max-width: 20ch;
  font-size: clamp(2.125rem, 1.25rem + 3.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.chapeau {
  max-width: 40ch;
  margin-top: 1.25rem;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  line-height: 1.45;
}

.appel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.appel-note {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--encre-2);
}

.signature {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--encre-2);
}

@media (min-width: 64rem) {
  .entete-texte {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: 4rem;
    align-items: end;
  }

  .chapeau {
    margin-top: 0;
  }
}

.demo {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--trait);
}

.demo-titre {
  margin-bottom: 1.5rem;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
}

/* Trois temps : notes, classement, commentaire.
   Mobile : empilés dans l'ordre. Tablette : notes et classement à gauche, commentaire à droite.
   Ordinateur : trois colonnes, lues de gauche à droite. */
.demo-grille {
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .demo-grille {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas:
      "notes commentaire"
      "classement commentaire";
    gap: 2rem 2.5rem;
    align-items: start;
  }

  .notes { grid-area: notes; }
  .classement { grid-area: classement; }
  .commentaire { grid-area: commentaire; }
}

@media (min-width: 64rem) {
  .demo-grille {
    grid-template-columns: minmax(0, 3fr) minmax(0, 4.5fr) minmax(0, 4.5fr);
    grid-template-areas: "notes classement commentaire";
  }
}

.volet-titre {
  margin-bottom: 0.625rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Les notes : un objet d'interface, tapé vite */
.notes-texte {
  padding: 1.125rem 1.25rem 1.25rem;
  background: var(--marge);
  border: 1px solid var(--trait);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  hyphens: none;
}

.notes-texte::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--encre);
}

/* Le classement : un objet d'interface, deux propositions puis le choix retenu */
.classement {
  hyphens: manual;
}

.classement-options {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.classement-options li {
  padding: 0.875rem 1rem;
  border: 1px solid var(--trait);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
}

.classement-options .chemin {
  font-weight: 600;
}

.classement-options .chemin + p {
  margin-top: 0.25rem;
  color: var(--encre-2);
}

.classement-retenu {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-left: 3px solid var(--validation);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
}

.classement-retenu svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--validation);
}

.classement-retenu p + p {
  margin-top: 0.375rem;
}

.insecable {
  white-space: nowrap;
}

.retenu-statut {
  color: var(--validation);
  font-weight: 600;
}

.classement-legende {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  hyphens: none;
}

/* Le commentaire : un document, un champ unique */
.commentaire-page {
  position: relative;
  padding: 1.5rem 1.25rem 1rem;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-top: 3px solid var(--encre);
}

@media (min-width: 40rem) {
  .commentaire-page {
    padding: 1.75rem 2rem 1.125rem;
  }
}

.commentaire-texte {
  font-size: 1.1875rem;
  line-height: 1.6;
}

.compteur {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--trait);
  font-family: var(--sans);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--encre-2);
  text-align: right;
}

/* La seule animation de la page, au chargement :
   le choix est retenu, puis le commentaire se compose phrase à phrase, puis le compteur s'affiche. */
@media (prefers-reduced-motion: no-preference) {
  .classement-retenu {
    animation: composer 0.5s ease-out 0.2s both;
  }

  .commentaire-page {
    border-top-color: transparent;
  }

  .commentaire-page::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: var(--encre);
    transform-origin: left center;
    animation: tracer 0.6s cubic-bezier(0.3, 0.6, 0.2, 1) 0.5s both;
  }

  .commentaire-texte .phrase {
    animation: apparaitre 0.5s ease-out both;
  }

  .commentaire-texte .phrase:nth-child(1) { animation-delay: 0.8s; }
  .commentaire-texte .phrase:nth-child(2) { animation-delay: 1.1s; }
  .commentaire-texte .phrase:nth-child(3) { animation-delay: 1.4s; }
  .commentaire-texte .phrase:nth-child(4) { animation-delay: 1.7s; }
  .commentaire-texte .phrase:nth-child(5) { animation-delay: 2s; }

  .compteur {
    animation: apparaitre 0.4s ease-out 2.4s both;
  }
}

@keyframes tracer {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes composer {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

@keyframes apparaitre {
  from { opacity: 0; }
  to { opacity: 1; }
}

.demo-action {
  margin-top: 2rem;
}

/* ---------- Blocs ---------- */

.bloc {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--trait);
}

.bloc-marge {
  background: var(--marge);
  border-top: 0;
}

.bloc h2 {
  max-width: 28ch;
  margin-bottom: 1.5rem;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.625rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.bloc h3 {
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Comment ça marche */
.etapes {
  display: grid;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.etape {
  padding-block: 1.5rem;
  border-top: 1px solid var(--trait);
}

.etape-num {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 2.5rem;
  line-height: 1;
}

.etape h3 {
  margin-bottom: 0.625rem;
}

@media (min-width: 56rem) {
  .etapes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  .etape {
    padding-block: 1.5rem 0;
    border-top: 2px solid var(--encre);
  }
}

/* Protection des données */
.engagements {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

.engagement {
  padding-top: 1rem;
  border-top: 2px solid var(--encre);
}

.engagement h3 {
  margin-bottom: 0.5rem;
}

@media (min-width: 48rem) {
  .engagements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 3rem;
  }
}

.independance {
  max-width: 46rem;
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--papier);
  border-left: 4px solid var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.independance p + p {
  margin-top: 0.75rem;
}

.independance strong {
  font-weight: 650;
}

/* Les limites */
.limites {
  max-width: var(--mesure);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.limites li {
  padding-block: 1.25rem;
  border-top: 1px solid var(--trait);
}

.limites li:last-child {
  border-bottom: 1px solid var(--trait);
}

.limites strong {
  font-weight: 600;
}

/* Tarif : un barème, pas des cartes */
.offres {
  margin-top: 2.5rem;
  border-top: 2px solid var(--encre);
  border-bottom: 1px solid var(--trait);
}

.offre {
  display: grid;
  gap: 1rem;
  padding-block: 1.75rem;
}

.offre + .offre {
  border-top: 1px solid var(--trait);
}

.offre .offre-nom {
  display: block;
  font-size: 1.3125rem;
  font-weight: 600;
}

.offre .offre-prix {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
}

.offre-corps > * + * {
  margin-top: 0.75rem;
}

.lancement {
  padding-left: 0.875rem;
  border-left: 3px solid var(--trait);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.offre-action .btn {
  width: 100%;
}

@media (min-width: 56rem) {
  .offre {
    grid-template-columns: 17rem minmax(0, 1fr) 13.5rem;
    gap: 2.5rem;
    padding-block: 2rem;
  }
}

@media (min-width: 30.01rem) and (max-width: 55.99rem) {
  .offre-action .btn {
    width: auto;
  }
}

.unite {
  max-width: var(--mesure);
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
}

.mention-prix {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--encre-2);
}

/* Questions fréquentes */
.questions {
  max-width: 42rem;
  margin-top: 2rem;
}

.question {
  padding-block: 1.5rem;
  border-top: 1px solid var(--trait);
}

.question h3 {
  margin-bottom: 0.5rem;
}

/* Rappel d'action */
.bloc-final {
  border-top: 2px solid var(--encre);
}

.bloc-final p {
  max-width: var(--mesure);
}

.bloc-final .btn {
  margin-top: 1.75rem;
}

/* ---------- Pied de page ---------- */

.pied {
  padding-block: 3rem 3.5rem;
  background: var(--encre);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.pied :focus-visible {
  outline-color: #fff;
}

.pied-identite .marque {
  font-size: 1.375rem;
}

.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.pied-liens a {
  display: inline-block;
  padding-block: 0.25rem;
}

.pied-mention {
  max-width: 44rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

/* ---------- Pages secondaires ---------- */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem);
}

.page h1 {
  max-width: 24ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem);
  line-height: 1.1;
}

.retour {
  margin-bottom: 1.5rem;
  font-family: var(--sans);
  font-size: 1rem;
}

.a-trancher-bloc {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--encre-2);
  font-family: var(--sans);
  font-size: 1.0625rem;
}

.confirmation {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--validation);
  background: var(--marge);
}

.confirmation h1 {
  margin-bottom: 0.5rem;
}

/* Formulaire */
.formulaire {
  margin-top: 2.5rem;
  font-family: var(--sans);
}

.formulaire-note {
  font-size: 1rem;
  color: var(--encre-2);
}

.champ {
  margin-top: 1.5rem;
}

.champ label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.champ .facultatif {
  font-weight: 400;
  color: var(--encre-2);
}

.aide {
  margin: -0.125rem 0 0.5rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--encre-2);
}

.champ input,
.champ textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  background: var(--papier);
  border: 1px solid var(--champ);
  border-radius: 3px;
  color: var(--encre);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.4;
}

.champ input[type="number"] {
  max-width: 8rem;
}

.champ textarea {
  resize: vertical;
}

.champ input:focus-visible,
.champ textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--encre);
}

.formulaire .btn {
  margin-top: 2rem;
}

/* Pages de texte juridique (politique de confidentialité) */
.juridique h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.2;
}

.juridique p + p {
  margin-top: 0.9em;
}

.maj {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--encre-2);
}

.tableau-defilant {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.125rem;
  line-height: 1.5;
}

.tableau th,
.tableau td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-top: 1px solid var(--trait);
  text-align: left;
  vertical-align: top;
}

.tableau thead th {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  border-top: 2px solid var(--encre);
}

.tableau tbody th {
  font-weight: 600;
}

.tableau tbody tr:last-child > * {
  border-bottom: 1px solid var(--trait);
}

/* Déplacé depuis l'attribut style= de /offre-envoyee : la politique de sécurité
   (style-src 'self', sans unsafe-inline) ne l'aurait pas appliqué. Valeur identique. */
.retour-confirmation {
  margin-top: 2rem;
}

/* ===== Étape 6 : essai, achat ===== */

/* Messages d'état. Le vert reste réservé aux confirmations, comme partout ailleurs. */
.avis {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--encre);
  background: var(--marge);
  font-family: var(--sans);
}
.avis-ok {
  border-left-color: var(--validation);
}
.avis p {
  margin-top: 0.5rem;
}
.avis p:first-child {
  margin-top: 0;
}

/* Barème d'achat : un pack par ligne, filets comme au tarif de l'accueil. */
.pack {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--trait);
}
.pack h2 {
  font-size: 1.3125rem;
}
.pack-prix {
  font-family: var(--sans);
  font-size: 1.5rem;
  margin: 0.375rem 0 0.75rem;
}
.pack-prix .prix-standard {
  text-decoration: line-through;
  color: var(--encre-2);
  font-size: 1.0625rem;
  margin-left: 0.5rem;
}

/* Consentement à l'exécution immédiate : jamais préchoché, toujours avant le bouton. */
.consentement {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.consentement input {
  margin-top: 0.3125rem;
  flex: none;
}
