/* Thème « Bleu spatial » : couleurs du logo Space runners (bleu nuit, bleu électrique, bleu ciel, blanc).
   S'applique quand <html data-theme="espace">. Surcharge la feuille de base. */
html[data-theme="espace"] {
  color-scheme: dark;
  --bg: #050b1f;
  --card: #0b1a45;
  --card-2: #08153a;
  --line: #1b3a7a;
  --line-strong: #2f6bd6;
  --green: #3a9bff;        /* accent principal : bleu électrique */
  --green-bright: #ffffff; /* titres */
  --green-dim: #9cc4ff;    /* texte secondaire : bleu ciel */
  --amber: #ffc94d;        /* or des étoiles */
  --red: #ff5d73;
  --cyan: #7fd4ff;
  --blue-grad: linear-gradient(90deg, #1560ff 0%, #2a8cff 55%, #5cc0ff 100%);
  --title-grad: linear-gradient(180deg, #ffffff 30%, #8fc8ff 100%);
  --deep-grad: linear-gradient(90deg, #0a2f9e 0%, #1247d4 100%); /* bleu foncé : menus */
  --text: #eef5ff;
  --muted: #9cc4ff;
  --st-inscrit: #2a8cff;
  --st-inscrit-bg: #2a8cff;
  --st-souhaite: #ffc94d;
  --st-souhaite-bg: #2b2610;
  --st-aucun: #cfe4ff;
  --st-aucun-bg: #0e2257;
  --radius: 10px;
  --mono: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-family: var(--mono);
  color: var(--text);
  background: var(--bg);
}

html[data-theme="espace"] body {
  background:
    linear-gradient(180deg, rgba(5, 11, 31, .78) 0%, rgba(8, 22, 64, .64) 60%, rgba(12, 40, 110, .55) 100%),
    url("/img/fond-site.jpg") center bottom / cover no-repeat fixed,
    #050b1f;
}
html[data-theme="espace"] body::after { content: none; }
html[data-theme="espace"] a { color: #7fc0ff; }
html[data-theme="espace"] a:hover { color: #fff; }
html[data-theme="espace"] ::selection { background: #2a8cff; color: #fff; }

/* Titres : italique épais blanc vers bleu ciel, comme « SPACE RUNNERS » */
html[data-theme="espace"] h1,
html[data-theme="espace"] h2,
html[data-theme="espace"] h3 { color: #fff; text-shadow: none; font-weight: 800; }
html[data-theme="espace"] h1 {
  font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #0a2a7a) drop-shadow(0 0 14px rgba(42, 140, 255, .45));
}
html[data-theme="espace"] h1::before,
html[data-theme="espace"] h1::after,
html[data-theme="espace"] h2::before { content: none; }
html[data-theme="espace"] h2 { font-style: italic; }
html[data-theme="espace"] strong,
html[data-theme="espace"] b { color: #fff; }

/* En-tête : bleu nuit avec un trait bleu électrique lumineux */
html[data-theme="espace"] .site-header {
  background: rgba(5, 11, 31, .92); backdrop-filter: blur(6px);
  border-bottom: 2px solid #2a8cff; box-shadow: 0 4px 18px rgba(42, 140, 255, .35);
}
html[data-theme="espace"] .brand { color: #fff; font-style: italic; font-weight: 900; text-shadow: 0 0 10px rgba(42, 140, 255, .8); }
html[data-theme="espace"] .nav a { color: var(--muted); border-radius: 999px; font-style: italic; }
html[data-theme="espace"] .nav a:hover { color: #fff; }
html[data-theme="espace"] .nav a.active { background: var(--deep-grad); color: #fff; box-shadow: inset 0 0 0 1px rgba(127, 192, 255, .35); }
html[data-theme="espace"] .nav a.active::before { content: none; }

/* Boutons */
html[data-theme="espace"] .btn { border: 0; border-radius: 999px; background: var(--blue-grad); color: #fff; font-style: italic; box-shadow: 0 4px 18px rgba(42, 140, 255, .4); }
html[data-theme="espace"] .btn::before,
html[data-theme="espace"] .btn::after { content: none; }
html[data-theme="espace"] .btn:hover { background: var(--blue-grad); color: #fff; filter: brightness(1.15); }
html[data-theme="espace"] .btn.secondary { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
html[data-theme="espace"] .btn.secondary:hover { background: #fff; color: #0b1a45; }
html[data-theme="espace"] .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
html[data-theme="espace"] .btn.ghost:hover { background: var(--line-strong); }
html[data-theme="espace"] .btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
html[data-theme="espace"] .btn.danger:hover { background: var(--red); color: #fff; }

/* Formulaires */
html[data-theme="espace"] input[type=text], html[data-theme="espace"] input[type=email], html[data-theme="espace"] input[type=password],
html[data-theme="espace"] input[type=date], html[data-theme="espace"] input[type=number], html[data-theme="espace"] input[type=url],
html[data-theme="espace"] select, html[data-theme="espace"] textarea { background: #061233; color: #fff; border-color: var(--line-strong); }
html[data-theme="espace"] input::placeholder, html[data-theme="espace"] textarea::placeholder { color: #5f86c4; }
html[data-theme="espace"] label { color: #fff; }
html[data-theme="espace"] .form-error { background: #3a0f1c; border-radius: 8px; }
html[data-theme="espace"] .form-ok { background: #0c2a5c; border-radius: 8px; color: #9cc4ff; border-color: #2a8cff; }
html[data-theme="espace"] .form-error::before,
html[data-theme="espace"] .form-ok::before { content: none; }

/* Cartes : bleu nuit avec liseré bleu, comme le cercle du logo */
html[data-theme="espace"] .card,
html[data-theme="espace"] .month,
html[data-theme="espace"] .stat { border: 1px solid #1f4fae; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(127, 192, 255, .15); }

/* Accueil */
html[data-theme="espace"] .hero { border-bottom: 0; background: transparent; }
html[data-theme="espace"] .hero h1 span {
  color: transparent; text-shadow: none;
  background: linear-gradient(180deg, #7fd0ff 0%, #2a8cff 60%, #1560ff 100%); -webkit-background-clip: text; background-clip: text;
}
html[data-theme="espace"] .hero p { color: #e3efff; }
html[data-theme="espace"] .hero-logo { filter: none; }
html[data-theme="espace"] .feature .icon { border-radius: 12px; border-color: #2a8cff; }
html[data-theme="espace"] .zone-pill { border-radius: 999px; border-color: #2a8cff; background: rgba(11, 26, 69, .7); }
html[data-theme="espace"] .zone-pill::before { content: "★ "; color: var(--amber); }
html[data-theme="espace"] .site-footer { border-top: 2px solid #1f4fae; background: #040919; color: var(--muted); }
html[data-theme="espace"] .site-footer .container::before { content: none; }

/* Connexion */
html[data-theme="espace"] .tabs { border-radius: 999px; overflow: hidden; }
html[data-theme="espace"] .tabs button { color: var(--muted); font-style: italic; }
html[data-theme="espace"] .tabs button.active { background: var(--blue-grad); color: #fff; }

/* Calendrier */
html[data-theme="espace"] .swatch { border-radius: 4px; }
html[data-theme="espace"] .swatch.aucun { border: 2px dashed var(--st-aucun); }
html[data-theme="espace"] .month h2 { font-style: italic; }
html[data-theme="espace"] .day { border-radius: 8px; color: var(--muted); }
html[data-theme="espace"] .day.weekend { background: #0a1c4d; }
html[data-theme="espace"] .day.today { border-color: var(--amber); color: var(--amber); }
html[data-theme="espace"] .day.st-aucun { background: var(--st-aucun-bg); border: 2px dashed var(--st-aucun); color: #fff; }
html[data-theme="espace"] .day.st-souhaite { background: var(--st-souhaite-bg); color: var(--amber); }
html[data-theme="espace"] .day.st-inscrit { background: var(--st-inscrit); color: #fff; box-shadow: 0 0 12px rgba(42, 140, 255, .7); }
html[data-theme="espace"] .race-item { border-radius: 0 8px 8px 0; }
html[data-theme="espace"] .race-item:hover { background: #102a66; }
html[data-theme="espace"] .race-item.st-aucun { border-color: var(--st-aucun); }
html[data-theme="espace"] .race-item .date { color: var(--amber); }
html[data-theme="espace"] .badge { border-radius: 999px; }
html[data-theme="espace"] .badge.st-aucun { border: 1px dashed var(--st-aucun); color: #fff; }
html[data-theme="espace"] .badge.st-inscrit { background: #2a8cff; color: #fff; }

/* Fenêtre modale */
html[data-theme="espace"] dialog { border: 0; border-radius: 18px; box-shadow: 0 0 0 2px #2a8cff, 0 20px 60px rgba(0, 0, 0, .55); color: var(--text); }
html[data-theme="espace"] .modal-head { background: linear-gradient(135deg, #0b1a45 0%, #1560ff 100%); color: #fff; border-bottom: 0; }
html[data-theme="espace"] .modal-head h3 { color: #fff; }
html[data-theme="espace"] .modal-head p { color: #cfe4ff; }
html[data-theme="espace"] .close-x { color: #fff; }
html[data-theme="espace"] .status-choices button { border-radius: 10px; color: var(--muted); }
html[data-theme="espace"] .status-choices button[data-status=aucun].active { border: 2px dashed var(--st-aucun); color: #fff; }
html[data-theme="espace"] .status-choices button[data-status=inscrit].active { color: #fff; }

/* Entraînement */
html[data-theme="espace"] .plan-type { border-top-color: #5cc0ff; }
html[data-theme="espace"] .plan-type.semi { border-top-color: #2a8cff; }
html[data-theme="espace"] .plan-type.marathon { border-top-color: #ffffff; }
html[data-theme="espace"] .plan-type .weeks { background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; font-weight: 900; }
html[data-theme="espace"] .plan-type li::before { content: "★ "; color: var(--amber); }
html[data-theme="espace"] .choice-group label { border-radius: 999px; color: var(--muted); }
html[data-theme="espace"] .choice-group label:has(input:checked) { background: var(--blue-grad); border-color: transparent; color: #fff; }
html[data-theme="espace"] .tag { border-radius: 999px; border-color: var(--line-strong); color: #e3efff; }
html[data-theme="espace"] .countdown { border: 0; border-radius: 14px; background: var(--blue-grad); color: #fff; }
html[data-theme="espace"] .countdown b { color: #fff; text-shadow: none; font-style: italic; }
html[data-theme="espace"] .progress { border-radius: 999px; border: 0; background: #061233; padding: 0; overflow: hidden; }
html[data-theme="espace"] .progress div { background: var(--blue-grad); }
html[data-theme="espace"] .pace { border-style: solid; border-radius: 10px; }
html[data-theme="espace"] .pace b { color: #5cc0ff; }
html[data-theme="espace"] .week { border-radius: 12px; }
html[data-theme="espace"] .week summary { color: #fff; }
html[data-theme="espace"] .week summary .phase { border-radius: 999px; }
html[data-theme="espace"] .week summary .phase.base { border-color: #5cc0ff; color: #5cc0ff; }
html[data-theme="espace"] .week summary .phase.dev, html[data-theme="espace"] .week summary .phase { border-color: #2a8cff; color: #7fc0ff; }
html[data-theme="espace"] .week summary .phase.spec { border-color: #fff; color: #fff; }
html[data-theme="espace"] .week summary .phase.taper, html[data-theme="espace"] .week summary .phase.race { border-color: var(--amber); color: var(--amber); }
html[data-theme="espace"] .week.current { border-color: #2a8cff; box-shadow: 0 0 0 1px #2a8cff, 0 0 18px rgba(42, 140, 255, .45); }
html[data-theme="espace"] .week .note::before { content: none; }
html[data-theme="espace"] .session { border-top-style: solid; }
html[data-theme="espace"] .session .when { color: #5cc0ff; }
html[data-theme="espace"] .session.course { background: #2b2610; }
html[data-theme="espace"] .stype { border-radius: 50%; }
html[data-theme="espace"] .stype.ef, html[data-theme="espace"] .stype.recup { background: #5cc0ff; }
html[data-theme="espace"] .stype.qualite, html[data-theme="espace"] .stype.vma { background: var(--red); }
html[data-theme="espace"] .stype.seuil { background: #2a8cff; }
html[data-theme="espace"] .stype.specifique { background: #ffffff; }
html[data-theme="espace"] .stype.sl { background: #7d8bff; }

/* Administration */
html[data-theme="espace"] th { color: #5cc0ff; }
html[data-theme="espace"] th, html[data-theme="espace"] td { border-bottom-style: solid; }
