/* Bureau du Fondateur — toutes les couleurs et tailles ici, en haut. Parchemin, encre, touches d'or. */
:root {
  --fond: #f4eee1;
  --parchemin: #fbf7ee;
  --parchemin-fonce: #efe6d2;
  --trait: #e3d7bd;
  --encre: #3b2f24;
  --encre-douce: #85745f;
  --or: #b8923e;
  --or-pale: #f3e6c4;
  --or-fonce: #8c6a22;
  --nuit: #2e2a3d;
  --nuit-douce: #4a4560;
  --vert-vie: #5aa77d;
  --rouge-doux: #c0665a;
  --nuit-profonde: #0d0e22;
  --clair: #f4ecd9;
  --or-clair: #e8c46e;
  --flamme: #ffc45e;

  --gryffondor: #b5534b; --gryffondor-pale: #f5ddd8;
  --serdaigle: #4b6aa3;  --serdaigle-pale: #dee6f4;
  --poufsouffle: #b8901f; --poufsouffle-pale: #f7edcc;
  --serpentard: #3b8260; --serpentard-pale: #d9ede2;

  --rayon: 14px;
  --ombre: 0 3px 14px rgba(59, 47, 36, .08);
  --titre: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --texte: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fond); color: var(--encre); font: 15px/1.5 var(--texte); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; margin: 0; }
.petit { font-size: 12.5px; color: var(--encre-douce); }
[hidden] { display: none !important; }

/* ----- Le bureau ----- */
.bureau { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.menu { background: var(--nuit); color: #eee6d6; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.marque { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; font-family: var(--titre); font-size: 19px; line-height: 1.1; }
.marque img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--or); }
.marque small { font-size: 13px; color: var(--or); }
nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
nav a, nav .bientot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; }
nav a:hover { background: var(--nuit-douce); }
nav a.ici { background: var(--or-pale); color: var(--encre); font-weight: 600; }
nav .bientot { opacity: .45; cursor: default; }
nav .bientot em { margin-left: auto; font-size: 11px; font-style: normal; border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; }
.ic { width: 22px; text-align: center; }
.moi { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--nuit-douce); padding: 14px 8px 0; }
.moi img { width: 34px; height: 34px; border-radius: 50%; }
.moi div { flex: 1; min-width: 0; }
.moi strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moi small { color: var(--or); font-size: 12px; }
.sortir { text-decoration: none; font-size: 18px; opacity: .7; }
.sortir:hover { opacity: 1; }

.contenu { padding: 32px 36px 60px; max-width: 1180px; width: 100%; min-width: 0; }
.entete { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.entete h1 { font-size: 30px; }
.etat { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--parchemin-fonce); }
.etat.allume { background: var(--serpentard-pale); color: var(--serpentard); }
.etat.eteint { background: var(--gryffondor-pale); color: var(--gryffondor); }

.carte { background: var(--parchemin); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 22px; }
.carte h2 { font-size: 19px; margin-bottom: 14px; }
.grille { display: grid; gap: 18px; }
.chiffres { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.chiffre .valeur { font-family: var(--titre); font-size: 36px; line-height: 1.1; color: var(--encre); }
.chiffre .libelle { font-size: 13px; color: var(--encre-douce); }
.deux { grid-template-columns: 1.1fr 1fr; }

/* La Coupe */
.coupe { display: flex; flex-direction: column; gap: 12px; }
.maison-ligne { display: grid; grid-template-columns: 110px 1fr 52px; align-items: center; gap: 12px; font-size: 14px; }
.barre { height: 12px; background: var(--parchemin-fonce); border-radius: 999px; overflow: hidden; }
.barre span { display: block; height: 100%; border-radius: 999px; min-width: 4px; }
.maison-ligne .pts { text-align: right; font-weight: 600; }

/* Couleurs des maisons */
.m-gryffindor { --m: var(--gryffondor); --m-pale: var(--gryffondor-pale); }
.m-ravenclaw { --m: var(--serdaigle); --m-pale: var(--serdaigle-pale); }
.m-hufflepuff { --m: var(--poufsouffle); --m-pale: var(--poufsouffle-pale); }
.m-slytherin { --m: var(--serpentard); --m-pale: var(--serpentard-pale); }
.barre span { background: var(--m, var(--or)); }
.blason { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; background: var(--m-pale, var(--parchemin-fonce)); color: var(--m, var(--encre-douce)); white-space: nowrap; }

/* Listes d'evenements */
.liste-ev { list-style: none; margin: 0; padding: 0; }
.liste-ev li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--trait); font-size: 14px; align-items: start; }
.liste-ev li:first-child { border-top: 0; }
.liste-ev time { color: var(--encre-douce); font-size: 12.5px; white-space: nowrap; }
.vide { color: var(--encre-douce); font-style: italic; padding: 8px 0; }

