/* ILANA Daily, site vitrine. Jetons repris de docs/charte/charte-ilana.html
   et src/styles/tokens.css. Aucune valeur inventée hors des jetons. */

:root {
  --teal: #3AAFB9;
  --cta: #297C83;
  --edge-cta: #1E5D63;
  --teal-texte: #287B82;
  --teal-14: rgba(58, 175, 185, 0.14);
  --ink: #1A1D29;
  --cream: #FAF8F5;
  --carte: #FFFFFF;
  --gris: #5F6270;
  --trait: #E8E5E0;

  --coque-clair: #EEE9E2;
  --coque-moyen: #D8D2C9;
  --coque-fonce: #C4BDB3;
  --visiere: #161618;

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --radius-full: 999px;

  --elevation-1: 0 1px 2px rgba(26,29,41,0.05), 0 1px 3px rgba(26,29,41,0.04);
  --elevation-2: 0 2px 4px rgba(26,29,41,0.05), 0 4px 10px rgba(26,29,41,0.06);
  --elevation-3: 0 4px 8px rgba(26,29,41,0.06), 0 10px 24px rgba(26,29,41,0.09);
  --elevation-4: 0 8px 16px rgba(26,29,41,0.08), 0 20px 48px rgba(26,29,41,0.14);

  --ease-signature: cubic-bezier(0.22, 1, 0.36, 1);
  --duree-entree: 350ms;
  --transition-fast: 150ms var(--ease-signature);
  --transition-normal: 300ms var(--ease-signature);

  --marge: 20px;
  --largeur: 1120px;
  --largeur-texte: 40rem;
  --font-sans: "Nunito", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-ouvert { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; }
.contenu { display: block; }

.evitement {
  position: absolute;
  left: 20px; top: -60px;
  padding: 10px 16px;
  background: var(--carte);
  border-radius: var(--radius-full);
  box-shadow: var(--elevation-3);
  z-index: 50;
}
.evitement:focus { top: 16px; }

/* ---------- Signature ---------- */

.signature {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* un quart de la largeur de la tête (32 px) */
  text-decoration: none;
  color: var(--ink);
}
.signature__tete { width: 32px; height: 32px; }
.signature__nom { font-weight: 900; font-size: 20px; line-height: 25px; letter-spacing: 0.01em; }
.signature__daily { font-weight: 700; color: var(--teal-texte); margin-left: 6px; }

/* ---------- En-tête et menu ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-normal);
}
.entete.est-colle { border-bottom-color: var(--trait); }
.entete__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 12px var(--marge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.entete__droite { display: flex; align-items: center; gap: 12px; }

.nav { display: none; }

.menu-bouton {
  width: 44px; height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-full);
  cursor: pointer;
}
.menu-bouton:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.menu-bouton__fermer { display: none; }
.menu-bouton[aria-expanded="true"] .menu-bouton__ouvrir { display: none; }
.menu-bouton[aria-expanded="true"] .menu-bouton__fermer { display: block; }

.menu {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--cream);
  overflow-y: auto;
  z-index: 9;
}
.menu[hidden] { display: none; }
.menu__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 16px var(--marge) 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu__lien {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  min-height: 64px;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.menu__lien:hover, .menu__lien:focus-visible { background: var(--carte); outline: none; }
.menu__icone {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--teal-14);
  color: var(--teal-texte);
}
.menu__texte { display: flex; flex-direction: column; gap: 2px; }
.menu__nom { font-weight: 700; font-size: 17px; line-height: 22px; }
.menu__sous { font-size: 16px; line-height: 21px; color: var(--gris); }
.menu__badge { margin: 20px 8px 0; }

/* ---------- Badge Google Play (marque de Google, jamais modifié) ---------- */

.badge-play { display: inline-block; line-height: 0; }
.badge-play img { height: 60px; width: auto; }
.badge-play:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
.badge-play--entete {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--duree-entree) var(--ease-signature), transform var(--duree-entree) var(--ease-signature);
}
.badge-play--entete img { height: 40px; }
.badge-play--entete.est-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Boutons (pilule, kit) ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  background: var(--carte);
  color: var(--teal-texte);
  border: 1.5px solid var(--trait);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  line-height: 22px;
  text-decoration: none;
  transition: background var(--transition-fast), transform 80ms var(--ease-signature);
}
.bouton:hover { background: var(--cream); }
.bouton:active { transform: scale(0.97); }
.bouton:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.lien { color: var(--teal-texte); font-weight: 700; text-decoration: none; }
.lien:hover { text-decoration: underline; }

