/* vitrine.css — habillage des pages publiques de FloraLingua.
 *
 * Les valeurs reprennent EXACTEMENT celles de l'application (lib/core/theme)
 * pour que le site et l'app se ressemblent : un visiteur qui installe ne doit
 * pas avoir l'impression de changer d'univers.
 */

/* ─── Polices auto-hébergées (OFL ; licences à côté des .ttf) ─────────────── */
@font-face {
  font-family: 'Fredoka';
  src: url('Fredoka-VariableFont.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('Nunito-VariableFont.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --vert: #4CAF50;          /* AppColors.gardenGreen */
  --vert-fonce: #2E7D32;    /* AppColors.successGreen */
  --vert-clair: #A5D6A7;    /* AppColors.lightGreen */
  --neige: #FAFFF4;         /* AppColors.snowWhite */
  --nuit: #1A2332;          /* AppColors.nightBlue */
  --soleil: #FFD700;        /* AppColors.sunYellow */
  --terre: #D2691E;         /* AppColors.earthBrown */
  --rose: #FFB7C5;          /* AppColors.petalPink */
  --violet: #7B1FA2;        /* AppColors.premiumPurple */
  --gris: #5d6b63;
  --ligne: #e2ece3;
  --ombre: 0 6px 20px rgba(46, 125, 50, .12);
  --ombre-forte: 0 12px 32px rgba(46, 125, 50, .18);
  --rayon: 20px;
  --largeur: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--neige);
  color: var(--nuit);
  font: 400 17px/1.65 Nunito, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Fredoka, Nunito, system-ui, sans-serif; font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; font-family: Nunito, sans-serif; font-weight: 800; }
p { margin: 0 0 1rem; }
a { color: var(--vert-fonce); }

/* Lien d'évitement : invisible jusqu'au focus clavier. */
.saut-contenu {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: #fff; color: var(--vert-fonce); padding: 12px 18px; border-radius: 0 0 12px 0;
  font-weight: 700;
}
.saut-contenu:focus { left: 0; }

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

/* ─── Bandeau d'en-tête (dégradé du splash de l'app) ─────────────────────── */
.heros {
  background: linear-gradient(180deg, #63AD1A 0%, #52960F 45%, #3B7509 100%);
  color: #fff;
  padding: 56px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.heros::after { /* liseré de terre, comme la bande de sol du jardin */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(90deg, #8d5524, #a9661f, #8d5524);
  opacity: .55;
}
/* Sélecteur de langue à drapeaux, en haut à droite du bandeau (<details> natif). */
.choix-drapeau { position: absolute; top: 14px; right: 16px; z-index: 5; text-align: left; }
.choix-drapeau summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px; padding: 6px 12px;
  color: #fff; font-size: 1.35rem; line-height: 1;
}
.choix-drapeau summary::-webkit-details-marker { display: none; }
.choix-drapeau summary:hover, .choix-drapeau[open] summary { background: rgba(255, 255, 255, .3); }
.choix-drapeau summary:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; }
.choix-drapeau .chevron { font-size: .8rem; }
.choix-drapeau ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 11.5rem;
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 14px; box-shadow: var(--ombre-forte);
}
.choix-drapeau li a, .choix-drapeau li .ici {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--nuit); text-decoration: none; font-weight: 700;
}
.choix-drapeau li a:hover, .choix-drapeau li a:focus-visible { background: var(--neige); color: var(--vert-fonce); }
.choix-drapeau li .ici { background: var(--ligne); color: var(--vert-fonce); font-weight: 800; }

