/* ============================================================
   FSRS — Disciplines Page CSS
   Refonte Design 2025
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Oswald:wght@400;500;600;700&display=swap');

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

:root {
    --primary:       #2E8B57;
    --primary-dark:  #1a3a2f;
    --primary-mid:   #236b45;
    --primary-light: #f0f7f3;
    --gold:          #FFD700;
    --gold-dark:     #e6c200;
    --white:         #FFFFFF;
    --off-white:     #F9FAFB;
    --text-dark:     #1a1a2e;
    --text-body:     #374151;
    --text-muted:    #6B7280;

    --font-body:    'Montserrat', sans-serif;
    --font-display: 'Oswald', sans-serif;

    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-pill: 50px;
    --radius-full: 9999px;

    --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:    0 6px 24px rgba(0,0,0,0.08);
    --shadow-lg:    0 16px 50px rgba(0,0,0,0.14);
    --shadow-green: 0 16px 50px rgba(46,139,87,0.25);
    --shadow-gold:  0 8px 30px rgba(255,215,0,0.38);

    --ease:     all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Couleurs par type de discipline */
    --color-artistique: #7C3AED;
    --color-vitesse:    #EA580C;
    --color-freestyle:  #0284C7;
    --color-hockey:     #059669;
    --color-urbain:     #DC2626;
}

/* ══════════════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.45); }
    50%       { box-shadow: 0 0 0 12px rgba(255,215,0,0); }
}

/* ══════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* ══════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════ */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 0.75rem 0;
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.18);
    transition: var(--ease);
}

header.scrolled {
    padding: 0.4rem 0;
    background: rgba(26,58,47,0.92);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,215,0,0.12);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo img {
    height: 52px;
    width: auto;
    border-radius: var(--radius-md);
    max-width: 100%;
    transition: var(--ease);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li a {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--ease);
    display: block;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--gold);
    background: rgba(255,215,0,0.08);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: calc(100% - 1.8rem);
}

/* ══════════════════════════════════════════════════════════
   HERO DISCIPLINES — Clip-path + overlay enrichi
   ══════════════════════════════════════════════════════════ */
.hero-disciplines {
    position: relative;
    height: 72vh;
    min-height: 480px;
    background: linear-gradient(
        rgba(26,58,47,0.75) 0%,
        rgba(46,139,87,0.45) 50%,
        rgba(0,0,0,0.60) 100%
    ),
    url('https://images.unsplash.com/photo-1547447134-cd3f5c716030?w=1600&h=800&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Clip-path diagonal en bas */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: -4rem;
}

/* Formes géométriques CSS */
.hero-disciplines::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,215,0,0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.hero-disciplines::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(46,139,87,0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.hero-disciplines-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    max-width: 780px;
}

.hero-disciplines-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.25);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1.2rem;
}

.hero-disciplines-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gold);
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-disciplines-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.88);
    line-height: 1.7;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ══════════════════════════════════════════════════════════
   SECTION DISCIPLINES — fond alterné + layout alternant
   ══════════════════════════════════════════════════════════ */
.disciplines-section {
    padding: 7rem 2rem 5rem;
    position: relative;
    z-index: 2;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.9rem;
}

.section-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--gold) 0%, #FFA500 100%);
    border-radius: var(--radius-full);
}

.section-header p {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.1rem);
    max-width: 580px;
    margin: 0.8rem auto 0;
    line-height: 1.7;
}

/* ── LISTE DES DISCIPLINES avec layout alternant ── */
.disciplines-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Chaque bloc discipline = une section alternée */
.discipline-section {
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Fond blanc pour les pairs */
.discipline-section:nth-child(odd) {
    background: var(--white);
}

/* Fond vert très léger pour les impairs */
.discipline-section:nth-child(even) {
    background: #f0f7f3;
}

/* Ligne décorative entre sections */
.discipline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(46,139,87,0.15), transparent);
}

.discipline-section:first-child::before {
    display: none;
}

.discipline-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 5rem;
}

