/* Les écrans de la réservation et des espaces. Couleurs et police : la charte du site
   (site/css/mon-trader-ia.css, seule autorité). Fond clair, jamais sombre. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(28px, 6.5vw, 40px); font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.muted { color: var(--muted-foreground); }
.petit { font-size: 14px; }

/* En-tête */
.entete { border-bottom: 1px solid var(--border); background: rgba(250,250,247,.9); position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px); }
.entete .dedans { max-width: 1040px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 28px; height: 28px; display: block; flex: none; }
.wordmark { font-weight: 700; font-size: 12px; letter-spacing: var(--tracking-wordmark); text-transform: uppercase; white-space: nowrap; }
.wordmark b { color: var(--accent-text); }
.entete nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.entete nav::-webkit-scrollbar { display: none; }
.entete nav a { text-decoration: none; color: var(--muted-foreground); font-size: 14px; font-weight: 550; padding: 7px 11px;
  border-radius: 999px; white-space: nowrap; }
.entete nav a.actif { background: var(--accent-wash); color: var(--accent-text); }

/* Mise en page */
.page { max-width: 640px; margin: 0 auto; padding: 28px 16px 80px; }
.page.large { max-width: 1040px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 10px; }
.intro { color: var(--muted-foreground); font-size: 17px; margin: 12px 0 24px; }

/* Les étapes */
.etapes { display: flex; gap: 6px; margin: 0 0 22px; }
.etapes span { flex: 1; height: 4px; border-radius: 4px; background: var(--cadran-vide); }
.etapes span.fait { background: var(--accent); }

/* Cartes et formulaires */
.carte { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(10,11,16,.03); }
.carte.douce { background: var(--muted); border-color: transparent; box-shadow: none; }
.question { font-weight: 600; margin: 0 0 10px; }
.question small { display: block; font-weight: 400; color: var(--muted-foreground); font-size: 14px; margin-top: 2px; }
.ouinon { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card); font-weight: 600; cursor: pointer;
  text-align: center; transition: background .15s, border-color .15s, color .15s; }
.choix input:checked + span { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-text); }
.choix input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
label.champ { display: block; font-weight: 600; margin: 0 0 6px; }
label.champ small { font-weight: 400; color: var(--muted-foreground); }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: inherit; background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 13px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ring); outline-offset: 1px; border-color: transparent; }
.groupe { margin: 0 0 16px; }
.erreur { color: var(--error); font-size: 14px; margin: 6px 0 0; }
.alerte { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 15px; }
.alerte.rouge { background: rgba(185,28,28,.07); color: var(--error); }
.alerte.violet { background: var(--accent-wash); color: var(--accent-text); }
.alerte.vert { background: rgba(21,128,61,.08); color: var(--success); }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  font: inherit; font-weight: 650; font-size: 17px; background: var(--primary); color: var(--on-primary); border: 0;
  border-radius: 12px; padding: 12px 20px; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(110,97,214,.28), inset 0 1px 0 rgba(255,255,255,.2); }
.bouton:hover { filter: brightness(1.04); }
.bouton.second { background: var(--card); color: var(--foreground); border: 1px solid var(--border-strong); box-shadow: none; }
.bouton.discret { background: transparent; color: var(--accent-text); box-shadow: none; min-height: 40px; width: auto; padding: 8px 4px; font-size: 15px; }
.bouton.petit { width: auto; min-height: 38px; font-size: 14px; padding: 8px 14px; border-radius: 10px; }
.actions { display: grid; gap: 10px; margin-top: 22px; }
.lien-retour { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: none; margin: 0 0 16px; }