/* Les eleves */
.outils { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
input[type=search] { font: inherit; color: var(--encre); background: var(--parchemin); border: 1px solid var(--trait); border-radius: 999px; padding: 9px 16px; min-width: 260px; flex: 1; max-width: 420px; }
input[type=search]:focus { outline: 2px solid var(--or-pale); border-color: var(--or); }
.puce { font: inherit; font-size: 13px; background: var(--parchemin); border: 1px solid var(--trait); color: var(--encre); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.puce.choisie { background: var(--or-pale); border-color: var(--or); font-weight: 600; }
.tableau-eleves { width: 100%; border-collapse: collapse; }
.tableau-eleves th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--encre-douce); text-transform: uppercase; letter-spacing: .06em; padding: 0 12px 10px; }
.tableau-eleves td { padding: 13px 12px; border-top: 1px solid var(--trait); vertical-align: middle; font-size: 14px; }
.tableau-eleves tbody tr { cursor: pointer; }
.tableau-eleves tbody tr:hover td { background: var(--parchemin-fonce); }
.nom-eleve { font-weight: 600; }
.point { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--trait); margin-right: 8px; vertical-align: 1px; }
.point.la { background: var(--vert-vie); box-shadow: 0 0 0 3px var(--serpentard-pale); }
.droite { text-align: right; }

/* Fiche d'un eleve */
.retour { text-decoration: none; color: var(--encre-douce); font-size: 14px; }
.fiche-tete { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.fiche-tete .initiale { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--titre); font-size: 28px;
  background: var(--m-pale, var(--or-pale)); color: var(--m, var(--or-fonce)); border: 2px solid var(--m, var(--or)); }
.fiche-tete h1 { font-size: 28px; }
.details { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.details span { font-size: 13px; background: var(--parchemin-fonce); border-radius: 999px; padding: 2px 10px; }
.persos { display: flex; gap: 10px; flex-wrap: wrap; }
.perso { border: 1px solid var(--trait); border-radius: 12px; padding: 10px 14px; font-size: 14px; background: #fff8; }
.frise-outils { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.frise-outils input[type=search] { min-width: 200px; }
.jour { font-family: var(--titre); font-size: 15px; color: var(--or-fonce); margin: 18px 0 4px; }
.jour:first-child { margin-top: 0; }

.chargement { color: var(--encre-douce); font-style: italic; }

/* ----- Telephone ----- */
@media (max-width: 860px) {
  .bureau { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .menu { position: static; height: auto; padding: 14px 16px; }
  nav { flex-direction: row; flex-wrap: wrap; flex: none; align-items: center; }
  nav .bientot { display: none; }
  .moi { border: 0; padding-top: 8px; }
  .contenu { padding: 20px 16px 50px; }
  .chiffres, .deux { grid-template-columns: 1fr 1fr; }
  .deux { grid-template-columns: 1fr; }
  .masquable { display: none; }
  input[type=search] { min-width: 0; max-width: 100%; width: 100%; }
  .carte { padding: 16px; overflow-x: auto; }
  .tableau-eleves td, .tableau-eleves th { padding-left: 8px; padding-right: 8px; }
}