/* Alternance image gauche / image droite */
.discipline-section:nth-child(even) .discipline-section-inner {
    flex-direction: row-reverse;
}

/* Côté image */
.discipline-section-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.discipline-img-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--ease-out);
}

.discipline-img-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-green);
}

.discipline-img-wrapper img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.discipline-img-wrapper:hover img {
    transform: scale(1.06);
}

/* Overlay image */
.discipline-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(26,58,47,0.55) 100%);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.discipline-img-wrapper:hover::after {
    opacity: 1;
}

/* Icône décorative sur l'image */
.discipline-icon {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: rgba(255,215,0,0.18);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border: 1px solid rgba(255,215,0,0.3);
    transition: var(--ease);
}

.discipline-img-wrapper:hover .discipline-icon {
    background: rgba(255,215,0,0.35);
    animation: floatY 2s ease-in-out infinite;
}

.discipline-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--white);
}

/* Côté texte */
.discipline-section-content {
    flex: 1;
    min-width: 300px;
}

/* Badge de catégorie — couleurs différentes par type */
.discipline-badge {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.2rem;
    box-shadow: 0 3px 12px rgba(0,0,0,0.14);
    position: relative;
    z-index: 3;
}

/* Couleurs par catégorie */
.discipline-badge.artistique {
    background: var(--color-artistique);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}

.discipline-badge.urbain {
    background: var(--color-urbain);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(220,38,38,0.35);
}

.discipline-badge.vitesse {
    background: var(--color-vitesse);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(234,88,12,0.35);
}

.discipline-badge.freestyle {
    background: var(--color-freestyle);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(2,132,199,0.35);
}

.discipline-badge.hockey {
    background: var(--color-hockey);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(5,150,105,0.35);
}

/* Fallback doré */
.discipline-badge:not([class*=" "]) {
    background: var(--gold);
    color: var(--primary-dark);
}

.discipline-section-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.discipline-section-content .subtitle {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.2rem;
    display: block;
}

.discipline-section-content p {
    color: var(--text-body);
    line-height: 1.82;
    font-size: 0.97rem;
    margin-bottom: 1.5rem;
}

/* Séparateur doré sous le titre */
.discipline-divider {
    width: 52px;
    height: 4px;
    background: linear-gradient(135deg, var(--gold) 0%, #FFA500 100%);
    border-radius: var(--radius-full);
    margin-bottom: 1.4rem;
    transition: width 0.4s ease;
}

.discipline-section-inner:hover .discipline-divider {
    width: 90px;
}

/* Statistiques discipline */
.discipline-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.07);
}

.discipline-stat {
    text-align: center;
}

.discipline-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.discipline-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
   GRILLE COMPACTE DES DISCIPLINES (fallback si pas de liste)
   ══════════════════════════════════════════════════════════ */
.disciplines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.discipline-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--ease-spring);
    position: relative;
}

.discipline-card:hover {
    transform: translateY(-16px);
    box-shadow: var(--shadow-green);
}

.discipline-image {
    position: relative;
    width: 100%;
    height: 290px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.discipline-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.50) 100%);
    z-index: 1;
    transition: opacity 0.4s;
}

.discipline-card:hover .discipline-image::before {
    opacity: 0.8;
}

.discipline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.discipline-card:hover .discipline-image img {
    transform: scale(1.12);
}

/* Badge sur l'image */
.discipline-badge-img {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    backdrop-filter: blur(8px);
}

/* Icône sur image */
.discipline-icon-img {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 52px;
    height: 52px;
    background: rgba(255,215,0,0.18);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border: 1px solid rgba(255,215,0,0.3);
    transition: var(--ease);
}

.discipline-card:hover .discipline-icon-img {
    background: rgba(255,215,0,0.35);
    animation: floatY 2s ease-in-out infinite;
}

.discipline-icon-img svg {
    width: 26px;
    height: 26px;
    fill: var(--white);
}

/* Contenu carte */
.discipline-content {
    padding: 2rem;
    background: var(--white);
    position: relative;
}