/* ---------- Étiquette de section ---------- */

.etiquette {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--teal-14);
  color: var(--teal-texte);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
}

/* ---------- Bulle d'ILANA (MascotBubble) ---------- */

.bulle {
  position: relative;
  width: fit-content;
  max-width: 300px;
  background: var(--carte);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--elevation-2);
}
.bulle__texte { font-weight: 600; font-size: 17px; line-height: 1.45; text-align: center; }
.bulle--gauche::before, .bulle--gauche::after { content: ""; position: absolute; width: 0; height: 0; }
.bulle--gauche::before {
  left: -13px; bottom: 18px;
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  border-right: 13px solid var(--ink);
}
.bulle--gauche::after {
  left: -9px; bottom: 20px;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  border-right: 11px solid var(--carte);
}

/* ---------- ILANA ---------- */

.ilana { position: relative; line-height: 0; flex: none; }
.ilana img, .ilana svg { width: 100%; height: 100%; }
.ilana--sm { width: 56px; height: 56px; }
.ilana--md { width: 80px; height: 80px; }
.ilana--lg { width: 120px; height: 120px; }
.ilana.est-animee img { display: none; }

/* Flottement : 4 px, 3,4 s (components/mascot/Float.tsx) */
@keyframes flotte {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.flotte { animation: flotte 3.4s ease-in-out infinite; will-change: transform; backface-visibility: hidden; }
.flotte--decalee { animation-delay: 0.6s; }

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

.bloc { padding: 48px var(--marge); }
.bloc__inner { max-width: var(--largeur); margin: 0 auto; }
.bloc__tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.bloc__titre { font-weight: 700; font-size: 24px; line-height: 30px; }
.mot-cle { color: var(--teal-texte); }

/* ---------- Héros (accueil) ---------- */

.heros { padding: 40px var(--marge) 56px; }
.heros__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.heros__texte { display: flex; flex-direction: column; gap: 20px; }
.heros__titre { font-weight: 900; font-size: clamp(32px, 6vw, 52px); line-height: 1.1; letter-spacing: -0.01em; }
.heros__corps { font-size: 19px; line-height: 28px; max-width: 32em; }
.heros__action { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.heros__note { font-size: 14px; line-height: 20px; color: var(--gris); }
.heros__ilana { display: flex; align-items: flex-end; gap: 16px; }

/* ---------- Téléphone dessiné ---------- */

.telephone { justify-self: center; width: min(280px, 70vw); }
.telephone__coque {
  position: relative;
  padding: 12px;
  border-radius: 44px;
  background: linear-gradient(180deg, var(--coque-clair) 0%, var(--coque-moyen) 55%, var(--coque-fonce) 100%);
  box-shadow: var(--elevation-4);
}
.telephone__coque img { border-radius: var(--radius-2xl); background: var(--visiere); }
.telephone__coque::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 28%);
  pointer-events: none;
}

/* ---------- Entrées (trois cartes) ---------- */

.entrees { display: grid; grid-template-columns: 1fr; gap: 16px; }
.entree {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--carte);
  border-radius: var(--radius-xl);
  box-shadow: var(--elevation-2);
  text-decoration: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.entree:hover { transform: translateY(-2px); box-shadow: var(--elevation-3); }
.entree:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.entree__icone {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--teal-14);
  color: var(--teal-texte);
}
.entree__titre { font-weight: 700; font-size: 20px; line-height: 25px; }
.entree__corps { font-size: 16px; line-height: 22px; color: var(--gris); }
.entree__suite { margin-top: auto; color: var(--teal-texte); font-weight: 700; font-size: 16px; }

