/* site.css - La partie publique de Poevai5 (accueil, compte, pages légales) : une seule feuille, sobre.
   Inter servie par le site, le noir pour l'action, des boutons en pilule, une scène grise posée sur la page ;
   le thème suit le système ou le choix du poste (theme.js). */
:root {
  --page: #ffffff; --scene: #f4f4f5; --surface: #ffffff;
  --texte: #0b0b0c; --doux: #6f6f78; --bord: #e4e4e9;
  --accent: #0b0b0c; --accent-texte: #ffffff; --avatar: #ff4d00;
  --erreur: #b91c1c; --ok: #15803d;
  --rayon: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0b0b0c; --scene: #151517; --surface: #1f1f22;
    --texte: #ececef; --doux: #9a9aa3; --bord: #2c2c31;
    --accent: #ececef; --accent-texte: #0b0b0c; --erreur: #f87171; --ok: #4ade80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0b0b0c; --scene: #151517; --surface: #1f1f22;
  --texte: #ececef; --doux: #9a9aa3; --bord: #2c2c31;
  --accent: #ececef; --accent-texte: #0b0b0c; --erreur: #f87171; --ok: #4ade80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--page); color: var(--texte);
  font: 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Les boutons : plein pour l'action principale, blanc pour la seconde, simple lien pour la troisième. */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-texte);
  font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: opacity .15s, background-color .15s;
}
.bouton:hover { opacity: .86; }
.bouton.blanc { background: var(--surface); color: var(--texte); font-weight: 650; min-height: 44px; padding: 0 32px; }
.bouton.blanc:hover { opacity: 1; box-shadow: 0 0 0 1px var(--bord); }
.lien { font-size: 14px; font-weight: 500; text-decoration: none; padding: 10px 4px; }
.lien:hover { text-decoration: underline; text-underline-offset: 4px; }
.lien.fort { font-weight: 650; }

/* La scène : un grand panneau gris posé sur la page, le pied reste dehors. */
.scene {
  flex: 1; display: grid; place-items: center;
  margin: clamp(12px, 4.5vw, 64px) clamp(12px, 6vw, 118px) 0;
  padding: 56px 16px;
  background: var(--scene);
}

