/* Surcharge du thème hugo-conference pour un site de trail.
   Le CSS du thème (main.css) ne fournit que la structure : ici on ajoute
   la couleur, la typographie et les composants propres au trail. */

:root {
  /* Couleurs et dégradé Cerulean repris du site principal. */
  --brand: #2fa4e7;
  --heading-blue: #317eac;
  --cerulean-gradient: linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);
  --ink: #555555;
  --muted: #777777;
  --bg: #ffffff;
  --card: #ffffff;
  --accent: #2fa4e7;
  --accent-dark: #178acc;
  --soft-blue: #edf7fd;
  --line: #dbe6ec;
  --input-line: #819aa9;
}

/* Le thème d'origine fixe html à 10px : rétablir la taille du navigateur. */
html {
  font-size: 100%; line-height: 1.5; background: var(--bg);
  scroll-behavior: smooth; scroll-padding-top: 80px;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
a { color: var(--accent); }

/* Largeur fluide (le thème impose 960px fixes) */
.wrapper { width: auto; max-width: 1000px; padding: 0 20px; }

/* Titres : le thème les met en très grand */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h3, h4 { color: var(--heading-blue); }
.section-title { font-size: 2.2rem; margin: 0 0 0.6em; color: var(--heading-blue); }
h3 { font-size: 1.3rem; }
p, li { font-size: 1.05rem; line-height: 1.6; }
p { margin-bottom: 1em; }

/* Navigation sans défilement horizontal ; menu repliable sur petit écran. */
nav {
  display: block; position: sticky; top: 0; left: 0; padding: 0;
  background: var(--cerulean-gradient);
  border-bottom: 1px solid #178acc;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
.nav-inner { display: flex; align-items: center; gap: 8px; max-width: 1280px; }
.nav-links {
  display: flex; flex-wrap: wrap; gap: 0 2px; flex: 1; min-width: 0;
  list-style: none; margin: 0; padding: 0; justify-content: flex-end;
}
.nav-item { margin: 0; flex: 0 1 auto; min-width: 0; }
.nav-link {
  display: block; padding: 14px 8px; font-size: 0.95rem;
  color: #fff; text-decoration: none; overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
.nav-link:hover, .nav-link:focus { background: #178acc; }
.nav-home { font-weight: 700; flex: 0 1 auto; }
.nav-toggle {
  display: none; padding: 10px 14px; min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 4px;
  background: transparent; color: #fff; font: inherit; cursor: pointer;
}
.nav-toggle:hover, .nav-toggle:focus { background: #178acc; }
@media (max-width: 1100px) {
  .nav-inner { flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
  .nav-home { flex: 1; min-width: 0; }
  .nav-toggle { flex: 0 0 auto; }
  .nav-links { flex: 0 0 100%; justify-content: flex-start; padding-bottom: 8px; }
  .nav-enhanced .nav-toggle { display: block; }
  .nav-enhanced .nav-links { display: none; }
  .nav-enhanced.menu-open .nav-links { display: flex; }
  .nav-links .nav-item { flex: 1 1 180px; }
  .nav-links .nav-link { padding: 10px 8px; }
}

/* En-tête */
.header {
  background: var(--cerulean-gradient);
  border-bottom: 5px solid var(--brand);
  color: #fff; padding: 70px 0;
}
.logo-name { font-size: clamp(2.2rem, 7vw, 4.5rem); overflow-wrap: anywhere; }
.header .organizer { margin: 0 0 18px; font-size: 1rem; color: #fff; }
.organizer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.logo-link { color: #fff; text-decoration: none; }
.tagline { font-size: 1.3rem; margin-bottom: 30px; color: #fff; }
.call-action-area { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: center; align-items: center; }
.call-action-area .price { font-size: 1.5rem; color: #fff; margin: 0; }
.call-action-area .call-action-link,
.btn {
  background: var(--cerulean-gradient); color: #fff; text-decoration: none;
  border-radius: 6px; font-size: 1.1rem; padding: 14px 26px; top: 0;
  border: 1px solid transparent; font-weight: 600; line-height: 1.35;
  box-shadow: none; text-shadow: none; max-width: 100%; text-align: center;
}
.call-action-area .call-action-link:hover,
.btn:hover, .btn:focus { background: var(--accent-dark); }

/* Le bouton du bandeau reste lisible sur le fond bleu. */
.header .call-action-link { background: #fff; color: var(--heading-blue); border-color: #fff; }
.header .call-action-link:hover, .header .call-action-link:focus { background: #e1f2fc; color: var(--heading-blue); }

/* Sections */
.content { padding: 20px 0 40px; }
.content section { padding: 40px 0; border-bottom: 1px solid var(--line); }
.content section:last-child { border-bottom: 0; }
.about { margin: 0; padding: 40px 0; }

/* Parcours */
.parcours-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.parcours-card {
  background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--brand); border-radius: 8px; padding: 20px;
}
.parcours-name { margin: 0 0 10px; font-size: 1.4rem; color: var(--heading-blue); }
.parcours-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.parcours-stats .stat { display: flex; flex-direction: column; font-size: 0.9rem; color: var(--muted); }
.parcours-stats strong { font-size: 1.15rem; color: var(--ink); }
.parcours-desc { font-size: 0.98rem; color: var(--muted); }
.parcours-meta { display: flex; justify-content: space-between; margin: 0; font-size: 0.95rem; }
.parcours-price { font-weight: 700; color: var(--accent); }

/* Programme */
.schedule-tbl { background: var(--card); border: 1px solid var(--line); box-shadow: none; padding: 8px 16px; }
.schedule-tbl table { width: 100%; border-collapse: collapse; }
.schedule-tbl tbody tr:nth-child(odd) { background: #f5f9fc; }
.schedule-tbl tbody tr:hover { background: var(--soft-blue); }
.schedule-tbl td { font-size: 1rem; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.schedule-tbl .schedule-slot { width: auto; font-size: 1rem; line-height: 1.6; }
.schedule-tbl .schedule-time { width: 110px; font-weight: 700; color: var(--accent); }

/* Inscription (accueil) */
.subtitle { margin-top: 1.4em; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 0.6em; }
.btn-primary { background: var(--cerulean-gradient); }

/* Accès / FAQ */
.access-list { padding-left: 1.2em; }
.faq-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq-item p { margin: 0.6em 0 0.2em; color: var(--muted); }

/* Logos */
.sponsors-list, .partners-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.sponsor-item, .partner-item { width: auto; margin: 0; }
.sponsor--link img, .partner-link img { max-height: 70px; width: auto; }

/* Pages secondaires */
.subpage .page-content { padding-top: 24px; }
.page-title { font-size: 2.4rem; color: var(--heading-blue); margin: 20px 0; }
.prose h2 { font-size: 1.5rem; margin: 1.6em 0 0.5em; color: var(--heading-blue); }
.prose blockquote {
  margin: 0 0 1.5em; padding: 12px 16px; background: var(--soft-blue);
  border-left: 4px solid var(--accent); font-style: normal;
}
.prose blockquote p { margin: 0; font-size: 1rem; }
.notice { background: var(--soft-blue); border-left: 4px solid var(--accent); padding: 14px 16px; }

/* Formulaire d'inscription */
.inscription-form { margin-top: 20px; }
.inscription-form fieldset { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 16px 18px 6px; margin: 0 0 18px; }
.inscription-form legend { font-weight: 700; padding: 0 8px; color: var(--heading-blue); font-size: 1.05rem; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { margin-bottom: 14px; }
.form label { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.form input[type=text], .form input[type=email], .form input[type=tel],
.form input[type=date], .form select {
  display: block; width: 100%; box-sizing: border-box; padding: 11px 10px;
  font-size: 1rem; color: var(--ink); border: 1px solid var(--input-line); border-radius: 6px; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.form input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.check { display: block; font-weight: 400 !important; margin-bottom: 12px; }
.check input { margin-right: 8px; }
.form-note { font-size: 0.95rem; color: var(--muted); }
.form .btn { float: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pied de page */
.footer { background: #f5f5f5; border-top: 1px solid var(--line); color: var(--ink); padding: 30px 0; text-align: center; }
.footer p { font-size: 0.95rem; margin: 0 0 6px; }
.footer a { color: var(--accent); margin: 0 6px; }

@media (max-width: 600px) {
  .header { padding: 54px 0; }
  .section-title { font-size: 1.8rem; }
}

/* Corrections : le CSS du thème supprime les marqueurs de liste et colore les liens */
.steps { list-style: decimal; }
.access-list { list-style: disc; }
.steps li, .access-list li { display: list-item; }
a.btn, a.btn:visited { color: #fff; }
.faq-item summary { list-style: revert; }
.about { background: none; border: 0; }

/* Le reset du thème applique list-style:none à tous les éléments (y compris li) */
.steps li { list-style: decimal; }
.access-list li { list-style: disc; }
.prose a, .form a, .about-text a, .faq-item a { color: var(--accent); text-decoration: underline; }

/* --- Formules, tableau du formulaire, bloc de paiement ------------------- */
.date-line { font-size: 1.5rem; font-weight: 700; margin: 6px 0 4px; }
.header .tagline { font-size: 1.25rem; margin-bottom: 26px; }

.formules-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.formule-card {
  background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--brand); border-radius: 8px; padding: 18px; list-style: none;
}
.formule-name { margin: 0 0 4px; font-size: 1.2rem; color: var(--heading-blue); }
.formule-price { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin: 0 0 6px; }
.formule-desc { font-size: 0.95rem; color: var(--muted); margin: 0; }

.formules-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.formules-table th, .formules-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.formules-table .num { text-align: right; white-space: nowrap; }
.formules-table tfoot td { border-bottom: 0; font-size: 1.15rem; }
.formules-table label { font-weight: 600; }
.form .qty { width: 76px; min-height: 44px; display: inline-block; text-align: center; font-size: 1.1rem; }
.form textarea {
  display: block; width: 100%; box-sizing: border-box; padding: 11px 10px; font-size: 1rem;
  border: 1px solid var(--input-line); border-radius: 6px; background: #fff; color: var(--ink); font-family: inherit;
}

.payment-box { background: var(--soft-blue); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 18px; }
.payment-box h3 { margin: 0 0 8px; text-transform: uppercase; font-size: 1.05rem; color: var(--heading-blue); }
.payment-box dt { font-weight: 700; margin-top: 8px; }
.payment-box dd { margin: 0; overflow-wrap: anywhere; font-size: 1.05rem; }
.payment-box .iban { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; }

/* Corrections formulaire */
.form input[type=number] { color: var(--ink); font-family: inherit; border: 1px solid var(--input-line); border-radius: 6px; background: #fff; padding: 8px 6px; }
.form textarea { height: 6em; min-height: 6em; max-height: 14em; }

/* --- Page de confirmation (générée par static/api/confirmation.php) ------- */
.lead { font-size: 1.15rem; }
.big-code { font-size: 1.8rem; font-weight: 800; color: var(--accent); letter-spacing: 0.03em; margin: 0; word-break: break-word; }
.confirm-box { text-align: center; }
.confirm-recap { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 12px 18px; margin: 0 0 18px; }
.confirm-recap legend { font-weight: 700; padding: 0 8px; color: var(--heading-blue); }

/* --- Section « Les Scouts de Rosée » ------------------------------------- */
.unit-sections {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.unit-card { list-style: none; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; }
.unit-card a { display: block; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.unit-card a:hover { background: var(--soft-blue); }
.unit-card strong { color: var(--heading-blue); font-size: 1.1rem; }
.unit-age { margin-left: 8px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.unit-label { display: block; font-size: 0.9rem; color: var(--muted); }
.unit-links a { margin-right: 4px; }
.unit-links .btn { margin-right: 14px; display: inline-block; margin-bottom: 8px; }

/* Liens lisibles dans le contenu (le thème les met en jaune pâle) */
.content a:not(.btn):not(.call-action-link) { color: var(--accent); text-decoration: underline; }
.content .unit-card a:not(.btn):not(.call-action-link) { color: var(--ink); text-decoration: none; }
.content a.btn, .content a.call-action-link { color: #fff; text-decoration: none; }


/* Le clearfix du vieux thème ne doit pas devenir une case vide dans les grilles. */
.parcours-list::after, .formules-list::after, .unit-sections::after,
.field-row::after, .nav-inner::after, .nav-links::after, .call-action-area::after {
  content: none;
}

/* Accessibilité et petits écrans, sans changer les champs ni le traitement PHP. */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-dark); outline-offset: 4px;
}
nav a:focus-visible, nav button:focus-visible, .header a:focus-visible {
  outline-color: #fff; outline-offset: -3px;
}
.inscription-form fieldset { min-width: 0; }
.form input, .form textarea, .form select { min-width: 0; }
.formules-table { table-layout: fixed; }
.formules-table th { font-size: 0.9rem; overflow-wrap: anywhere; }
.formules-table th:first-child { width: 46%; }
.formules-table th:last-child { width: 32%; }
.formules-table td { overflow-wrap: anywhere; }
.formules-table .num { white-space: normal; }
.formules-table tfoot { background: var(--soft-blue); }
.formules-table tfoot strong { color: var(--heading-blue); }
.faq-item summary { padding: 8px 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.footer a { text-underline-offset: 3px; }
.prose ul { padding-left: 1.3em; margin-bottom: 1em; }
.prose ul li { list-style: disc; }
.prose ol { padding-left: 1.3em; margin-bottom: 1em; }
.prose ol li { list-style: decimal; }
@media (max-width: 480px) {
  .wrapper { padding-left: 16px; padding-right: 16px; }
  .nav-link { padding: 14px 10px; font-size: 0.9rem; }
  .header { padding: 42px 0; }
  .call-action-area { flex-direction: column; }
  .call-action-area .price { margin: 0; font-size: 1.3rem; }
  .page-title { font-size: 2rem; }
  .inscription-form fieldset { padding-left: 12px; padding-right: 12px; }
  .formules-table th, .formules-table td { padding: 10px 3px; }
  .formules-table label { font-size: 0.9rem; }
  .form .qty { width: 64px; max-width: 100%; }
  .unit-age { display: block; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .call-action-area .call-action-link { transition: none; }
}

/* Même ombre discrète que le thème Cerulean, sans voile sombre. */
.logo-link, .tagline, .call-action-area .price { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); }
.content a:not(.btn):hover, .footer a:hover { color: var(--accent-dark); }