/* ---------- Liste d'articles ---------- */

.liste { list-style: none; display: flex; flex-direction: column; }
.liste__item { border-top: 1px solid var(--trait); }
.liste__item:last-child { border-bottom: 1px solid var(--trait); }
.liste__lien {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  text-decoration: none;
}
.liste__lien:hover .liste__titre { color: var(--teal-texte); }
.liste__lien:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
.liste__titre { font-weight: 700; font-size: 20px; line-height: 26px; transition: color var(--transition-fast); }
.liste__resume { font-size: 16px; line-height: 23px; color: var(--gris); max-width: 42em; }
.liste__meta { font-size: 14px; line-height: 20px; color: var(--gris); }

/* ---------- Tête de section (hub) ---------- */

.hub { padding: 40px var(--marge) 16px; }
.hub__inner { max-width: var(--largeur-texte); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.hub__titre { font-weight: 900; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
.hub__corps { font-size: 19px; line-height: 28px; }
.hub__liste { padding: 24px var(--marge) 56px; }
.hub__liste .liste { max-width: var(--largeur-texte); margin: 0 auto; }
.hub__liste .etiquette { display: none; }

/* ---------- Article ---------- */

.article { padding: 40px var(--marge) 56px; }
.article__entete, .article__corps { max-width: var(--largeur-texte); margin: 0 auto; }
.article__entete { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.article__titre { font-weight: 900; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
.article__meta { font-size: 14px; line-height: 20px; color: var(--gris); }
.article__corps { font-size: 18px; line-height: 28px; }
.article__corps > * + * { margin-top: 20px; }
.article__corps h2 { font-weight: 700; font-size: 24px; line-height: 30px; margin-top: 40px; }
.article__corps h3 { font-weight: 700; font-size: 19px; line-height: 26px; margin-top: 28px; }
.article__corps .chapeau { font-weight: 600; font-size: 21px; line-height: 30px; }
.article__corps ul, .article__corps ol { padding-left: 24px; }
.article__corps li + li { margin-top: 8px; }
.article__corps a { color: var(--teal-texte); font-weight: 600; text-decoration: none; }
.article__corps a:hover { text-decoration: underline; }
.article__corps blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--carte);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-1);
  font-weight: 600;
}
.article__corps .encadre {
  padding: 20px 24px;
  background: var(--carte);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-2);
}
.article__corps .encadre > * + * { margin-top: 12px; }
.article__corps table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 22px; }
.article__corps th, .article__corps td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.article__corps th { font-weight: 700; }
.sources { font-size: 16px; line-height: 22px; color: var(--gris); }
.sources a { font-weight: 600; }