/* L'accueil : la marque, une phrase, puis ce qu'on peut faire (visiteur ou connecté). */
.accueil { display: grid; justify-items: center; gap: 30px; width: 100%; max-width: 46rem; text-align: center; }
.marque { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.marque img { width: clamp(56px, 6.5vw, 88px); height: auto; aspect-ratio: 1; border-radius: 24%; display: block; }
.marque span { font-size: clamp(40px, 6vw, 66px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.accueil h1 { margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 400; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
@media (min-width: 760px) { .accueil h1 span { display: block; } }
.accueil .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 32px; }
.accueil .etat { display: grid; justify-items: center; gap: 26px; }

/* Connecté : une carte blanche, qui on est, depuis quand, et une seule action. */
.session {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "avatar qui qui" "quand quand bouton";
  align-items: center; gap: 12px 22px;
  width: min(100%, 30rem); padding: 14px 14px 14px 26px;
  background: var(--surface); border-radius: var(--rayon); text-align: left;
}
.session .avatar {
  grid-area: avatar; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--avatar); color: #fff; font-weight: 600; font-size: 16px;
}
.session .qui { grid-area: qui; margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.session .quand { grid-area: quand; margin: 0; font-size: 13px; color: var(--doux); }
.session .bouton { grid-area: bouton; min-width: 11rem; }
@media (max-width: 560px) {
  .session { grid-template-columns: auto 1fr; grid-template-areas: "avatar qui" "quand quand" "bouton bouton"; padding: 18px; }
  .session .bouton { min-width: 0; }
}

/* Le pied, commun à toutes les pages. */
.pied { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; padding: 32px 16px 28px; font-size: 13px; color: var(--doux); }
.pied a { text-decoration: none; }
.pied a:hover { color: var(--texte); text-decoration: underline; }

/* Les pages de texte (légales) : un cadre gris sur toute la hauteur, l'en-tête, la rangée d'onglets, le texte. */
body.pages { overflow-x: clip; }
.cadre { flex: 1; display: flex; flex-direction: column; margin: 0 clamp(0px, 6vw, 118px); background: var(--scene); }
.entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 20px clamp(16px, 2.6vw, 50px) 20px clamp(16px, 7.6vw, 146px); }
.entete .mot { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -.035em; line-height: 1; text-decoration: none; }
.entete .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.entete .bouton { min-height: 38px; padding: 0 22px; }
.entete .bouton.blanc { min-height: 38px; padding: 0 22px; font-weight: 500; }
/* Les traits des onglets courent sur toute la largeur de la page, au-delà du cadre ; la rangée reste collée en haut au défilement. */
.onglets {
  position: sticky; top: 0; z-index: 10; background: var(--scene);
  display: flex; align-items: center; gap: 4px 30px; padding: 8px 16px;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  border-image: conic-gradient(var(--bord) 0 0) 1 / 1px 0 / 0 100vw;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets a { text-decoration: none; font-size: 14px; padding: 6px 0; }
.onglets a:hover { text-decoration: underline; text-underline-offset: 5px; }
.onglets a[aria-current="page"] { font-weight: 650; }
.onglets .maison { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.onglets .maison img { width: 30px; height: 30px; border-radius: 24%; }
.onglets .separe { width: 2px; height: 14px; background: var(--texte); flex: none; }
.texte { width: 100%; max-width: 42rem; padding: 28px clamp(16px, 3vw, 56px) 64px; }
.texte h1 { margin: 12px 0 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.texte .date { margin: 0 0 24px; color: var(--doux); font-size: 13px; }
.texte h2 { margin: 28px 0 8px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.texte p, .texte li { font-size: 14px; line-height: 1.65; }
.texte ul { padding-left: 1.2em; }
.texte li + li { margin-top: 8px; }
.texte a { text-underline-offset: 3px; }
@media (max-width: 640px) {
  .entete .actions { width: 100%; }
  .entete .bouton { flex: 1; padding: 0 12px; font-size: 13.5px; }
}

/* Téléchargements : une carte par appareil, un encart pour les téléphones. */
.accueil .titre { margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; letter-spacing: -.02em; }
.appareils { display: grid; justify-items: center; gap: 20px; width: 100%; }
.appareil {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icone nom nom" "taille taille action";
  align-items: center; gap: 8px 18px;
  width: min(100%, 28rem); padding: 14px 40px 14px 20px;
  background: var(--surface); border-radius: var(--rayon); text-align: left;
}
.pastille { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #e2e8fb; color: #26304f; flex: none; }
.pastille svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.appareil .pastille { grid-area: icone; }
.appareil .nom { grid-area: nom; margin: 0; font-size: 15px; font-weight: 500; }
.appareil .taille { grid-area: taille; margin: 0; font-size: 13px; color: var(--doux); }
.appareil .bouton { grid-area: action; min-width: 14rem; font-size: 14px; }
.appareil .bouton[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.encart { display: inline-flex; align-items: center; gap: 16px; padding: 8px 18px 8px 10px; background: var(--surface); border-radius: 999px; font-size: 15px; font-weight: 500; }
.encart .bientot { color: var(--doux); font-size: 12px; font-weight: 400; }
@media (max-width: 560px) {
  .appareil { grid-template-columns: auto 1fr; grid-template-areas: "icone nom" "taille taille" "action action"; padding: 18px; }
  .appareil .bouton { min-width: 0; }
}

/* Connexion et inscription : la marque, puis une carte blanche. Deux onglets en pastille (connexion, inscription) ;
   les vues de secours (oubli, nouveau mot de passe, lien expiré) prennent la carte entière. */
.compte { gap: 26px; max-width: 26rem; }
.compte .marque img { width: 56px; }
.compte .marque span { font-size: 40px; }
.carte { width: 100%; padding: 22px 22px 20px; background: var(--surface); border-radius: var(--rayon); text-align: left; }
.bascule { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--scene); border-radius: 999px; }
.bascule a { display: grid; place-items: center; min-height: 34px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--doux); }
.bascule a[aria-current="page"] { background: var(--surface); color: var(--texte); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.carte h1 { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.carte .explication { margin: 0 0 18px; font-size: 13.5px; color: var(--doux); }
.carte form { display: grid; gap: 12px; }
.carte label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.carte input {
  width: 100%; min-height: 42px; padding: 0 14px;
  border: 1px solid var(--bord); border-radius: 12px;
  background: var(--page); color: var(--texte); font-size: 14px;
}
.carte input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.carte form .bouton { width: 100%; margin-top: 6px; }
.carte .bouton:disabled { opacity: .5; cursor: default; }
.carte .liens { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 16px; font-size: 13px; color: var(--doux); }
.carte .liens a { text-underline-offset: 3px; }
.carte .liens a:hover { color: var(--texte); }
.statut { min-height: 1.2em; margin: 0; font-size: 13px; }
.statut.erreur { color: var(--erreur); }
.statut.ok { color: var(--ok); }
