/* ==========================================================================
   OpenRAG — openrag.ca · feuille de style
   Direction « B. Papier souverain » : crème + encre bleu + cobalt,
   serif documentaire (Source Serif 4 auto-hébergée), un seul thème clair
   verrouillé (Page Theme Lock), un seul accent (Color Consistency Lock),
   coins quasi nets (Shape Lock). Zéro ressource externe à l'exécution.
   ========================================================================== */

/* Source Serif 4 — auto-hébergée (sous-ensemble latin, couvre le français) */
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --papier: #FBFAF7;         /* fond principal */
  --creme: #F7F4EC;          /* teinte alternée, même famille (thème verrouillé) */
  --sable: #E4DCC9;          /* teinte profonde de la même famille */
  --encre: #14263D;          /* texte */
  --ardoise: #5B6B80;        /* texte secondaire */
  --cobalt: #1B4ACB;         /* accent unique, verrouillé */
  --cobalt-profond: #16399F;
  --cobalt-pale: #E8EDFA;
  --ligne: rgba(20, 38, 61, 0.16);
  --ligne-forte: rgba(20, 38, 61, 0.32);

  --vert: #2F7D5B;
  --rouge: #B3423A;

  --serif: "Source Serif 4", Charter, "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Courbes de mouvement — vocabulaire partagé (skill animate) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --rayon: 10px;             /* Shape Lock : quasi net partout */
  --rayon-champ: 8px;
  --largeur: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.conteneur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 24px;
}

.conteneur.etroite { max-width: 780px; }

/* --------------------------------------------------------------------------
   Boutons — coins nets (Shape Lock), retour de pression 160 ms
   -------------------------------------------------------------------------- */

.bouton {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--rayon-champ);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out),
              background-color 160ms ease,
              border-color 160ms ease,
              color 160ms ease;
}

.bouton:hover { transform: translateY(-1px); }
.bouton:active { transform: scale(0.97); }

.bouton-accent { background: var(--cobalt); color: var(--creme); }
.bouton-accent:hover { background: var(--cobalt-profond); }