/* carte de fin d'article : l'app, sans discours */
.fin-article {
  max-width: var(--largeur-texte);
  margin-left: auto;
  margin-right: auto;
  margin-top: 48px;
  padding: 24px;
  background: var(--carte);
  border-radius: var(--radius-xl);
  box-shadow: var(--elevation-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}
.fin-article p { flex: 1 1 220px; font-size: 16px; line-height: 22px; }

/* ---------- Page L'app ---------- */

.fonctions { display: grid; grid-template-columns: 1fr; gap: 24px; }
.fonction {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-content: start;
  justify-items: center;
  padding: 24px;
  background: var(--carte);
  border-radius: var(--radius-xl);
  box-shadow: var(--elevation-2);
}
.fonction__texte { display: flex; flex-direction: column; gap: 12px; justify-self: stretch; }
.fonction__titre { font-weight: 700; font-size: 22px; line-height: 28px; }
.fonction__corps { font-size: 17px; line-height: 24px; }
.fonction .telephone { width: min(220px, 60vw); }

.tarifs { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tarif {
  padding: 24px;
  background: var(--carte);
  border-radius: var(--radius-xl);
  box-shadow: var(--elevation-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tarif__nom { font-weight: 700; font-size: 20px; line-height: 26px; }
.tarif__prix { font-weight: 900; font-size: 32px; line-height: 38px; font-variant-numeric: tabular-nums; }
.tarif__detail { font-size: 16px; line-height: 22px; color: var(--gris); }
.tarifs__note { margin-top: 16px; }
.tarif ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 22px; margin-top: 8px; }

.faq { max-width: var(--largeur-texte); }
.faq details { border-top: 1px solid var(--trait); }
.faq details:last-child { border-bottom: 1px solid var(--trait); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  min-height: 44px;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal-texte); font-weight: 900; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .faq__reponse { padding: 0 0 20px; font-size: 17px; line-height: 24px; max-width: 38em; }

/* ---------- Ressources ---------- */

.ressources { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ressource {
  padding: 20px 24px;
  background: var(--carte);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ressource__nom { font-weight: 700; font-size: 18px; line-height: 24px; }
.ressource__nom a { color: var(--teal-texte); text-decoration: none; }
.ressource__nom a:hover { text-decoration: underline; }
.ressource__corps { font-size: 16px; line-height: 22px; color: var(--gris); }
.glossaire { max-width: var(--largeur-texte); }
.glossaire dt { font-weight: 700; margin-top: 16px; }
.glossaire dd { margin: 4px 0 0; color: var(--gris); }

/* ---------- Appel final ---------- */

.appel { padding: 56px var(--marge) 72px; }
.appel__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.appel__titre { font-weight: 700; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; }
.appel__corps { font-size: 17px; line-height: 24px; color: var(--gris); }

/* ---------- Pied ---------- */

.pied { border-top: 1px solid var(--trait); padding: 40px var(--marge) 32px; }
.pied__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.pied__marque { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pied__phrase { font-size: 16px; line-height: 22px; color: var(--gris); }
.pied__colonne { display: flex; flex-direction: column; gap: 2px; }
.pied__titre { font-weight: 700; font-size: 14px; line-height: 20px; color: var(--gris); margin-bottom: 6px; }
.pied__colonne a { font-size: 16px; line-height: 44px; color: var(--ink); text-decoration: none; }
.pied__colonne a:hover { color: var(--teal-texte); text-decoration: underline; }
.pied__bas {
  max-width: var(--largeur);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--trait);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--gris);
}

/* ---------- Entrées au défilement ---------- */

.revele { transition: opacity var(--duree-entree) var(--ease-signature), transform var(--duree-entree) var(--ease-signature); }
/* caché seulement quand le script tourne : sans lui, tout est visible */
.js .revele { opacity: 0; transform: translateY(16px); }
.js .revele--telephone { transform: translateY(16px) rotate(-2deg) scale(0.97); }
.revele.est-visible { opacity: 1; transform: none; }

/* ---------- Tablette et grand écran ---------- */

@media (min-width: 640px) {
  .entrees { grid-template-columns: repeat(3, 1fr); }
  .tarifs { grid-template-columns: 1fr 1fr; }
  .ressources { grid-template-columns: 1fr 1fr; }
  .pied__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .fonctions { grid-template-columns: repeat(3, 1fr); }
  .page--app .fonctions { grid-template-columns: repeat(2, 1fr); }
  .fonction { padding: 32px; }
  .fonction .telephone { width: 200px; }
}

@media (min-width: 900px) {
  .nav { display: flex; gap: 4px; }
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    color: var(--ink);
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .nav a:hover, .nav a:focus-visible { background: var(--carte); color: var(--teal-texte); outline: none; }
  .nav a[aria-current="page"] { color: var(--teal-texte); }
  .menu-bouton { display: none; }
  .menu { display: none !important; }
  .badge-play--entete { display: inline-block; }

  .heros { padding: 64px var(--marge) 80px; }
  .heros__inner { grid-template-columns: 1.15fr 1fr; gap: 64px; }
  .telephone { width: 300px; }
  .bloc { padding: 64px var(--marge); }
  .article, .hub { padding-top: 56px; }
}

/* ---------- Réduction du mouvement ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flotte { animation: none; }
  .revele, .badge-play--entete, .entree { transition: none; opacity: 1; transform: none; }
  .badge-play--entete { pointer-events: auto; }
  .entree:hover { transform: none; }
}