/* Les jours de départ */
.jours { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 12px; padding-left: 16px;
  padding-right: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.jours::-webkit-scrollbar { display: none; }
.jour { flex: none; scroll-snap-align: start; width: 92px; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 8px; text-align: center; position: relative; }
.jour .nom { font-size: 13px; color: var(--muted-foreground); text-transform: capitalize; }
.jour .num { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.jour .mois { font-size: 13px; color: var(--muted-foreground); }
.jour.actif { border-color: var(--accent); background: var(--accent-wash); }
.jour.actif .num { color: var(--accent-text); }
.pastille { display: inline-block; font-size: 11px; font-weight: 650; letter-spacing: .02em; color: var(--accent-text);
  background: var(--accent-wash); border-radius: 999px; padding: 2px 8px; margin-top: 6px; }
.jour.actif .pastille { background: var(--card); }

/* Les heures */
.heures { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.heures .choix span { min-height: 48px; font-size: 16px; }
.heures-titre { font-size: 14px; font-weight: 600; color: var(--muted-foreground); margin: 16px 0 8px; }

/* La semaine */
.ligne-jour { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border); }
.ligne-jour:first-child { border-top: 0; padding-top: 0; }
.ligne-jour .quand { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ligne-jour .quand b { font-size: 16px; }
.ligne-jour .titre { font-size: 14px; color: var(--muted-foreground); }
.recap { list-style: none; margin: 0; padding: 0; }
.recap li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.recap li:first-child { border-top: 0; }
.recap .num { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-wash); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 17px; }
.recap .quand { font-weight: 650; }
.recap .titre { font-size: 14px; color: var(--muted-foreground); }
.recap .afixer { color: var(--warning); font-size: 14px; font-weight: 600; }

/* Tableaux de l'espace */
.grille { display: grid; gap: 14px; }
@media (min-width: 820px) { .grille.deux { grid-template-columns: 1fr 1fr; } .grille.trois { grid-template-columns: repeat(3, 1fr); } }
.chiffre { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; }
.barre { height: 6px; border-radius: 6px; background: var(--cadran-vide); overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.etat { display: inline-block; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 3px 9px; background: var(--muted);
  color: var(--muted-foreground); }
.etat.violet { background: var(--accent-wash); color: var(--accent-text); }
.etat.rouge { background: rgba(185,28,28,.08); color: var(--error); }
.etat.orange { background: rgba(180,83,9,.09); color: var(--warning); }
.etat.vert { background: rgba(21,128,61,.09); color: var(--success); }
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { padding: 14px 0; border-top: 1px solid var(--border); }
.liste > li:first-child { border-top: 0; padding-top: 4px; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.deroule h4 { margin: 14px 0 6px; font-size: 14px; }
.deroule p, .deroule li { font-size: 15px; color: var(--muted-foreground); }
.deroule ul, .deroule ol { padding-left: 20px; margin: 0 0 10px; }
.deroule blockquote { margin: 6px 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-wash);
  border-radius: 0 8px 8px 0; font-size: 15px; }
details summary { cursor: pointer; font-weight: 600; color: var(--accent-text); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 8px; }
.cache { display: none; }
footer.pied { text-align: center; font-size: 13px; color: var(--muted-foreground); padding: 24px 16px 40px; }
footer.pied a { color: inherit; }

/* -- Le plaisir de choisir (Tevini, 17/11/2026 : « un véritable plaisir de sélectionner ses créneaux ») -- */
.choix span { transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; }
.choix span:active { transform: scale(.96); }
.choix input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary);
  box-shadow: 0 6px 16px rgba(110,97,214,.30); }
.ouinon .choix input:checked + span { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-text); box-shadow: none; }

/* Une rangée d'heures qui défile au doigt */
.rangee { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 10px -18px 0; padding: 2px 18px 6px; }
.rangee::-webkit-scrollbar { display: none; }
.rangee .choix { flex: none; scroll-snap-align: start; }
.rangee .choix span { min-width: 76px; min-height: 46px; }
.rangee .choix.aucune span { min-width: auto; padding: 8px 14px; font-weight: 550; color: var(--muted-foreground); border-style: dashed; }
.rangee .choix.aucune input:checked + span { background: rgba(180,83,9,.08); border-color: var(--warning); color: var(--warning); box-shadow: none; border-style: solid; }

/* Un jour de la semaine */
.carte-jour { position: relative; padding-left: 64px; }
.carte-jour .pion { position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 10px;
  background: var(--muted); color: var(--muted-foreground); display: flex; align-items: center; justify-content: center;
  font-weight: 750; transition: background .2s, color .2s; }
.carte-jour.ok .pion { background: var(--primary); color: var(--on-primary); }
.carte-jour.afixer .pion { background: rgba(180,83,9,.12); color: var(--warning); }
.carte-jour .quand { font-weight: 650; }
.carte-jour .titre { font-size: 14px; color: var(--muted-foreground); }
.carte-jour .rangee { margin-left: 0; padding-left: 0; scroll-padding-left: 0; }
.carte-jour .js-dispos textarea { margin-top: 8px; }

