/* ==========================================================================
   OpenRAG — openrag.ca · feuille de style de la page de lancement
   Identité provisoire : encre bleu nuit, ivoire, accent ambre.
   Aucune ressource externe (polices système, SVG en ligne) — zéro tiers.
   ========================================================================== */

:root {
  --encre: #0C1A29;          /* bleu nuit — sections sombres */
  --encre-2: #122539;
  --ivoire: #F6F4EE;         /* sections claires chaudes */
  --papier: #FFFFFF;
  --ambre: #E8A33D;          /* accent principal */
  --ambre-vif: #F2B457;
  --ambre-pale: #FBF0DC;
  --ardoise: #46566A;        /* texte secondaire sur fond clair */
  --brume: #AEBBC9;          /* texte secondaire sur fond sombre */
  --vert: #2F7D5B;
  --rouge: #B3423A;
  --ligne: rgba(12, 26, 41, 0.12);
  --ligne-sombre: rgba(255, 255, 255, 0.14);

  --police-titre: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --police-texte: 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: 14px;
  --largeur: 1080px;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: inherit; }

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

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

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

.bouton {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

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

.bouton-ambre { background: var(--ambre); color: var(--encre); }
.bouton-ambre:hover { background: var(--ambre-vif); }

.bouton-encre { background: var(--encre); color: var(--papier); }
.bouton-encre:hover { background: var(--encre-2); }

.bouton-contour { border-color: var(--ligne-sombre); color: var(--papier); }
.bouton-contour:hover { border-color: var(--ambre); color: var(--ambre-vif); }

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

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 26, 41, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ligne-sombre);
  color: var(--papier);
}

.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(--ambre);
}

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

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

.entete-nav a {
  text-decoration: none;
  color: var(--brume);
  transition: color 0.12s ease;
}

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

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

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

/* --------------------------------------------------------------------------
   Héros
   -------------------------------------------------------------------------- */

.heros {
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(232, 163, 61, 0.14), transparent 60%),
    linear-gradient(180deg, var(--encre) 0%, var(--encre-2) 100%);
  color: var(--papier);
  padding: 110px 0 90px;
  text-align: center;
}

.heros-surtitre {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ambre-vif);
  margin-bottom: 22px;
}

.heros h1 {
  font-size: clamp(38px, 6vw, 62px);
  margin-bottom: 24px;
}

.heros-lead {
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--brume);
}

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

.heros-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.heros-garanties {
  display: flex;
  justify-content: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  list-style: none;
  font-size: 14.5px;
  color: var(--brume);
}

.heros-garanties li { display: flex; align-items: center; gap: 8px; }
.heros-garanties li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ambre);
  flex: none;
}

/* --------------------------------------------------------------------------
   Sections génériques
   -------------------------------------------------------------------------- */

.section { padding: 88px 0; }

.section-claire { background: var(--papier); }
.section-ivoire { background: var(--ivoire); }
.section-sombre {
  background: linear-gradient(180deg, var(--encre-2), var(--encre));
  color: var(--papier);
}
.section-ambre { background: var(--ambre-pale); }

.section-etiquette {
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #B07817;
  margin-bottom: 12px;
  font-weight: 600;
}

.section-sombre .section-etiquette { color: var(--ambre-vif); }

.section h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 18px;
}

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

.section-sombre .section-intro { color: var(--brume); }

/* --------------------------------------------------------------------------
   Grilles et cartes
   -------------------------------------------------------------------------- */

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

.grille-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

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

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

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

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

/* Paliers */

.palier { display: flex; flex-direction: column; }

.palier-numero {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #B07817;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.palier .etiquette-etat {
  margin-top: auto;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ivoire);
  color: var(--ardoise);
  border: 1px solid var(--ligne);
}

.palier .etiquete-mvp {
  background: var(--ambre-pale);
  color: #8A5B0E;
  border-color: rgba(232, 163, 61, 0.5);
}

.palier-fort {
  border-color: rgba(232, 163, 61, 0.55);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.25), 0 16px 40px -22px rgba(232, 163, 61, 0.5);
}

/* Listes à fonctions / avantages */

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

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

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

.liste-fonctions li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ambre);
  font-weight: 700;
}

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

/* --------------------------------------------------------------------------
   Feuille de route
   -------------------------------------------------------------------------- */

.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-sombre);
  padding-top: 20px;
  position: relative;
  counter-increment: etape;
}

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

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

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

/* --------------------------------------------------------------------------
   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 0.12s ease;
}

.faq details[open] { border-color: rgba(232, 163, 61, 0.6); }

.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(--ambre);
  font-weight: 400;
  transition: transform 0.15s ease;
}

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

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

/* --------------------------------------------------------------------------
   Formulaire
   -------------------------------------------------------------------------- */

