/* ==========================================================================
   ME2C - Musiqu'École des 2 Com' - Stylesheet
   Thème « mixte » (retenu après essais) : bandeaux sombres (header, hero, nav,
   footer), corps de page clair crème, jaune du logo en accent.
   Tous les composants consomment les variables sémantiques ci-dessous,
   jamais de couleurs en dur ailleurs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Police de titres : Young Serif (auto-hébergée, un seul poids : 400)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: "Young Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/young-serif-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Young Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/young-serif-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Custom properties
   -------------------------------------------------------------------------- */
:root {
    --font-main: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Young Serif", Georgia, "Times New Roman", serif;
    --font-quote: Georgia, "Times New Roman", serif;
    --max-width: 1200px;
    /* Angles droits et ombres discrètes : les cartes s'appuient sur leurs filets
       (border) plutôt que sur l'arrondi et l'ombrage. */
    --radius: 0px;
    --radius-sm: 0px;
    --shadow: 0 1px 2px rgba(20, 16, 8, 0.05);
    --shadow-lg: 0 3px 10px rgba(20, 16, 8, 0.10);

    /* Jaune du logo */
    --accent: #f7c600;
    --accent-contrast: #181308;  /* texte posé sur fond jaune */
    /* Déclinaison lisible sur fond clair (liens, dates) : #7d6000 tient le ratio
       AA 4.5:1 y compris sur --bg-alt (4.98:1). */
    --accent-text: #7d6000;

    --bg: #faf7f0;
    --bg-alt: #f1ebdd;
    --surface: #ffffff;
    --surface-border: #e7dfcd;
    --text: #2c2820;
    --text-soft: #6e6657;
    --heading: #1c180f;
    --link: #7d6000;

    /* États (erreur / succès) */
    --error-text: #c0392b;
    --error-bg: #fdecea;
    --error-border: #f5c6c1;
    --success-text: #1e6b1a;
    --success-bg: #eaf7e9;
    --success-border: #bfe3bc;

    /* Bandeaux sombres (header, nav, chiffres, appel final, footer) */
    --band-bg: #15120b;
    --band-bg-deep: #0d0b06;
    --band-text: #f5f1e6;
    --band-soft: #b5ac97;

    /* Header sombre */
    --header-bg: #15120b;
    --header-text: #f5f1e6;
    --header-tagline: #ffd42a;
    --header-border: #2a251b;

    /* Hero photo : voile sombre dense à gauche (zone de texte), la photo
       respire à droite. */
    --hero-overlay: linear-gradient(90deg,
        rgba(10, 9, 6, 0.93) 0%,
        rgba(10, 9, 6, 0.78) 40%,
        rgba(10, 9, 6, 0.35) 75%,
        rgba(10, 9, 6, 0.18) 100%);
    --hero-text: #e8e2d2;
    --hero-heading: #ffffff;
    --hero-eyebrow: #ffd42a;
    /* Panneau flouté derrière le texte : voile discret, c'est le blur qui porte
       le complément de lisibilité par-dessus le fondu. */
    --hero-panel: rgba(10, 9, 6, 0.3);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hamburger span {
        transition: none;
    }
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Young Serif n'existe qu'en 400 : poids unique et pas de gras synthétisé */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-synthesis-weight: none;
    line-height: 1.25;
    color: var(--heading);
    letter-spacing: 0;
}

/* Focus clavier bicolore : trait sombre + halo jaune, visible sur fond clair
   comme sur les bandeaux sombres. */
:focus-visible {
    outline: 3px solid var(--heading);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--accent);
}

/* Lien d'évitement : invisible jusqu'au focus clavier */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 5000;
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 700;
    padding: 10px 18px;
}

.skip-link:focus {
    left: 12px;
}

/* Masque les éléments Vue avant le montage (script différé) */
[v-cloak] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Uniquement des paddings horizontaux : le raccourci « padding » écraserait les
   paddings verticaux posés par les classes combinées (.footer-grid, .hero-inner…). */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.content {
    flex: 1;
    background-color: var(--bg);
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
    padding: 14px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--header-text);
    min-width: 0;
}

