/* ================================================================
   Aadès® — beaucoup de soin pour pas grand-chose
   Encre violette sur papier lavande, un seul éclat (dégradé
   violet→fuchsia) réservé au compteur et au bouton principal.
   Sérif solennelle pour les titres : le site se prend au sérieux.
   ================================================================ */

:root {
  --encre:   #221c3a;
  --sourdine:#6f6a85;
  --fond:    #f7f6fb;
  --carte:   #ffffff;
  --bord:    #e6e3f0;
  --accent:  #5a31f4;
  --accent2: #d926a9;
  --degrade: linear-gradient(115deg, #5a31f4 20%, #d926a9 100%);
  --ok:      #2e7d4f;
  --alerte:  #b45309;
  --erreur:  #b3323a;
  --serif:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent2); }
/* L'adresse email obfusquée ne se coupe pas en fin de ligne. */
.courriel { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------- squelette */

.entete {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  max-width: 1020px; margin: 0 auto; padding: 1.1rem 1.25rem;
}
.logo {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 700;
  color: var(--encre); text-decoration: none; letter-spacing: -0.01em;
}
.logo sup { font-size: 0.55em; color: var(--sourdine); }
/* Aide à la lecture du nom : séparateurs estompés, deuxième « a » minuscule. */
.logo .sep { color: #c4bfd7; }
.logo .a-mini { font-size: 0.45em; }

.nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--encre); font-weight: 500; }
.nav a:hover { color: var(--accent); }

.contenu { max-width: 1020px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }

.pied {
  border-top: 1px solid var(--bord); text-align: center;
  padding: 1.6rem 1.25rem 5.5rem; color: var(--sourdine); font-size: 0.92rem;
}
.pied a { color: var(--sourdine); }

/* ------------------------------------------------------------ hero */

.hero { text-align: center; padding: 3rem 0 2rem; }
.hero.etroit { max-width: 680px; margin: 0 auto; }
.hero.gauche { text-align: left; }

h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.12;
  letter-spacing: -0.015em; margin: 0.4rem 0 0.8rem;
}
h1 .hote { white-space: nowrap; font-style: italic; }

h2 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 0.6rem; }

.surtitre {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin: 0;
}

.pitch { font-size: 1.15rem; color: var(--sourdine); margin: 0 0 1.2rem; }
.grand { font-size: 1.2rem; }
.note { font-size: 0.9rem; color: var(--sourdine); }
.centre { text-align: center; }

/* --------------------------------------------- le compteur (star) */