/* La barre d'action, toujours sous le pouce sur téléphone */
.barre-action { position: sticky; bottom: 0; z-index: 5; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250,250,247,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.barre-action .resume { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 0 0 10px; }
.barre-action .points { display: flex; gap: 5px; }
.barre-action .points i { width: 18px; height: 6px; border-radius: 6px; background: var(--cadran-vide); transition: background .2s; }
.barre-action .points i.ok { background: var(--accent); }
.barre-action .points i.afixer { background: var(--warning); opacity: .6; }
.bouton[disabled] { opacity: .45; box-shadow: none; cursor: default; }
@media (min-width: 700px) { .barre-action { position: static; background: none; border: 0; backdrop-filter: none; padding: 0; margin: 22px 0 0; } }

/* Les jours de départ */
.jour { transition: border-color .15s, background .15s, transform .12s; }
.jour:active { transform: scale(.97); }
.jour .libres { font-size: 11px; color: var(--muted-foreground); margin-top: 4px; }

/* La confirmation */
.bravo { text-align: center; padding: 8px 0 6px; }
.bravo .rond { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(110,97,214,.35);
  animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
.bravo .rond svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.frise { list-style: none; margin: 0; padding: 0; position: relative; }
.frise::before { content: ""; position: absolute; left: 20px; top: 22px; bottom: 22px; width: 2px; background: var(--cadran-vide); }
.frise li { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 10px 0; }
.frise .num { position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--border-strong); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: 16px; }
.frise li.prochain .num { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.frise li.fait .num { background: var(--accent-wash); border-color: transparent; }
.frise .quand { font-weight: 650; }
.frise .titre { font-size: 14px; color: var(--muted-foreground); }
.frise .afixer { color: var(--warning); font-size: 14px; font-weight: 600; }
.formateur { display: flex; align-items: center; gap: 12px; }
.formateur .avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #8B7FE0, #5B4FC4);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }

/* L'en-tête des espaces sur téléphone : les onglets passent sur une seconde ligne */
@media (max-width: 760px) {
  .entete .dedans { height: auto; flex-wrap: wrap; padding-top: 12px; gap: 6px; }
  .entete .dedans .brand { height: 32px; }
  .entete nav { width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px 8px; }
}

/* La fiche contact */
input[type=date] { width: 100%; font: inherit; font-size: 16px; color: inherit; background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; min-height: 48px; -webkit-appearance: none; }
.case { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastilles .choix span { min-height: 40px; padding: 6px 14px; border-radius: 999px; font-weight: 550; font-size: 15px; }
.ouinon .choix span small { display: block; }
.fiche-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.fiche-infos div span { display: block; font-size: 12px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .06em; }
.fiche-infos div b { font-weight: 600; word-break: break-word; }

/* La gestion des élèves (18/11/2026) : direction et formateurs */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.alerte.orange { background: rgba(180,83,9,.08); color: var(--warning); }
.bouton.danger { color: var(--error); }
.bouton.danger-plein { background: var(--error); box-shadow: none; }
.liste-eleves > li { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.liste-eleves .qui { min-width: 0; flex: 1 1 260px; }
.liste-eleves .muted { overflow-wrap: anywhere; }
.gestes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.confier-ligne { display: flex; gap: 6px; align-items: center; }
.confier-ligne select { width: auto; min-width: 150px; padding: 8px 10px; font-size: 15px; }
.reglage-places { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border); }
.places { display: flex; align-items: center; gap: 8px; }
.pas-a-pas { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.pas-a-pas button { width: 38px; height: 38px; border: 0; background: var(--muted); font: inherit; font-size: 18px; font-weight: 700;
  color: var(--foreground); cursor: pointer; }
.pas-a-pas input { width: 52px; height: 38px; border: 0; border-radius: 0; padding: 0; text-align: center; font: inherit; font-weight: 700; background: var(--card);
  -moz-appearance: textfield; }
.pas-a-pas input::-webkit-outer-spin-button, .pas-a-pas input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.case { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.case input { width: 18px; height: 18px; accent-color: var(--accent); }
.actions-ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; }
.filtres { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.filtres::-webkit-scrollbar { display: none; }
.filtres a { flex: none; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted-foreground); padding: 7px 12px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--card); white-space: nowrap; }
.filtres a.actif { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-text); }
.filtres a b { font-weight: 700; margin-left: 4px; }
.outils-liste { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.outils-liste input[type=search] { flex: 1 1 220px; width: auto; font: inherit; font-size: 16px; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 10px 13px; background: var(--card); }
.outils-liste select { flex: 0 1 220px; width: auto; padding: 10px 12px; }
.carte-eleve .entre { align-items: flex-start; }
.carte-eleve .liens { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; font-weight: 600; }
.places-moi { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.places-moi .barre { flex: 1; }
.jour-planning { margin: 22px 0 8px; font-size: 15px; font-weight: 700; color: var(--muted-foreground); }
.ligne-rdv { display: grid; grid-template-columns: 72px 1fr; gap: 4px 12px; align-items: start; }
.ligne-rdv .h { white-space: nowrap; font-weight: 750; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ligne-rdv .liens { grid-column: 2; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }

[hidden] { display: none !important; }

/* « Pas eu lieu » : la raison, puis la semaine qui glisse d'un cran (19/11/2026) */
.raisons { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 10px; }
.glisse { list-style: none; margin: 10px 0 0; padding: 0; }
.glisse li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.glisse li:first-child { border-top: 0; }
.glisse .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 750;
  background: var(--accent-wash); color: var(--accent-text); }
.glisse li.a-fixer .num { background: rgba(180,83,9,.09); color: var(--warning); }
.glisse-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; margin-top: 2px; }
.glisse-dates s { color: var(--muted-foreground); }
.glisse-dates .fleche { color: var(--accent-text); font-weight: 700; }
.lien-glisser { color: var(--warning); }
