/*
 * Ma Petite Classe — styles communs (charte visuelle).
 * Les modules utilisent ces variables et ces classes ; ils ne redéfinissent pas les couleurs.
 */

/* ---------- Polices (hébergées sur notre serveur : rien n'est chargé chez Google) ---------- */
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/fredoka-latin-700-normal.woff2") format("woff2"); }

/* ---------- Variables de la charte ---------- */
:root {
  --mpc-bleu-nuit: #162742;
  --mpc-corail: #EA4D55;
  --mpc-jaune: #FAB72B;
  --mpc-turquoise: #2DB7B1;
  --mpc-creme: #FDFBF5;

  --mpc-fond: #FBF8F2;
  --mpc-surface: #FFFFFF;
  --mpc-encre: #162742;
  --mpc-texte-2: #5B6080;
  --mpc-texte-3: #8A8FA8;
  --mpc-texte-sur-sombre: #D5DBE8;
  --mpc-actif: #EEF0F5;
  --mpc-bordure: #ECE6DB;
  --mpc-bordure-champ: #DDD5C7;
  --mpc-neutre-fond: #F3EEE5;
  --mpc-neutre-texte: #3D4260;

  --mpc-succes-fond: #E3F4EC;  --mpc-succes-texte: #165C3D;
  --mpc-info-fond: #E8EEF8;    --mpc-info-texte: #1E3A66;
  --mpc-erreur-fond: #FDECEC;  --mpc-erreur-texte: #9B1C24;
  --mpc-alerte-fond: #FFF4E5;  --mpc-alerte-texte: #8A4B00;

  --mpc-rayon-bouton: 12px;
  --mpc-rayon-carte: 14px;
  --mpc-rayon-panneau: 20px;

  --mpc-police: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mpc-police-titres: "Fredoka", "Figtree", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mpc-fond); color: var(--mpc-encre); font-family: var(--mpc-police); font-size: 16px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--mpc-police-titres); font-weight: 600; line-height: 1.2; margin: 0; color: var(--mpc-encre); }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--mpc-bleu-nuit); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: #0B1528; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--mpc-turquoise); outline-offset: 2px; }
.icone { flex: none; }
.corail { color: var(--mpc-corail); }
.texte-doux { color: var(--mpc-texte-2); }
.pile { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 2px solid var(--mpc-bleu-nuit); border-radius: var(--mpc-rayon-bouton);
  background: var(--mpc-bleu-nuit); color: #FFFFFF; font: inherit; font-weight: 800; font-size: 16px;
  text-decoration: none; cursor: pointer;
}
.bouton:hover { background: #0B1528; border-color: #0B1528; color: #FFFFFF; }
.bouton-secondaire { background: var(--mpc-surface); color: var(--mpc-bleu-nuit); }
.bouton-secondaire:hover { background: var(--mpc-actif); color: var(--mpc-bleu-nuit); }
.bouton-large { width: 100%; }
.bouton-petit { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 700; }
.bouton-desactive { background: var(--mpc-neutre-fond); border-color: var(--mpc-neutre-fond); color: var(--mpc-texte-2); cursor: not-allowed; }

/* ---------- Formulaires ---------- */
.formulaire { display: flex; flex-direction: column; gap: 18px; }
.formulaire-inline { margin: -4px 0 18px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-weight: 700; font-size: 15px; }
.champ input, .champ select {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--mpc-bordure-champ); border-radius: var(--mpc-rayon-bouton);
  background: var(--mpc-surface); color: var(--mpc-encre); font: inherit; font-size: 16px; width: 100%;
}
.champ input:focus, .champ select:focus { border-color: var(--mpc-bleu-nuit); outline: 2px solid var(--mpc-bleu-nuit); outline-offset: 0; }
.champ input::placeholder { color: var(--mpc-texte-3); }
.champ-aide { font-size: 14px; color: var(--mpc-texte-2); }
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 52px; }
.bouton-oeil {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--mpc-texte-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.bouton-oeil:hover, .bouton-oeil[aria-pressed="true"] { color: var(--mpc-bleu-nuit); background: var(--mpc-actif); }
.case { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; flex-wrap: wrap; }
.case input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--mpc-bleu-nuit); flex: none; }
.case label { flex: 1 1 0; min-width: 0; }
.ligne-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; font-size: 15px; }
.ligne-options .case { align-items: center; }
.ligne-options .case input[type="checkbox"] { margin: 0; }
.ligne-options .case label { flex: none; }