.compteur {
  display: inline-flex; align-items: center; gap: 1rem;
  margin: 1.4rem auto 1.8rem; padding: 0.9rem 1.6rem;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(34, 28, 58, 0.07); text-align: left;
}
.compteur .chiffre {
  font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700; line-height: 1;
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.compteur .legende { font-size: 0.95rem; line-height: 1.35; }
.compteur .legende em { color: var(--sourdine); font-size: 0.85rem; }

/* --------------------------------------------------------- boutons */

.bouton {
  display: inline-block; padding: 0.65rem 1.4rem;
  border: 1px solid var(--bord); border-radius: 999px;
  background: var(--carte); color: var(--encre);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.bouton:hover { box-shadow: 0 4px 14px rgba(34, 28, 58, 0.12); color: var(--encre); }
.bouton:active { transform: translateY(1px); }
.bouton.principal { background: var(--degrade); border: none; color: #fff; }
.bouton.principal:hover { color: #fff; filter: saturate(1.15); }
.bouton.petit { padding: 0.4rem 0.95rem; font-size: 0.92rem; }
.bouton.large { padding: 0.8rem 2rem; font-size: 1.05rem; }

.cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 0.8rem; }

/* ---------------------------------------------------------- cartes */

.cartes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem; margin: 2rem 0;
}
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: 16px;
  padding: 1.4rem 1.5rem; margin: 1.1rem 0; text-align: left;
}
.cartes .carte { margin: 0; }
.carte h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.carte p:last-child { margin-bottom: 0; }
.carte.ok        { border-left: 5px solid var(--ok); }
.carte.attention { border-left: 5px solid var(--alerte); }
.carte.pleine    { text-align: left; }

.bloc-tchat { margin: 2rem 0; }

.temoignages h2 { text-align: center; font-size: 1.6rem; }
.temoignage { margin: 0; }
.temoignage blockquote { margin: 0 0 0.7rem; font-family: var(--serif); font-size: 1.08rem; }
.temoignage figcaption { color: var(--sourdine); font-size: 0.92rem; }

.prose h2 { margin-top: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose hr { border: none; border-top: 1px dashed var(--bord); margin: 2rem 0; }

.badge-legal, .badge-facultatif {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3em 0.7em;
  border-radius: 8px; margin-bottom: 0.5rem;
}
.badge-legal      { background: #eef9f1; color: var(--ok); border: 1px solid #bfe6cc; }
.badge-facultatif { background: #f4f0ff; color: var(--accent); border: 1px solid var(--bord); }

/* ------------------------------------------------------ formulaires */

.formulaire { text-align: left; }
.formulaire form { margin: 1rem 0 0.6rem; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; }

.champ {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--bord);
  border-radius: 10px; font: inherit; background: #fff; color: var(--encre); margin-bottom: 1rem;
}
.champ:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.mono { font-family: var(--mono); letter-spacing: 0.05em; }

.case { display: flex; gap: 0.6rem; align-items: baseline; font-weight: 400; margin-bottom: 1.2rem; }
.case input { transform: translateY(2px); }

.ligne-copie { display: flex; gap: 0.6rem; align-items: stretch; flex-wrap: wrap; }
.ligne-copie .champ { flex: 1 1 240px; margin-bottom: 0; }
.ligne-copie + .ligne-copie { margin-top: 0.5rem; }
/* Les liens d'invitation sont longs : écrits plus petit pour se voir en entier. */
.ligne-copie .champ.mono { font-size: 0.78rem; letter-spacing: 0; }
.gen-invitation { margin: 0.9rem 0; }

.cle {
  font-family: var(--mono); font-size: clamp(1.15rem, 3.4vw, 1.6rem); letter-spacing: 0.12em;
  text-align: center; padding: 1rem; margin: 1rem 0; border: 2px dashed var(--accent);
  border-radius: 12px; background: #f4f0ff; user-select: all; overflow-wrap: anywhere;
}
.avertissement {
  background: #fff7e8; border: 1px solid #f0dbb0; border-radius: 10px;
  padding: 0.8rem 1rem; font-size: 0.95rem;
}
.erreur {
  background: #fdeeee; border: 1px solid #efc6c8; color: var(--erreur);
  border-radius: 10px; padding: 0.8rem 1rem;
}
.flash {
  background: #eef9f1; border: 1px solid #bfe6cc; color: var(--ok);
  border-radius: 12px; padding: 0.8rem 1.1rem; margin: 0.8rem 0; text-align: center;
}
.serment { color: var(--ok); font-weight: 600; }

/* --------------------------------------------------- tchat IA */

.tchat { margin-top: 1.2rem; }
.tchat-fil {
  display: flex; flex-direction: column; gap: 0.8rem; padding: 1rem;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 16px;
  min-height: 220px; max-height: 56vh; overflow-y: auto;
}
.bulle { max-width: 85%; padding: 0.7rem 0.95rem; border-radius: 14px; line-height: 1.5; }
.bulle-qui {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--sourdine); margin-bottom: 0.25rem;
}
.bulle.ia  { align-self: flex-start; background: #f2effc; border: 1px solid var(--bord); border-bottom-left-radius: 4px; }
.bulle.moi { align-self: flex-end; background: var(--degrade); color: #fff; border-bottom-right-radius: 4px; }
.bulle.moi .bulle-qui { color: rgba(255,255,255,0.85); }
.bulle-txt p { margin: 0.4rem 0; }
.bulle-txt p:first-child { margin-top: 0; }
.bulle-txt p:last-child { margin-bottom: 0; }

.points { display: inline-flex; gap: 4px; padding: 0.15rem 0; }
.points span { width: 7px; height: 7px; border-radius: 50%; background: var(--sourdine); animation: clignote 1s infinite; }
.points span:nth-child(2) { animation-delay: 0.2s; }
.points span:nth-child(3) { animation-delay: 0.4s; }
@keyframes clignote { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.recette {
  margin-top: 0.6rem; padding: 0.8rem 1rem; background: #fff;
  border: 1px solid var(--bord); border-radius: 12px;
}
.recette h3 { margin: 0 0 0.3rem; }
.recette-meta { color: var(--sourdine); font-size: 0.85rem; margin: 0.2rem 0 0.6rem; }
.recette ol { margin: 0.4rem 0 0.4rem 1.1rem; padding: 0; }
.recette li { margin: 0.35rem 0; }
.recette-fin { font-style: italic; color: var(--sourdine); }

.tchat-suggest { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.puce {
  border: 1px solid var(--bord); background: var(--carte); border-radius: 999px;
  padding: 0.35rem 0.8rem; font: inherit; font-size: 0.9rem; cursor: pointer; color: var(--encre);
}
.puce:hover { border-color: var(--accent); color: var(--accent); }

.tchat-saisie { display: flex; gap: 0.6rem; }
.tchat-saisie .champ { margin-bottom: 0; flex: 1; }

/* ------------------------------------------------- bandeau cookie */

/* Par-dessus le site (sans décaler le contenu), fond sombre : impossible
   de le confondre avec la page. Un vrai bandeau de consentement, quoi. */
.bandeau {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  max-height: 92vh; overflow-y: auto;
  background: var(--encre); color: #f3f1fa;
  border-bottom: 4px solid var(--accent2);
  box-shadow: 0 24px 60px rgba(24, 18, 46, 0.5);
}
.bandeau-inner { max-width: 1020px; margin: 0 auto; padding: 1.7rem 1.25rem; }
.b-tete { display: flex; gap: 1rem; align-items: flex-start; }
.b-emoji { font-size: 2.4rem; line-height: 1; flex: 0 0 auto; }
.b-titre { font-family: var(--serif); font-size: clamp(1.3rem, 3.5vw, 1.7rem); margin: 0 0 0.5rem; }
.b-texte { margin: 0; font-size: 1rem; }
.bandeau code { font-family: var(--mono); background: rgba(255, 255, 255, 0.14); padding: 0.1em 0.35em; border-radius: 6px; }

.b-details { margin: 0.3rem 0 0.8rem; }
.b-details summary { cursor: pointer; font-weight: 600; color: #c9b6ff; padding: 0.2rem 0; }
.b-avert { font-size: 0.82rem; color: #b6b0cc; margin: 0.5rem 0; }

.modules { list-style: none; margin: 0.6rem 0; padding: 0; max-height: 42vh; overflow-y: auto; }
.module {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.5rem 0.2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.module:last-child { border-bottom: none; }
.module-txt { display: flex; flex-direction: column; }
.module-nom { font-weight: 600; font-size: 0.95rem; }
.module-desc { color: #b6b0cc; font-size: 0.85rem; }
.chip {
  display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #d9ccff; background: rgba(255, 255, 255, 0.14);
  border-radius: 6px; padding: 0.05em 0.45em; vertical-align: middle;
}

.bascule { position: relative; display: inline-flex; flex: 0 0 auto; margin-top: 0.1rem; }
.bascule input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.piste {
  width: 44px; height: 24px; border-radius: 999px; background: #4c4568;
  position: relative; transition: background 0.15s;
}
.piste::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.bascule input:checked + .piste { background: var(--accent); }
.bascule input:checked + .piste::after { transform: translateX(20px); }
.bascule input:focus-visible + .piste { outline: 3px solid var(--accent); outline-offset: 2px; }

.b-boutons { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Le bouton « Tout refuser » : il s'esquive puis revient, sans jamais fermer. */
#b-refuser { transition: opacity 0.18s ease, transform 0.18s ease; }
#b-refuser.parti { opacity: 0; transform: scale(0.7); pointer-events: none; }

/* --------------------------------------------- popup offre (modal) */

.voile-modal {
  position: fixed; inset: 0; background: rgba(24, 18, 46, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 100;
}
/* display:flex ci-dessus écraserait l'attribut hidden : on le rétablit. */
.voile-modal[hidden] { display: none; }
.modal {
  position: relative; background: var(--carte); border-radius: 20px; max-width: 440px;
  width: 100%; padding: 2.2rem 1.8rem 1.8rem; text-align: center;
  box-shadow: 0 24px 70px rgba(24, 18, 46, 0.35);
}
.modal h2 { font-size: 1.35rem; margin: 0.4rem 0 0.6rem; }
.modal .bouton { margin-top: 0.4rem; }
.fermer {
  position: absolute; top: 0.6rem; right: 0.8rem; border: none; background: none;
  font-size: 1.6rem; line-height: 1; color: var(--sourdine); cursor: pointer;
}
.compte-a-rebours {
  font-family: var(--mono); font-size: 3rem; font-weight: 700; letter-spacing: 0.08em;
  margin: 0.4rem 0; background: var(--degrade);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --------------------------------------------------------- confetti */

.confetti {
  position: fixed; top: -3rem; font-size: 1.6rem; z-index: 200; pointer-events: none;
  animation: chute 1.8s linear forwards;
}
@keyframes chute { to { transform: translateY(110vh) rotate(340deg); opacity: 0.6; } }

/* ------------------------------------- secret : attente pleine d'espoir */

.file { margin: 1.4rem 0; text-align: left; }
.file-label { font-weight: 600; margin-bottom: 0.4rem; }
.barre {
  height: 14px; background: #ece6fb; border-radius: 999px;
  overflow: hidden; border: 1px solid var(--bord);
}
.barre span { display: block; height: 100%; background: var(--degrade); }
.laius { text-align: left; }

/* ---------------------------------------------- mentions : page fleuve */

.note-legal {
  font-size: 0.82rem; color: var(--sourdine); font-style: italic;
  border-left: 3px solid var(--bord); padding-left: 0.7rem; margin: 1.2rem 0;
}
.sommaire { columns: 2; -webkit-columns: 2; gap: 1.4rem; margin: 0.6rem 0 0.4rem 1.1rem; }
.sommaire li { break-inside: avoid; }
@media (max-width: 560px) { .sommaire { columns: 1; -webkit-columns: 1; } }

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .bouton { transition: none; }
  .points span { animation: none; }
}