.bouton-encre { background: var(--encre); color: var(--creme); }
.bouton-encre:hover { background: #1D3450; }

.bouton-creme { background: var(--creme); color: var(--cobalt-profond); }
.bouton-creme:hover { background: #FFFFFF; }

.bouton-contour { border-color: var(--ligne-forte); color: var(--encre); }
.bouton-contour:hover { border-color: var(--cobalt); color: var(--cobalt-profond); }

.bouton-petit { padding: 9px 18px; font-size: 15px; }
.bouton-grand { width: 100%; font-size: 17px; }

/* --------------------------------------------------------------------------
   En-tête — clair, un trait de séparation, ombre au défilement
   -------------------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ligne);
  transition: box-shadow 200ms ease;
}

.entete.defile { box-shadow: 0 12px 32px -22px rgba(20, 38, 61, 0.35); }

.entete-interieur {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.marque {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--encre);
}

.marque-symbole { color: var(--encre); transition: transform 180ms var(--ease-out); }

.marque-nom {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.entete-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.entete-nav a {
  text-decoration: none;
  color: var(--ardoise);
  position: relative;
  transition: color 140ms ease;
}

.entete-nav a:hover { color: var(--encre); }

.entete-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

.entete-nav a:hover::after,
.entete-nav a:focus-visible::after { transform: scaleX(1); }

.entete .bouton { margin-left: 8px; }

@media (max-width: 860px) {
  .entete-nav { display: none; }
  .entete .bouton { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   Héros — fente asymétrique : texte à gauche, document sous clef à droite.
   Crème, comme toute la page (thème verrouillé).
   -------------------------------------------------------------------------- */

.heros { background: var(--creme); border-bottom: 1px solid var(--ligne); }

.heros-fente {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

@media (max-width: 880px) {
  .heros-fente { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
}

.heros-surtitre {
  font-size: 14px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cobalt-profond);
  font-weight: 600;
  margin-bottom: 18px;
}

.heros h1 {
  font-size: clamp(31px, 3.4vw, 38px);
  margin-bottom: 20px;
}

.heros-lead {
  max-width: 52ch;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--ardoise);
  margin-bottom: 30px;
}

.heros-lead strong { color: var(--encre); font-weight: 600; }

.heros-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.heros-image {
  border-radius: var(--rayon);
  overflow: hidden;
  border: 1px solid var(--ligne);
  box-shadow: 0 24px 48px -32px rgba(20, 38, 61, 0.45);
}

.heros-image img { display: block; width: 100%; height: auto; }

/* Héros minimal du portail (centré, sans image) */
.heros-minimal { text-align: center; padding: 84px 24px 72px; }
.heros-minimal h1 { font-size: clamp(34px, 4.6vw, 48px); }
.heros-minimal .marque-symbole { margin-bottom: 18px; }
.heros-minimal .heros-surtitre { margin-top: 14px; margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Sections — une seule famille claire : papier / crème (thème verrouillé)
   -------------------------------------------------------------------------- */

.section { padding: 84px 0; }

.section-papier { background: var(--papier); }
.section-creme { background: var(--creme); }

/* Le bloc de couleur unique de la page (conversion) */
.section-cobalt {
  background: var(--cobalt);
  color: var(--creme);
}

.section h2 {
  font-size: clamp(27px, 3.6vw, 38px);
  margin-bottom: 18px;
}

.section-intro {
  max-width: 66ch;
  font-size: 18px;
  color: var(--ardoise);
  margin-bottom: 44px;
}

.section-cobalt .section-intro { color: rgba(247, 244, 236, 0.82); }

/* --------------------------------------------------------------------------
   Constat : composition asymétrique (pas trois cartes égales)
   -------------------------------------------------------------------------- */

.constat-grille {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 880px) {
  .constat-grille { grid-template-columns: 1fr; }
}

.constat-anchor {
  border-left: 3px solid var(--cobalt);
  padding: 8px 0 8px 28px;
}

.constat-anchor h3 {
  font-size: clamp(23px, 2.8vw, 30px);
  margin-bottom: 12px;
}

.constat-anchor p { color: var(--ardoise); max-width: 54ch; }

.constat-colonne {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.constat-item { padding-top: 4px; }

.constat-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.constat-item p { color: var(--ardoise); font-size: 16px; }

/* --------------------------------------------------------------------------
   Solution : deux colonnes de fonctions (listes, pas de cartes)
   -------------------------------------------------------------------------- */

.grille-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 880px) {
  .grille-2 { grid-template-columns: 1fr; }
}

.liste-fonctions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.liste-fonctions li {
  padding-left: 30px;
  position: relative;
  color: var(--ardoise);
}

.liste-fonctions strong { color: var(--encre); }

.liste-fonctions li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 14px;
  height: 2px;
  background: var(--cobalt);
}

.liste-avantages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 32px;
  font-size: 17.5px;
}

/* --------------------------------------------------------------------------
   Paliers : rangées verticales, le visuel s'épaissit avec la souveraineté
   (texte seul, puis coffre-fort, puis enclave) — pas de cartes égales
   -------------------------------------------------------------------------- */

.paliers-liste {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ligne);
}

.palier-rangee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--ligne);
}

@media (max-width: 880px) {
  .palier-rangee { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .palier-rangee .palier-image { order: -1; }
}

.palier-numero {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-profond);
  font-weight: 700;
  margin-bottom: 8px;
}

.palier-rangee h3 {
  font-size: clamp(23px, 2.8vw, 29px);
  margin-bottom: 4px;
}

.palier-slogan {
  font-style: italic;
  color: var(--ardoise);
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 17px;
}

.palier-rangee > div > p:not(.palier-numero):not(.palier-slogan) {
  color: var(--ardoise);
  max-width: 52ch;
}

.palier-rangee .etiquette-etat { margin-top: 18px; }

.etiquette-etat {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--rayon-champ);
  background: var(--creme);
  color: var(--ardoise);
  border: 1px solid var(--ligne);
}

.etiquette-mvp {
  background: var(--cobalt-pale);
  color: var(--cobalt-profond);
  border-color: rgba(27, 74, 203, 0.35);
}

.palier-image {
  border-radius: var(--rayon);
  overflow: hidden;
  border: 1px solid var(--ligne);
  box-shadow: 0 24px 48px -34px rgba(20, 38, 61, 0.45);
}

.palier-image img { display: block; width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Feuille de route : quatre étapes horizontales
   -------------------------------------------------------------------------- */

.etapes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: etape;
}

@media (max-width: 980px) {
  .etapes { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .etapes { grid-template-columns: 1fr; }
}

.etapes li {
  border-top: 2px solid var(--ligne-forte);
  padding-top: 20px;
  position: relative;
  counter-increment: etape;
}

.etapes li::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 15px;
  color: var(--cobalt-profond);
  position: absolute;
  top: -2px;
  right: 0;
  letter-spacing: 0.06em;
}

.etape-ou {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-profond);
  font-weight: 700;
  margin-bottom: 8px;
}

.etapes h3 { font-size: 20px; margin-bottom: 8px; }
.etapes p { color: var(--ardoise); font-size: 15.5px; }