/* Bulle d'aide « ? » (sans JavaScript) */
.aide { position: relative; display: inline-block; }
.aide summary {
  list-style: none; width: 28px; height: 28px; border: 1px solid var(--mpc-bordure-champ); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--mpc-texte-2);
  background: var(--mpc-surface); cursor: pointer;
}
.aide summary::-webkit-details-marker { display: none; }
.aide[open] summary { background: var(--mpc-bleu-nuit); border-color: var(--mpc-bleu-nuit); color: #FFFFFF; }
.aide p {
  position: absolute; z-index: 5; left: 50%; top: 36px; transform: translateX(-50%); width: 260px;
  padding: 12px 14px; border-radius: 12px; background: var(--mpc-bleu-nuit); color: #FFFFFF; font-size: 14px; line-height: 1.45;
  box-shadow: 0 10px 28px rgba(22, 39, 66, .18);
}

/* ---------- Messages ---------- */
.message { padding: 12px 16px; border-radius: 12px; font-size: 15px; line-height: 1.45; margin-bottom: 18px; }
.message-succes { background: var(--mpc-succes-fond); color: var(--mpc-succes-texte); }
.message-info { background: var(--mpc-info-fond); color: var(--mpc-info-texte); }
.message-erreur { background: var(--mpc-erreur-fond); color: var(--mpc-erreur-texte); }
.message div + div { margin-top: 4px; }
.mail-test {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 18px;
  padding: 14px 16px; border: 2px dashed var(--mpc-jaune); border-radius: 12px; background: var(--mpc-alerte-fond); color: var(--mpc-alerte-texte); font-size: 14px;
}
.mail-test-titre { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.mail-test-ligne { word-break: break-word; }
.mail-test .bouton { margin-top: 4px; }
.bandeau-test { background: var(--mpc-jaune); color: var(--mpc-bleu-nuit); text-align: center; font-size: 14px; font-weight: 700; padding: 6px 16px; }

/* ---------- Pages publiques (connexion, inscription…) ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 16px; }
.page-auth .auth { min-height: calc(100vh - 34px); }
.auth-carte {
  width: 100%; max-width: 980px; display: flex; flex-wrap: wrap; overflow: hidden;
  background: var(--mpc-surface); border: 1px solid var(--mpc-bordure); border-radius: 24px;
}
.auth-presentation {
  flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; padding: 36px 40px 40px;
  background: var(--mpc-creme); border-right: 1px solid var(--mpc-bordure);
}
.auth-logo { width: 100%; max-width: 340px; margin: 0 auto; display: block; }
.auth-accroche { font-size: 28px; }
.auth-texte { color: var(--mpc-texte-2); font-size: 17px; }
.auth-contenu { flex: 1 1 380px; padding: 40px; display: flex; flex-direction: column; }
.auth-titre { font-size: 26px; margin-bottom: 20px; }
.auth-contenu > p { margin-bottom: 14px; }
.auth-bas { margin-top: 18px; text-align: center; font-size: 15px; color: var(--mpc-texte-2); }
.auth-pied { font-size: 14px; color: var(--mpc-texte-2); text-align: center; }
.auth-pied a { font-weight: 500; color: var(--mpc-texte-2); }
.onglets-segment { display: flex; gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--mpc-fond); border-radius: var(--mpc-rayon-bouton); }
.onglets-segment a {
  flex: 1 1 0; min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; color: var(--mpc-texte-2); font-size: 15px; font-weight: 700; text-decoration: none;
}
.onglets-segment a[aria-current="page"] { background: var(--mpc-surface); color: var(--mpc-bleu-nuit); box-shadow: 0 1px 2px rgba(22, 39, 66, .08); }
.etape-mail { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.etape-mail-icone { width: 56px; height: 56px; border-radius: 16px; background: var(--mpc-actif); color: var(--mpc-bleu-nuit); display: flex; align-items: center; justify-content: center; }

@media (max-width: 760px) {
  .auth-presentation { border-right: 0; border-bottom: 1px solid var(--mpc-bordure); padding: 24px; }
  .auth-presentation .auth-accroche, .auth-presentation .auth-texte { display: none; }
  .auth-logo { max-width: 240px; }
  .auth-contenu { padding: 24px; }
}

/* ---------- Pages simples (installation, conditions) ---------- */
.simple { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.simple-logo { width: 220px; }
.texte-long h2 { margin-top: 12px; }
.texte-long ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.liste-verifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.liste-verifs .ok { color: var(--mpc-succes-texte); }
.liste-verifs .ko { color: var(--mpc-erreur-texte); font-weight: 700; }

/* ---------- Application : menu latéral ---------- */
.app { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.menu {
  flex: 1 1 248px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px;
  background: var(--mpc-surface); border-right: 1px solid var(--mpc-bordure);
}
.menu-marque {
  display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; text-decoration: none;
  font-family: var(--mpc-police-titres); font-weight: 600; font-size: 19px; line-height: 1.05; color: var(--mpc-bleu-nuit);
}
.menu-marque img { width: 44px; height: 44px; }
.menu-lien {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--mpc-encre); font-size: 15px; font-weight: 600; text-decoration: none;
}
.menu-lien:hover { background: var(--mpc-fond); color: var(--mpc-encre); }
.menu-lien[aria-current="page"] { background: var(--mpc-actif); font-weight: 800; }
.menu-lien-inactif, .menu-lien-inactif:hover { color: var(--mpc-texte-3); background: transparent; }
.menu-bouton { width: 100%; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.menu-rubrique { padding: 16px 12px 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mpc-texte-2); }
.menu-espace { flex: 1 1 auto; min-height: 24px; }
.menu-compte { display: flex; align-items: center; gap: 10px; padding: 8px; font-size: 14px; min-width: 0; }
.menu-compte-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-initiales {
  width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--mpc-actif); color: var(--mpc-bleu-nuit);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.pastille-bientot { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--mpc-neutre-fond); color: var(--mpc-texte-2); font-size: 12px; font-weight: 700; }
.app-contenu { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.app-page { padding: 32px; max-width: 1104px; width: 100%; }
.titre-page { font-size: 32px; margin-bottom: 6px; }

/* Bandeau d'un outil : titre + onglets */
.bandeau-outil { background: var(--mpc-surface); border-bottom: 1px solid var(--mpc-bordure); padding: 20px 32px 0; display: flex; flex-direction: column; gap: 14px; }
.bandeau-outil h1 { font-size: 28px; }
.onglets { display: flex; gap: 4px; overflow-x: auto; }
.onglets a {
  min-height: 44px; display: flex; align-items: center; padding: 0 14px; white-space: nowrap;
  border-bottom: 3px solid transparent; color: var(--mpc-neutre-texte); font-size: 15px; font-weight: 600; text-decoration: none;
}
.onglets a[aria-current="page"] { border-bottom-color: var(--mpc-corail); color: var(--mpc-bleu-nuit); font-weight: 800; }

/* Encarts et tuiles */
.encart { background: var(--mpc-surface); border: 1px solid var(--mpc-bordure); border-radius: var(--mpc-rayon-panneau); padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.grille-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tuile {
  display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px;
  background: var(--mpc-bleu-nuit); color: #FFFFFF; text-decoration: none;
}
.tuile:hover { background: #0B1528; color: #FFFFFF; }
.tuile-icone { width: 52px; height: 52px; border-radius: 14px; background: #FFFFFF; color: var(--mpc-bleu-nuit); display: flex; align-items: center; justify-content: center; }
.tuile-titre { font-size: 19px; font-weight: 800; }
.tuile-texte { font-size: 15px; font-weight: 400; color: var(--mpc-texte-sur-sombre); line-height: 1.45; }
.tuile-action { font-size: 15px; font-weight: 800; }
.tuile-bientot { background: transparent; color: var(--mpc-texte-2); border: 2px dashed var(--mpc-bordure-champ); }
.tuile-bientot .tuile-icone { background: var(--mpc-neutre-fond); color: var(--mpc-texte-2); }
.tuile-bientot .tuile-texte { color: var(--mpc-texte-2); }

@media (max-width: 760px) {
  .menu { border-right: 0; border-bottom: 1px solid var(--mpc-bordure); }
  .app-page { padding: 20px 16px; }
  .bandeau-outil { padding: 16px 16px 0; }
}