.discipline-content h3 {
    font-family: var(--font-display);
    color: var(--primary-dark);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.discipline-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 52px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, #FFA500 100%);
    border-radius: var(--radius-full);
    transition: width 0.35s ease;
}

.discipline-card:hover .discipline-content h3::after {
    width: 100px;
}

.discipline-content .subtitle {
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.discipline-content p:not(.subtitle) {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), #FFA500, var(--gold));
}

footer p {
    color: rgba(255,255,255,0.72);
    font-size: 0.92rem;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════ */

/* ── 1200px ── */
@media (max-width: 1200px) {
    .discipline-section-inner { gap: 3.5rem; }
    .discipline-img-wrapper img { height: 320px; }

    .disciplines-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .discipline-image { height: 260px; }
}

/* ── 1024px ── */
@media (max-width: 1024px) {
    .hero-disciplines {
        background-attachment: scroll;
        clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
        margin-bottom: -3rem;
    }

    .discipline-section { padding: 4rem 1.5rem; }
    .discipline-section-inner { gap: 3rem; }
}

/* ── 768px — stack vertical ── */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
    }

    nav ul { justify-content: center; gap: 0.2rem; }
    nav ul li a { font-size: 0.85rem; padding: 0.4rem 0.7rem; }

    .hero-disciplines {
        height: 55vh;
        min-height: 380px;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
        margin-bottom: -2.5rem;
    }

    .disciplines-section { padding: 5rem 1.5rem 4rem; }
    .section-header { margin-bottom: 3.5rem; }

    /* Layout discipline en colonne */
    .discipline-section-inner {
        flex-direction: column !important;
        gap: 2.5rem;
    }

    .discipline-section-image,
    .discipline-section-content { min-width: 100%; }

    .discipline-img-wrapper img { height: 280px; }

    .discipline-section { padding: 3.5rem 1.5rem; }

    .disciplines-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

/* ── 576px ── */
@media (max-width: 576px) {
    .logo img { height: 44px; }

    .hero-disciplines {
        height: auto;
        min-height: 360px;
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
        margin-bottom: -2rem;
    }

    .hero-disciplines-content h1 { font-size: 1.9rem; }
    .hero-disciplines-content p  { font-size: 0.95rem; }

    .disciplines-section { padding: 4rem 1rem 3rem; }
    .section-header h1 { font-size: 1.6rem; }

    .discipline-section { padding: 3rem 1rem; }
    .discipline-section-inner { gap: 2rem; }
    .discipline-img-wrapper img { height: 240px; }

    .discipline-section-content h2 { font-size: 1.6rem; }
    .discipline-section-content p  { font-size: 0.93rem; }

    .discipline-stats { gap: 1.5rem; }
    .discipline-stat-num { font-size: 1.7rem; }

    .disciplines-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .discipline-card { border-radius: var(--radius-lg); }
    .discipline-image { height: 210px; }

    .discipline-badge-img {
        top: 14px;
        right: 14px;
        padding: 0.38rem 0.8rem;
        font-size: 0.72rem;
    }

    .discipline-icon-img {
        width: 44px;
        height: 44px;
        bottom: 14px;
        left: 14px;
    }

    .discipline-icon-img svg { width: 22px; height: 22px; }

    .discipline-content { padding: 1.4rem; }
    .discipline-content h3 { font-size: 1.3rem; }

    footer { padding: 2rem 1rem; }
}

/* ── 360px ── */
@media (max-width: 360px) {
    .logo img { height: 38px; }
    .hero-disciplines { min-height: 300px; }
    .hero-disciplines-content h1 { font-size: 1.6rem; }
    .section-header h1 { font-size: 1.35rem; }
    .discipline-image { height: 185px; }
    .discipline-content h3 { font-size: 1.15rem; }
    .discipline-section-content h2 { font-size: 1.4rem; }
}

/* ── Accessibilité ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hero-disciplines {
        background-attachment: scroll;
        clip-path: none;
    }
}
