/* ==========================================================================
   École Les Oliviers — socle commun (site, direction, enseignants, parents)
   Projet concept Démesure. Olivier profond, crème chaude, encre verte, soleil.
   ========================================================================== */

:root {
  --cream: #f6f2e7;
  --paper: #fffdf7;
  --sand: #ece5d3;
  --line: #ddd5c0;
  --ink: #1d2617;
  --ink-2: #4a5440;
  --ink-3: #7b8370;
  --olive: #45622a;
  --olive-2: #5f7f37;
  --leaf: #a9c46a;
  --sun: #f0b23d;
  --sun-soft: #fbe7b8;
  --red: #c9472f;
  --red-soft: #f6d9d0;
  --blue: #2f6db3;
  --blue-soft: #d9e6f5;
  --ok: #3f8a4a;
  --ok-soft: #d7ecd6;

  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;

  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 0 rgba(29, 38, 23, .04), 0 10px 30px -18px rgba(29, 38, 23, .35);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }

/* Bandeau « projet concept » — commun à toutes les démos Démesure */
.demo-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 7px 16px; background: #10160c; color: rgba(246, 242, 231, .7); font-size: 12.5px; }
.demo-bar b { color: var(--paper); font-weight: 600; }
.demo-bar a { color: var(--sun); text-underline-offset: 3px; }
.demo-bar__links { display: flex; flex-wrap: wrap; gap: 2px 16px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease); }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn--olive { background: var(--olive); border-color: var(--olive); color: var(--paper); }
.btn--olive:hover { background: var(--ink); border-color: var(--ink); }
.btn--sun { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn--sun:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Pastilles d'état */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sand); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--late { background: var(--red-soft); color: var(--red); }
.tag--warn { background: var(--sun-soft); color: #8a5a00; }
.tag--info { background: var(--blue-soft); color: var(--blue); }
.tag--plain::before { display: none; }

/* Niveaux scolaires : une couleur chacun, partout */
.lvl { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.lvl--primaire { background: #fde6c2; color: #8a5300; }
.lvl--college { background: #d8e8c4; color: #3c5a1d; }
.lvl--lycee { background: #d6e3f2; color: #24527f; }

/* Cartes */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* Avatar à initiales */
.av { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sand); color: var(--olive); font-family: var(--display); font-weight: 700; font-size: 13px; }

/* Notification toast */
.toast-stack { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; max-width: min(380px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); font-size: 14px; line-height: 1.35; pointer-events: auto; animation: toast-in .5s var(--ease); }
.toast b { display: block; margin-bottom: 2px; }
.toast small { color: rgba(255,253,247,.65); }
.toast__dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--sun); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Logo de l'école : un rameau d'olivier */
.ol-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ol-logo svg { width: 34px; height: 34px; }
.ol-logo span { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: -.02em; }
.ol-logo small { display: block; margin-top: 3px; font-family: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