.header-brand:hover {
    text-decoration: none;
    color: var(--header-text);
}

/* Le logo embarque son fond noir : la pastille arrondie le met en valeur sur
   fond clair comme sur fond sombre. */
.header-logo {
    height: 52px;
    width: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-name {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
}

.header-text .tagline {
    font-size: 0.78rem;
    color: var(--header-tagline);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
    background: var(--band-bg);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: none;
    list-style: none;
    flex-wrap: wrap;
    width: 100%;
}

.nav-links a {
    display: block;
    padding: 12px 16px;
    color: var(--band-text);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    text-decoration: none;
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 13px 16px;
    margin-left: -16px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile : menu déroulé sous la barre */
.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--band-bg);
    border-bottom: 2px solid var(--accent);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

/* Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: var(--band-text);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-main);
    /* Les <button> n'héritent pas du line-height : sans ce rappel ils seraient
       plus courts que les liens voisins. */
    line-height: 1.6;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.nav-dropdown-toggle::after {
    content: ' \25BE';
    font-size: 0.7em;
    opacity: 0.7;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active,
.nav-dropdown.open .nav-dropdown-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.nav-dropdown-menu {
    display: none;
    list-style: none;
    background: var(--band-bg);
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

/* Mobile : sous-menu indenté */
.nav-dropdown-menu a {
    padding-left: 32px;
}

/* Bouton « S'inscrire » du menu */
.nav-item-cta {
    display: flex;
    align-items: center;
}

/* Sélecteur à 3 niveaux : il doit battre « .nav-links a:hover » (fond sombre du
   menu), sinon le survol rend le bouton noir sur noir. */
.nav-links a.nav-cta {
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 700;
    margin: 8px 16px;
    padding: 8px 18px;
}

.nav-links a.nav-cta:hover,
.nav-links a.nav-cta.active {
    background: var(--accent);
    color: var(--accent-contrast);
    filter: brightness(1.08);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   7. Boutons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    font-weight: 700;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.2s;
}

.btn:hover {
    filter: brightness(1.07);
    text-decoration: none;
    color: var(--accent-contrast);
}

/* Même hauteur que .btn/.btn-ghost (padding vertical et corps identiques) :
   seul le padding horizontal distingue le CTA. */
.btn.btn-lg {
    padding: 10px 28px;
}

/* Rangée de boutons côte à côte (panneaux d'appel à l'action) */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-ghost {
    display: inline-block;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-ghost:hover {
    background: rgba(128, 128, 128, 0.12);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Hero (accueil)
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    background-size: cover;
    background-position: center 30%;
    color: var(--hero-text);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
}

.hero-inner {
    position: relative;
    padding-top: 64px;
    padding-bottom: 72px;
    max-width: calc(var(--max-width));
}

/* Panneau translucide flouté derrière le texte, par-dessus le fondu crème. */
.hero-content {
    max-width: 640px;
    background: var(--hero-panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 26px 28px;
    border-radius: var(--radius);
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--hero-eyebrow);
    margin-bottom: 14px;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 400;
    color: var(--hero-heading);
    margin-bottom: 18px;
}

/* « ensemble ! » surligné au marqueur jaune, lisible sur photo claire ou sombre.
   inline-block + line-height serré : sinon le fond couvre tout l'espace de la
   ligne et paraît beaucoup plus haut au-dessus des lettres qu'en dessous. */
.hero-title .hero-accent {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-contrast);
    line-height: 1.05;
    padding: 0 0.18em 0.08em;
    border-radius: 0.15em;
}

.hero-lead {
    font-size: 1.02rem;
    max-width: 540px;
    margin-bottom: 26px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    /* Sans ça, les boutons s'étirent à la hauteur du plus grand (align-items
       vaut stretch) et le texte des boutons contour se retrouve collé en haut. */
    align-items: center;
    gap: 12px;
}

/* Mobile : le dégradé horizontal se compresse et laissait le texte directement
   sur la photo (contraste mesuré jusqu'à 1:1). Voile quasi uniforme à la place. */
@media (max-width: 599px) {
    :root {
        --hero-overlay: linear-gradient(180deg,
            rgba(10, 9, 6, 0.92) 0%,
            rgba(10, 9, 6, 0.86) 70%,
            rgba(10, 9, 6, 0.78) 100%);
    }
}

/* --------------------------------------------------------------------------
   10. Sections de contenu
   -------------------------------------------------------------------------- */
.section {
    padding: 52px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.section-title {
    font-size: 1.55rem;
    font-weight: 400;
}

.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 0;
    background: var(--accent);
    margin-top: 8px;
}

.section-link {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.section-link::after {
    content: " \203A"; /* chevron › */
}

.section-intro {
    max-width: 720px;
    color: var(--text-soft);
    margin: -10px 0 26px;
}

/* --- Cartes mission --- */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.mission-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.mission-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.mission-card p {
    font-size: 0.88rem;
    color: var(--text-soft);
}

/* --- Cartes formation (photo) --- */
.formation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.formation-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.formation-card:hover {
    border-color: var(--text-soft);
    text-decoration: none;
    color: inherit;
}

.formation-card img {
    width: 100%;
    height: 185px;
    object-fit: cover;
}

.formation-card .formation-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
}

.formation-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.formation-card p {
    font-size: 0.86rem;
    color: var(--text-soft);
    margin-bottom: 12px;
}

.formation-card .formation-more {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-text);
}

.formation-card .formation-more::after {
    content: " \203A"; /* chevron › */
}

/* --- Cartes événement --- */
.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.event-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.event-date {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-text);
    margin-bottom: 6px;
}

.event-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.event-place {
    font-size: 0.84rem;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.event-card p.event-desc {
    font-size: 0.88rem;
}

.event-ics {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.event-ics::after {
    content: " \203A"; /* chevron › */
}

/* --- Cartes actualité --- */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.news-card {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.news-body {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
}

.news-date {
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.news-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.news-card p {
    font-size: 0.88rem;
    color: var(--text-soft);
}

/* --- Bandeau citation --- */
.quote-band {
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 44px 0;
    text-align: center;
}

.quote-band blockquote {
    font-family: var(--font-quote);
    font-style: italic;
    font-size: 1.45rem;
    line-height: 1.4;
    max-width: 760px;
    margin: 0 auto;
}

/* --- Lieux de cours --- */
.lieux-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.lieu-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Illustration du lieu : dessinée sur fond blanc, elle se fond dans la carte
   (contain : le bâtiment reste entier, jamais recadré). */
.lieu-illustration {
    background: #fff;
    border-bottom: 1px solid var(--surface-border);
}

.lieu-illustration img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: contain;
    padding: 10px 10px 0;
}

.lieu-body {
    padding: 16px 20px 20px;
}

.lieu-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.lieu-card .lieu-sub {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-text);
    margin-bottom: 10px;
}

.lieu-card p {
    font-size: 0.86rem;
    color: var(--text-soft);
}

.lieu-carte {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.lieu-carte::after {
    content: " \203A"; /* chevron › */
}

/* --- Partenaires --- */
.partner-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px 40px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}

.partner-strip img {
    height: 62px;
    width: auto;
}

.partner-strip .partner-more {
    font-size: 0.88rem;
    color: var(--text-soft);
    max-width: 320px;
}

/* --- Appel final --- */
.cta-band {
    background: var(--band-bg-deep);
    color: var(--band-text);
    padding: 56px 0;
    text-align: center;
}

.cta-band h2 {
    color: var(--band-text);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.cta-band p {
    color: var(--band-soft);
    max-width: 620px;
    margin: 0 auto 24px;
}

.cta-band .hero-actions {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   11. Pages intérieures, panneaux, formulaires
   -------------------------------------------------------------------------- */
.page-title {
    font-size: 1.5rem;
    margin: 36px 0 20px;
}

.page-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 0;
    background: var(--accent);
    margin-top: 8px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 48px;
    box-shadow: var(--shadow);
}

.panel-construction {
    text-align: center;
    padding: 56px 24px;
}

/* Titre sobre d'un panneau : sans la barre jaune des h2 de section.
   Le sélecteur composé bat « .page-section h2 » en spécificité. */
.panel-title,
.page-section .panel-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.page-section .panel-title::after {
    content: none;
}

.construction-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 16px;
}

/* --- Formulaires (base pour les phases suivantes) --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 560px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading);
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

.field-validation-error {
    font-size: 0.78rem;
    color: var(--error-text);
}

.validation-summary-errors {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: var(--radius-sm);
    color: var(--error-text);
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.validation-summary-errors ul {
    margin-left: 18px;
}

.form-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Alertes --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--band-bg-deep);
    color: var(--band-soft);
    font-size: 0.85rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-logo {
    height: 40px;
    width: auto;
    border-radius: 6px;
}

.footer-name {
    font-weight: 800;
    color: var(--band-text);
}

.footer-tagline {
    color: var(--accent);
    font-size: 0.78rem;
}

.footer-heading {
    font-weight: 800;
    color: var(--band-text);
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.footer-text {
    margin-bottom: 8px;
}

.site-footer a {
    color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    padding: 2px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    padding-bottom: 20px;
    text-align: center;
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   13. Lightbox photo (partagée, servira à la galerie)
   -------------------------------------------------------------------------- */
body.no-scroll {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox__inner {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 76vh;
    object-fit: contain;
    background: #000;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
}

.lightbox__img:last-child {
    border-radius: var(--radius);
}

.lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: background 0.2s;
}

.lightbox__close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox__meta {
    padding: 14px 20px 18px;
}

.lightbox__title {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.lightbox__comment {
    font-size: 0.9rem;
    color: var(--text-soft);
    white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   14. Utilitaires
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-soft); }
.text-small { font-size: 0.8rem; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* --------------------------------------------------------------------------
   15. Media queries
   -------------------------------------------------------------------------- */

/* Tablette */
@media (min-width: 600px) {
    .header-logo {
        height: 58px;
    }

    .header-name {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 2.7rem;
    }

    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .formation-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lieux-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 900px) {
    html {
        font-size: 16px;
    }

    .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-inner {
        padding-top: 88px;
        padding-bottom: 96px;
    }

    .hero-title {
        font-size: 3.1rem;
    }

    .section {
        padding: 64px 0;
    }

    /* Nav horizontale */
    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .nav-links a {
        padding: 13px 12px;
        font-size: 0.83rem;
    }

    .nav-dropdown-toggle {
        padding: 13px 12px;
        font-size: 0.83rem;
    }

    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 190px;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
        box-shadow: var(--shadow-lg);
        border-top: 2px solid var(--accent);
        z-index: 1001;
    }

    .nav-dropdown-menu a {
        padding-left: 16px;
    }

    /* CTA poussé à droite de la barre */
    .nav-item-cta {
        margin-left: auto;
    }

    .nav-links a.nav-cta {
        margin: 0;
        padding: 7px 18px;
    }

    .mission-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .formation-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1100px) {
    .nav-links a,
    .nav-dropdown-toggle {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
}

/* --------------------------------------------------------------------------
   16. Composants des pages intérieures
   -------------------------------------------------------------------------- */

.page-intro {
    max-width: 760px;
    color: var(--text-soft);
    margin: -8px 0 28px;
}

.page-section {
    margin-bottom: 44px;
}

.page-section h2 {
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.page-section h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 0;
    background: var(--accent);
    margin-top: 6px;
}

/* --- Rangées photo + texte (formations), alternées --- */
.feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
}

.feature-row img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-row h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-row .feature-sub {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-text);
    margin-bottom: 8px;
}

.feature-row p {
    margin-bottom: 10px;
}

.feature-row .feature-infos {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.feature-row .feature-infos li {
    padding: 3px 0;
}

@media (min-width: 900px) {
    .feature-row {
        grid-template-columns: 5fr 7fr;
        gap: 36px;
    }

    .feature-row.reverse > .feature-media {
        order: 2;
    }

    .feature-row img {
        height: 300px;
    }
}

/* --- Tableaux (tarifs) --- */
/* L'ombre et l'arrondi vivent sur le wrapper : posés sur la table, l'arrondi est
   ignoré en border-collapse et l'ombre serait rognée par le scroll horizontal. */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    background: var(--surface);
}

.data-table th {
    background: var(--band-bg);
    color: var(--band-text);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--surface-border);
    vertical-align: top;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .cell-tarif {
    font-weight: 700;
    white-space: nowrap;
}

.tarif-note {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 8px;
}

/* --- Agenda --- */
/* Carte « à la une » : le prochain événement daté, pleine largeur au-dessus de la grille */
.event-une {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-left: 5px solid var(--accent);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.event-une .event-affiche--une {
    width: 200px;
}

.event-une h3 {
    font-size: 1.4rem;
}

@media (max-width: 599px) {
    .event-une {
        flex-direction: column;
    }

    .event-une .event-affiche--une {
        width: 160px;
    }
}

/* Carte « à venir » avec affiche : vignette cliquable à gauche du texte */
.event-card--affiche {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.event-card--past {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    /* .news-card n'a plus de padding propre (médaillons) : le sien vit ici */
    padding: 18px 20px;
}

.event-affiche {
    flex-shrink: 0;
    width: 104px;
    padding: 0;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: none;
    cursor: zoom-in;
    box-shadow: var(--shadow);
}

.event-affiche img {
    display: block;
    width: 100%;
    height: auto;
}

.event-body {
    min-width: 0;
}

/* --- Galerie --- */
.album {
    margin-bottom: 44px;
}

.album-desc {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin: -6px 0 16px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.galerie-item {
    display: block;
    padding: 0;
    border: none;
    overflow: hidden;
    background: var(--surface);
    cursor: zoom-in;
    box-shadow: var(--shadow);
    transition: opacity 0.2s;
}

.galerie-item:hover {
    opacity: 0.88;
}

.galerie-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (min-width: 600px) {
    .album-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 900px) {
    .album-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .galerie-item,
    .galerie-item:hover {
        transition: none;
        transform: none;
    }
}

/* --- Liste de documents (PDF) --- */
.doc-list {
    list-style: none;
}

.doc-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--surface-border);
}

.doc-list li:last-child {
    border-bottom: none;
}

.doc-list .doc-meta {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-left: 6px;
}

/* --- Contacts --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

/* Liste du bureau de l'association */
.bureau-list {
    list-style: none;
    font-size: 0.92rem;
}

.bureau-list li {
    padding: 3px 0;
}

.bureau-list .bureau-role {
    color: var(--text-soft);
}

.prof-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.prof-card {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Médaillon circulaire 125px sur la gauche de la fiche. Sans photo : avatar
   initiales sur fond sombre. */
.prof-photo {
    flex: 0 0 auto;
    align-self: center;
    width: 125px;
    height: 125px;
    margin: 14px 0 14px 14px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--band-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anneau jaune sur les vraies photos seulement : les avatars dessinés
   (provisoires) ont déjà le leur dans l'image. */
.prof-photo--cerclee {
    border: 3px solid var(--accent);
}

.prof-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vignette d'actualité : tuile détourée (fond transparent), affichée telle
   quelle en 125px, sans médaillon. */
.news-photo {
    flex: 0 0 auto;
    align-self: center;
    width: 125px;
    height: 125px;
    margin: 14px 0 14px 14px;
}

.news-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prof-initiales {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--accent);
    letter-spacing: 0.04em;
}

.prof-body {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.prof-card h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.prof-card .prof-disciplines {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-text);
}

@media (min-width: 600px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prof-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .prof-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Étapes numérotées (inscription) --- */
.steps {
    list-style: none;
    counter-reset: step;
    max-width: 720px;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 18px 52px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.steps p {
    font-size: 0.9rem;
    color: var(--text-soft);
}
