/* ==========================================================================
   matchSup — socle graphique (design tokens, reset, composants communs)
   Theme clair, mobile first. Aucun framework, aucune dependance externe.
   ========================================================================== */

:root {
  /* Fonds — releves sur eseo.fr : gris lavande neutre, pas de bleute. */
  --bg:            #f5f5f9;
  --bg-2:          #ffffff;
  --surface:       #ffffff;
  --surface-2:     #f0f0f6;
  --surface-3:     #e6e6ef;
  --line:          #d6d6e2;
  --line-soft:     #e8e8f0;

  /* --- Charte ESEO -------------------------------------------------------
     Trois couleurs de marque :
       --brand-navy  #1c2054   bleu nuit, couleur d'action et de texte
       --brand-cyan  #32aee1   cyan, couleur d'accent et d'aplat
       --brand-coral #ee4836   rouge-orange, alertes et points d'attention
     Le cyan pur n'atteint pas le contraste requis pour du texte sur blanc
     (2,2:1) : --brand-cyan-text en donne une version assombrie, reservee au
     texte et aux icones, tandis que le cyan d'origine sert aux fonds,
     bordures et degrades. */
  --brand-navy:      #1c2054;
  --brand-navy-soft: #2c3475;
  --brand-cyan:      #32aee1;
  --brand-cyan-text: #12769f;
  --brand-coral:     #ee4836;

  /* Textes — le gris secondaire #5f5a72 est celui d'eseo.fr. */
  --text:          #1c2054;
  --text-soft:     #5f5a72;
  /* Assombri par rapport au gris clair d'eseo.fr : il porte ici du petit
     texte (durees, dates, mentions), qui doit rester au-dessus de 4,5:1. */
  --text-mute:     #726e86;

  --accent:        #1c2054;
  --accent-dark:   #12153a;
  --accent-2:      #32aee1;
  --accent-soft:   rgba(50, 174, 225, .14);

  --ok:            #0f9d58;
  --ok-soft:       rgba(15, 157, 88, .12);
  --warn:          #c2761a;
  --warn-soft:     rgba(217, 138, 35, .16);
  --err:           #ee4836;
  --err-soft:      rgba(238, 72, 54, .10);

  /* eseo.fr est presque entierement a angles droits : mille elements a 0px,
     une cinquantaine de cartes a 10px, quelques pastilles a 30px. On garde
     un arrondi discret, plus proche de leur rendu qu'auparavant. */
  --radius:        10px;
  --radius-lg:     16px;
  --radius-sm:     6px;
  --radius-pill:   999px;

  --shadow:        0 12px 32px rgba(15, 30, 53, .10);
  --shadow-sm:     0 3px 10px rgba(15, 30, 53, .07);

  /* eseo.fr compose en CA Slalom (titres : CA Slalom Compressed, graisse 900,
     capitales, approche tres serree). Cette fonte est sous licence : on n'en
     reprend que le TRAITEMENT, avec la pile systeme. Si l'ecole dispose de la
     licence web, il suffit de declarer la @font-face et de la placer en tete
     de --ff-title, sans rien changer d'autre. */
  --ff:       "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ff-title: var(--ff);

  --wrap: 780px;
  --pad: 20px;

  color-scheme: light;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  /* eseo.fr travaille en aplats. On garde un simple souffle de cyan en haut
     de page plutot que les trois degrades precedents. */
  background-image:
    radial-gradient(900px 460px at 88% -10%, rgba(50, 174, 225, .10), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--ff-title);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.02em;
}
h1 { font-size: 1.6rem; font-weight: 900; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }

/* Titre de rubrique facon ESEO : capitales, graisse maximale, tres serre.
   Reserve aux intitules de section — jamais aux noms d'ateliers, dont les
   majuscules internes (HistorIA, ChifuMi, ChatBotIA) portent le sens. */
.title-eseo {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -.015em;
}
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-dark); }

button, input, select, textarea { font: inherit; color: inherit; }

[hidden] { display: none !important; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* --------------------------------------------------------------- logo --- */

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo__mark { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
/* Le logo fourni a un fond blanc opaque : on l'assume en medaillon arrondi
   plutot que de laisser un rectangle blanc sur le degrade de la page. */
.logo__mascot { display: block; width: auto; object-fit: contain; border-radius: 12px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; }
.logo__name em { font-style: normal; color: var(--brand-cyan-text); }
.logo__baseline {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .06s, opacity .15s;
}
.btn:hover { background: var(--surface-2); border-color: #bfc7dd; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* eseo.fr compose ses appels a l'action en aplat, sans degrade. On garde le
   bouton principal plein — sur telephone, un contour seul se lit mal comme
   une cible tactile — mais a plat et a angles francs, comme chez eux. */
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(28, 32, 84, .18);
}
.btn--primary:hover { background: var(--brand-navy-soft); border-color: var(--brand-navy-soft); }

/* Bouton secondaire : le contour fin bleu nuit d'eseo.fr. */
.btn--ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

.btn--danger { background: var(--err-soft); border-color: rgba(238, 72, 54, .3); color: #c3311f; }
.btn--danger:hover { background: rgba(238, 72, 54, .18); }

.btn--sm { min-height: 36px; padding: 0 12px; font-size: .87rem; }
.btn--block { width: 100%; }
.btn--icon { min-height: 38px; width: 38px; padding: 0; }

/* -------------------------------------------------------------- forms --- */

.field { display: block; }
.field__label {
  display: block;
  font-size: .82rem;
  font-weight: 650;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.field__hint { font-size: .78rem; color: var(--text-mute); margin-top: 6px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder { color: #9aa7bd; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input--lg { min-height: 56px; font-size: 1.05rem; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }

/* -------------------------------------------------------------- cards --- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card--pad-lg { padding: 24px; }

/* Petits téléphones : on rend quelques pixels au contenu, sans descendre
   sous une marge de 16 px en bord d'écran. */
@media (max-width: 380px) {
  :root { --pad: 16px; }
  .card { padding: 14px; }
  .card--pad-lg { padding: 18px; }
}

/* -------------------------------------------------------------- chips --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .02em;
  background: var(--surface-3);
  color: var(--text-soft);
  white-space: nowrap;
}
.chip--doing { background: var(--warn-soft); color: #9a5c12; }
.chip--done  { background: var(--ok-soft);   color: #0b7443; }
.chip--off   { background: var(--err-soft);  color: #c3311f; }

/* ------------------------------------------------------------- alerts --- */

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: .9rem;
}
.alert--err  { background: var(--err-soft);  border-color: rgba(238, 72, 54, .28); color: #a82716; }
.alert--ok   { background: var(--ok-soft);   border-color: rgba(15, 157, 88, .26); color: #0a6b3e; }
.alert--warn { background: var(--warn-soft); border-color: rgba(217, 138, 35, .3); color: #8a5310; }

/* ------------------------------------------------------------- divers --- */

.muted { color: var(--text-mute); }
.soft  { color: var(--text-soft); }
.small { font-size: .84rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.divider { height: 1px; background: var(--line-soft); border: 0; margin: 18px 0; }

.progressbar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progressbar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.anim-in { animation: fade-up .28s ease both; }

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