.heros-icone {
  width: clamp(132px, 30vw, 196px); height: clamp(132px, 30vw, 196px);
  border-radius: 22%;
  background: #fff;
  display: block; margin: 0 auto 22px;
  box-shadow: 0 0 36px 8px rgba(250, 255, 244, .45), 0 10px 26px rgba(0, 0, 0, .22);
  animation: pousse 700ms cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes pousse { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.heros h1 { text-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.heros .signature {
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  max-width: 32ch; margin: 10px auto 0;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.puce-store {
  display: inline-block; margin-top: 22px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px; padding: 6px 14px;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
}

/* ─── Boutons ─────────────────────────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 30px; border-radius: var(--rayon);
  font: 800 1.08rem/1 Nunito, sans-serif; text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.bouton-clair { background: #fff; color: var(--vert-fonce); box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.bouton-clair:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
.bouton-vert { background: var(--vert); color: #fff; box-shadow: var(--ombre); }
.bouton-vert:hover { background: var(--vert-fonce); transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.bouton-fin {
  background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6);
  padding: 13px 24px; font-size: 1rem;
}
.bouton-fin:hover { background: rgba(255, 255, 255, .14); }
/* Instagram : les couleurs de la marque, pour que le bouton soit reconnu d'un
   coup d'œil. L'icône est un SVG embarqué — pas de script ni d'image chargée
   depuis Instagram, qui pisterait le visiteur avant même qu'il ait cliqué. */
.bouton-insta {
  background: linear-gradient(60deg, #F9CE34 0%, #EE2A7B 48%, #6228D7 100%);
  color: #fff; box-shadow: var(--ombre);
}
.bouton-insta:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); filter: saturate(1.15); }
.bouton-insta svg { flex: 0 0 auto; }
.bouton svg { width: 21px; height: 21px; }
.boutons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

/* ─── Sections ────────────────────────────────────────────────────────────── */
section { padding: 68px 0; }
section.alt { background: #fff; border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.chapeau { max-width: 62ch; margin: 0 auto 42px; text-align: center; color: var(--gris); font-size: 1.1rem; }
.titre-section { text-align: center; }
.titre-section .oeil {
  display: block; text-transform: uppercase; letter-spacing: .12em;
  font: 800 .78rem/1 Nunito, sans-serif; color: var(--vert); margin-bottom: 10px;
}

/* ─── Cartes ──────────────────────────────────────────────────────────────── */
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
/* Variante serrée : 4 colonnes au lieu de 3, pour les séries de 4 ou 7 cartes
   qui laisseraient sinon une carte seule en bout de ligne. */
.grille-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.carte {
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 26px; box-shadow: var(--ombre);
}
section.alt .carte { background: var(--neige); }
.carte .emoji { font-size: 2rem; line-height: 1; display: block; margin-bottom: 12px; }
.carte h3 { margin-bottom: 8px; }
.carte p { color: var(--gris); margin: 0; font-size: .99rem; }

/* Pastilles des types d'exercice — mêmes couleurs que dans l'app. */
.pastille {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  font: 800 .85rem/1.5 Nunito, sans-serif; color: #fff; margin: 0 6px 8px 0;
}
.p-paires { background: #7C4DFF; }   /* AppColors.matchColor  */
.p-ordre  { background: #00BCD4; }   /* AppColors.orderColor  */
.p-trous  { background: #FF7043; }   /* AppColors.fillColor   */
.p-enigme { background: #E91E63; }   /* AppColors.riddleColor */
.p-croise { background: var(--vert-fonce); }
.p-oral   { background: var(--terre); }
.p-scene  { background: #F2607A; }   /* le rose du jeu de rôle */

/* ─── Langues ─────────────────────────────────────────────────────────────── */
.langues { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.langue {
  background: #fff; border: 1px solid var(--ligne); border-radius: 16px;
  padding: 14px 20px; font-weight: 700; box-shadow: var(--ombre);
  display: flex; align-items: center; gap: 10px;
}
.langue .drapeau { font-size: 1.5rem; }

/* Sélecteur de langue du formulaire de contact (contact.php) : des liens, pas
   des cartes — `.langue` ci-dessus habille les langues APPRENABLES de la
   vitrine, qui n'ont rien à voir. */
.choix-langue {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 26px; font-size: .9rem;
}
.choix-langue a { color: var(--vert-fonce); font-weight: 700; }
.choix-langue-ici { font-weight: 800; color: var(--gris); }

/* ─── Formules ────────────────────────────────────────────────────────────── */
.formule { position: relative; }
.formule.vedette { border-color: var(--vert); box-shadow: var(--ombre-forte); }
.formule .ruban {
  position: absolute; top: -13px; left: 26px;
  background: var(--soleil); color: var(--nuit);
  font: 800 .78rem/1 Nunito, sans-serif; padding: 7px 13px; border-radius: 999px;
}
.formule ul { margin: 14px 0 0; padding: 0; list-style: none; color: var(--gris); }
.formule li { padding: 7px 0 7px 26px; position: relative; font-size: .98rem; }
.formule li::before {
  content: '✓'; position: absolute; left: 0; top: 7px;
  color: var(--vert); font-weight: 800;
}
.formule li.absent { color: #9aa7a0; }
.formule li.absent::before { content: '—'; color: #c3cfc8; }

/* ─── Invitation à suivre le compte ──────────────────────────────────────── */
.suivre {
  margin: 34px auto 0; max-width: 62ch; text-align: center;
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 26px 24px; box-shadow: var(--ombre);
}
section.alt .suivre { background: var(--neige); }
.suivre h3 { margin-bottom: 8px; }
.suivre p { color: var(--gris); margin: 0 0 18px; }
.suivre .pseudo { font-weight: 800; color: var(--nuit); white-space: nowrap; }

/* ─── Encadré d'information ───────────────────────────────────────────────── */
.encadre {
  background: #fff8e1; border: 1px solid #ffe49a; border-left: 5px solid var(--soleil);
  border-radius: 14px; padding: 18px 22px; margin: 0 auto; max-width: 70ch;
}
.encadre p:last-child { margin: 0; }

/* ─── Étapes numérotées ──────────────────────────────────────────────────── */
.etapes { counter-reset: etape; max-width: 62ch; margin: 0 auto; padding: 0; list-style: none; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 26px 56px; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--vert); color: #fff;
  font: 800 1.05rem/38px Nunito, sans-serif; text-align: center;
}
.etapes li:not(:last-child)::after {
  content: ''; position: absolute; left: 18px; top: 40px; bottom: 6px;
  width: 2px; background: var(--vert-clair);
}
.etapes strong { display: block; }

/* ─── Appel final ─────────────────────────────────────────────────────────── */
.final {
  background: linear-gradient(135deg, #2E7D32, #4CAF50);
  color: #fff; text-align: center; padding: 72px 0;
}
.final p { color: rgba(255, 255, 255, .95); max-width: 52ch; margin: 14px auto 0; }

/* ─── Formulaire ──────────────────────────────────────────────────────────── */
.formulaire { max-width: 640px; margin: 0 auto; }
.champ { margin-bottom: 20px; }
.champ label { display: block; font-weight: 800; margin-bottom: 7px; }
.champ .aide { color: var(--gris); font-size: .9rem; font-weight: 400; }
.champ input, .champ select, .champ textarea {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--ligne); border-radius: 14px;
  font: 400 1rem/1.5 Nunito, sans-serif; color: var(--nuit); background: #fff;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 0; border-color: var(--vert); box-shadow: 0 0 0 4px rgba(76, 175, 80, .16);
}
.champ textarea { min-height: 170px; resize: vertical; }
.champ.erreur input, .champ.erreur select, .champ.erreur textarea { border-color: #e53935; }
.message-erreur { color: #b3261e; font-size: .92rem; font-weight: 700; margin-top: 6px; }

/* Leurre anti-robot : hors écran, mais pas `display:none` — certains robots
   ignorent les champs masqués ainsi, alors qu'ils remplissent celui-ci. */
.leurre { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alerte { border-radius: 16px; padding: 18px 22px; margin-bottom: 28px; font-weight: 600; }
.alerte-ok { background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }
.alerte-ko { background: #fdecea; border: 1px solid #f5c6c2; color: #8c2035; }

/* ─── Pied de page ────────────────────────────────────────────────────────── */
.pied { background: var(--nuit); color: #cfd8d2; padding: 44px 20px 26px; margin-top: 0; }
.pied-grille {
  max-width: var(--largeur); margin: 0 auto; display: flex; flex-wrap: wrap;
  gap: 24px; justify-content: space-between; align-items: flex-start;
}
.pied-marque { font: 600 1.3rem/1 Fredoka, sans-serif; color: #fff; margin: 0 0 6px; }
.pied-note { margin: 0; font-size: .95rem; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 20px; }
.pied a { color: var(--vert-clair); text-decoration: none; font-weight: 700; }
.pied a:hover { text-decoration: underline; }
.pied-bas {
  max-width: var(--largeur); margin: 26px auto 0; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem; color: #9fada6;
}

/* ─── Petits écrans ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 50px 0; }
  .heros { padding: 40px 0 56px; }
  .bouton { width: 100%; }
  .boutons { flex-direction: column; }
}

/* ─── Respect des préférences système ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heros-icone { animation: none; }
  .bouton, .bouton:hover { transition: none; transform: none; }
}