.formulaire-section { padding-bottom: 100px; }

.confirmation {
  border: 1px solid rgba(47, 125, 91, 0.55);
  background: rgba(47, 125, 91, 0.12);
  color: #9FDBBE;
  border-radius: var(--rayon);
  padding: 16px 20px;
  margin-bottom: 26px;
  font-size: 16px;
}

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

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ligne-sombre);
  border-radius: var(--rayon);
  padding: 30px;
}

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

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

.formulaire input[type="email"],
.formulaire input[type="text"],
.formulaire textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--ligne-sombre);
  background: rgba(12, 26, 41, 0.55);
  color: var(--papier);
  font-family: var(--police-texte);
  font-size: 16px;
}

.formulaire input::placeholder, .formulaire textarea::placeholder { color: #6E7F92; }

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

.formulaire textarea { resize: vertical; }

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

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

fieldset.champ { border: none; }

.choix {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  color: var(--brume);
  cursor: pointer;
  margin-bottom: 10px;
  font-weight: 400;
}

.choix input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ambre);
  flex: none;
}

.choix-consentement {
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--brume);
}

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

.note-privee {
  margin-top: 22px;
  font-size: 14px;
  color: var(--brume);
  text-align: center;
}

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

.pied {
  background: var(--encre);
  color: var(--brume);
  border-top: 1px solid var(--ligne-sombre);
  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(--police-titre);
  font-size: 18px;
  color: var(--papier);
}

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

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

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

/* ==========================================================================
   Animations & finitions — selon les skills animate / find-animation-opportunities
   (Emil Kowalski : la retenue d'abord) et impeccable (un moment focal, pas
   du décor partout). transform et opacity uniquement, courbes des tokens,
   reduced-motion « plus sobre, pas zéro ». Sans JavaScript, tout reste visible.
   ========================================================================== */

/* Apparition à l'arrivée dans la fenêtre — feux une seule fois */
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);
}

/* Moment focal : l'entrée réglée du héros au chargement (marketing —
   fenêtre 500-800 ms selon impeccable) */
@keyframes montee {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.heros-surtitre, .heros h1, .heros-lead,
.heros-actions, .heros-garanties {
  animation: montee 0.7s var(--ease-out) both;
}

.heros-surtitre  { animation-delay: 0.05s; }
.heros h1        { animation-delay: 0.16s; }
.heros-lead      { animation-delay: 0.32s; }
.heros-actions   { animation-delay: 0.48s; }
.heros-garanties { animation-delay: 0.62s; }

/* En-tête : ombre au défilement (transition douce), soulignement des liens
   par transform — jamais `right`/`left` (propriétés de layout) */
.entete { transition: box-shadow 200ms ease; }
.entete.defile { box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.55); }

.entete-nav a { position: relative; }

.entete-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--ambre);
  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); }

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

/* Retour de pression sur tous les boutons — feedback 160 ms */
.bouton {
  transition: transform 160ms var(--ease-out),
              background-color 160ms ease,
              border-color 160ms ease,
              color 160ms ease;
}

.bouton:active { transform: scale(0.97); }

/* Survol des cartes — appareils à pointeur fin uniquement ;
   transform + bordure, pas d'ombre animée */
@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(232, 163, 61, 0.55);
  }

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

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

/* Halo respirant de la node souveraine : l'ombre est statique sur ::before,
   seule l'OPACITÉ s'anime (jamais box-shadow) */
.palier-fort { position: relative; }

.palier-fort::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.5),
              0 20px 48px -16px rgba(232, 163, 61, 0.7);
  opacity: 0.2;
  animation: halo 6s ease-in-out infinite;
}

@keyframes halo {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 0.9; }
}

/* FAQ : hauteur + opacité via ::details-content (transition, pas de
   keyframes sur un toggle) — dégradation gracieuse sinon */
.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;
}

/* Bannière de confirmation du formulaire (événement rare — keyframes ok) */
@keyframes glisse {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

html.js .confirmation { animation: glisse 0.4s var(--ease-out) both; }

/* Ancrages : ne pas atterrir sous l'en-tête collant */
section[id] { scroll-margin-top: 84px; }

/* Sélection et focus clavier */
::selection { background: var(--ambre); color: var(--encre); }

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

/* « Mouvement réduit » : plus sobre, pas zéro — on retire le déplacement
   et les boucles, on garde les transitions d'état (opacité/couleur) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .heros-surtitre, .heros h1, .heros-lead,
  .heros-actions, .heros-garanties { animation: none; }

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

  .palier-fort::before { animation: none; opacity: 0.45; }

  html.js .confirmation { animation: none; }

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