.section-cobalt .etapes li { border-top-color: rgba(247, 244, 236, 0.4); }
.section-cobalt .etape-ou,
.section-cobalt .etapes li::before { color: rgba(247, 244, 236, 0.85); }
.section-cobalt .etapes p { color: rgba(247, 244, 236, 0.82); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { display: flex; flex-direction: column; gap: 14px; }

.faq details {
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  background: var(--papier);
  padding: 4px 22px;
  transition: border-color 140ms ease;
}

.faq details[open] { border-color: rgba(27, 74, 203, 0.5); }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  padding: 15px 0;
  list-style: none;
  position: relative;
  padding-right: 34px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--cobalt);
  font-weight: 400;
  transition: transform 160ms var(--ease-out);
}

.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq details p {
  color: var(--ardoise);
  padding: 0 0 18px;
  max-width: 640px;
}

.faq details::details-content {
  opacity: 0;
  block-size: 0;
  overflow: clip;
  transition: opacity 200ms var(--ease-out),
              block-size 200ms var(--ease-out),
              content-visibility 200ms allow-discrete;
}

.faq details[open]::details-content {
  opacity: 1;
  block-size: auto;
}

/* --------------------------------------------------------------------------
   Cartes (portail : accès + contact) et formulaires
   -------------------------------------------------------------------------- */

.carte {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  padding: 28px;
}

.carte h3 {
  font-size: 21px;
  margin-bottom: 10px;
}

.carte > p { color: var(--ardoise); font-size: 16px; }

@media (hover: hover) and (pointer: fine) {
  .carte {
    transition: transform 180ms var(--ease-out),
                border-color 180ms ease;
  }

  .carte:hover {
    transform: translateY(-4px);
    border-color: rgba(27, 74, 203, 0.45);
  }

  .marque:hover .marque-symbole,
  .pied-marque:hover svg { transform: translateY(-2px); }

  .pied-marque svg { transition: transform 180ms var(--ease-out); }
}

.confirmation {
  border: 1px solid rgba(47, 125, 91, 0.55);
  background: rgba(47, 125, 91, 0.1);
  color: #1F5C42;
  border-radius: var(--rayon);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 15.5px;
}

.confirmation-erreur {
  border-color: rgba(179, 66, 58, 0.6);
  background: rgba(179, 66, 58, 0.09);
  color: #8F3830;
}

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.champ label {
  display: block;
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 8px;
}

.champ span[aria-hidden] { color: var(--cobalt); }
.facultatif { font-weight: 400; color: var(--ardoise); font-size: 14px; }

.formulaire input[type="email"],
.formulaire input[type="text"],
.formulaire input[type="password"],
.formulaire textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--rayon-champ);
  border: 1px solid var(--ligne-forte);
  background: #FFFFFF;
  color: var(--encre);
  font-family: var(--sans);
  font-size: 16px;
}

.formulaire input::placeholder, .formulaire textarea::placeholder { color: #8494A6; }

.formulaire input:focus, .formulaire textarea:focus {
  outline: 2px solid var(--cobalt);
  outline-offset: 1px;
  border-color: transparent;
}

.formulaire textarea { resize: vertical; }

.pot-de-miel {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.note-privee {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ardoise);
}

/* --------------------------------------------------------------------------
   Pied de page — clair, un trait, même famille (thème verrouillé)
   -------------------------------------------------------------------------- */

.pied {
  background: var(--creme);
  color: var(--ardoise);
  border-top: 1px solid var(--ligne);
  padding: 40px 0;
  font-size: 14.5px;
}

.pied-interieur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pied-marque {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--encre);
}

.pied-colonnes p { margin: 3px 0; }

.fleur {
  display: inline-block;
  vertical-align: -2px;
  margin-left: 7px;
}

.pied a { color: var(--cobalt-profond); text-decoration: none; }
.pied a:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .pied-interieur { flex-direction: column; text-align: center; }
}

/* --------------------------------------------------------------------------
   Animations — motion 2/10 : sobre. transform et opacity uniquement,
   reduced-motion « plus sobre, pas zéro ». Sans JS, tout reste visible.
   ========================================================================== */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

html.js .reveal.revele {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease-in-out),
              transform 600ms var(--ease-in-out);
  transition-delay: var(--delai, 0ms);
}

section[id] { scroll-margin-top: 84px; }

::selection { background: var(--cobalt); color: var(--creme); }

a:focus-visible, button:focus-visible, summary:focus-visible,
.choix:focus-within {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html.js .reveal { opacity: 1; transform: none; transition: none; }

  .entete-nav a::after,
  .faq details::details-content { transition: none; }
}
