:root {
    --bg-light: #ffffff;
    --bg-section: #f4f6f9;
    --bg-card: #ffffff;
    --royal-blue: #0053ff;
    --brand-yellow: #ffd600;
    --text-dark: #0a0c10;
    --text-gray: #5c687e;
    --border-color: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.95);
    --hero-overlay: rgba(255, 255, 255, 0.82);
}

:root.dark-theme {
    --bg-light: #0f172a;
    --bg-section: #1e293b;
    --bg-card: #1e293b;
    --royal-blue: #3b82f6;
    --brand-yellow: #f59e0b;
    --text-dark: #f8fafc;
    --text-gray: #94a3b8;
    --border-color: #334155;
    --header-bg: rgba(15, 23, 42, 0.95);
    --hero-overlay: rgba(15, 23, 42, 0.82);
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
    font-family: 'Big Shoulders Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* NAVIGATION BAR */
header {
    background-color: var(--header-bg);
    border-bottom: 3px solid var(--royal-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    padding: 0;
    margin-left: 15px;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-section);
    transform: scale(1.05);
}

:root:not(.dark-theme) .sun-icon {
    display: none;
}

:root.dark-theme .moon-icon {
    display: none;
}

/* Inputs dark mode styling */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    background-color: var(--bg-card);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    cursor: pointer;
}

.club-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--royal-blue);
}

.nav-logo {
    font-size: 2.3rem;
    font-weight: 900;
    color: var(--text-dark);
}

.nav-logo span {
    color: var(--royal-blue);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--royal-blue);
    border-bottom: 2px solid var(--brand-yellow);
}

/* BOUTONS STYLE PRO */
.btn-pro {
    display: inline-flex;
    align-items: center;
    background-color: var(--royal-blue);
    color: white;
    text-decoration: none;
    padding: 14px 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    clip-path: polygon(0 0, 93% 0, 100% 100%, 7% 100%);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-pro:hover {
    background-color: var(--text-dark);
    color: var(--brand-yellow);
    transform: skewX(-3deg);
}

/* PAGES ET SECTIONS */
.page {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--text-dark);
    padding-bottom: 10px;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}

.section-title span {
    color: var(--royal-blue);
}

/* GRILLES DE CARTES */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.pro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-top: 5px solid var(--royal-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.pro-card:hover {
    border-top-color: var(--brand-yellow);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 83, 255, 0.08);
}

/* HERO ACCUEIL */
.hero {
    height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('images/banniere.jpg') no-repeat center center;
    background-size: cover;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 0.95;
    margin-bottom: 15px;
}

.hero h1 span {
    color: var(--royal-blue);
}

/* Calendrier */
.match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--royal-blue);
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    transition: all 0.2s ease;
}

.match-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 83, 255, 0.06);
}

.match-row.victory {
    border-left-color: #28a745;
}

.match-row.defeat {
    border-left-color: #dc3545;
}

.match-row.draw {
    border-left-color: var(--text-gray);
}

.match-team {
    font-size: 1.4rem;
    font-weight: 700;
}

.match-badge {
    background: var(--text-dark);
    color: var(--brand-yellow);
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: inline-block;
}

.match-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.match-photo-container {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background-color: var(--bg-section);
}

.match-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.match-row:hover .match-photo {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .match-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .match-row > div:last-child {
        text-align: left !important;
        width: 100%;
        border-top: 1px dashed var(--border-color);
        padding-top: 10px;
    }
    
    .match-main-info {
        width: 100%;
    }
}

/* Staff */
.member-role {
    color: var(--royal-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 5px;
}

.member-email {
    font-size: 0.85rem;
    margin-top: 6px;
    font-family: 'Space Grotesk', sans-serif;
}

.member-email a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.member-email a:hover {
    color: var(--royal-blue);
    text-decoration: underline;
}

/* Boutique / Partenaires */
.item-price {
    font-size: 1.8rem;
    color: var(--royal-blue);
    font-weight: 900;
    margin: 10px 0;
}

.partner-logo-box {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-section);
    font-weight: 700;
    color: var(--text-gray);
    border: 2px dashed var(--border-color);
}

/* Mentions Légales */
.legal-content h3 {
    font-size: 1.8rem;
    color: var(--royal-blue);
    margin: 25px 0 10px 0;
}

.legal-content p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

/* FOOTER */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 5%;
    text-align: center;
    margin-top: 60px;
}

.footer-logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-logo-area .club-logo {
    border-color: var(--brand-yellow);
}

.footer-title {
    font-size: 2.3rem;
    font-weight: 900;
}

.footer-social-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social-links a {
    color: var(--brand-yellow);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-social-links a:hover {
    color: white;
}

.footer-legal-link {
    color: #8ea1c1;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    cursor: pointer;
}

.footer-legal-link:hover {
    color: var(--brand-yellow);
}

/* PLANNING HEBDOMADAIRE */
.schedule-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.schedule-day-row {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--royal-blue);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.schedule-day-row:hover {
    box-shadow: 0 5px 15px rgba(0, 83, 255, 0.05);
    border-left-color: var(--brand-yellow);
}

.day-header {
    background: var(--bg-section);
    width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.day-name {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-dark);
}

.day-slots-count {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 5px;
    font-weight: 700;
}

.slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    align-items: center;
    flex-grow: 1;
}

.slot-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 4px;
    min-width: 180px;
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s ease;
}

.slot-card:hover {
    transform: translateY(-2px);
    border-color: var(--royal-blue);
}

.slot-time {
    font-weight: 700;
    color: var(--royal-blue);
    font-size: 1.1rem;
}

.slot-team {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .schedule-day-row {
        flex-direction: column;
    }

    .day-header {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
    }

    .day-slots-count {
        margin-top: 0;
    }

    .slots-container {
        padding: 15px;
    }
}

/* ETAPES D'INSCRIPTION */
.steps-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    text-align: left;
}

.step-card {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.step-number {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(0, 83, 255, 0.08);
    position: absolute;
    top: 5px;
    right: 15px;
    line-height: 1;
}

.step-title {
    font-size: 1.5rem;
    color: var(--royal-blue);
    margin-bottom: 10px;
    font-weight: 700;
}

.step-desc {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 10px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

/* ORGANIGRAMME HIERARCHIQUE */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.org-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.org-group-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--royal-blue);
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    background: #eef3ff;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 83, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 83, 255, 0.02);
}

.org-level {
    display: flex;
    justify-content: center;
    gap: 25px;
    width: 100%;
    flex-wrap: wrap;
    position: relative;
}

.org-card {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid var(--royal-blue) !important;
}

.org-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 83, 255, 0.08);
}

.org-card.primary-card {
    border-top: 6px solid var(--brand-yellow) !important;
    max-width: 360px;
    box-shadow: 0 4px 15px rgba(0, 83, 255, 0.05);
}

.org-card.primary-card h3 {
    font-size: 1.8rem;
}

/* Structure des Pôles (Colonnes sous la présidence) */
.org-pillars {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    margin-top: 10px;
}

.org-pillar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 280px;
    max-width: 340px;
    background: var(--bg-section);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.org-pillar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--royal-blue);
    letter-spacing: 1px;
    margin-bottom: 5px;
    border-bottom: 2px solid rgba(0, 83, 255, 0.1);
    padding-bottom: 5px;
    width: 100%;
    text-align: center;
}

.org-pillar .org-card {
    width: 100%;
    max-width: 100%;
}

/* Badge spécial (ex: Team Buvette) */
.member-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.buvette-badge {
    background-color: #fff9db;
    color: #f59f00;
    border: 1px solid #ffe066;
}

.web-badge {
    background-color: #e7f5ff;
    color: #1c7ed6;
    border: 1px solid #a5d8ff;
}

@media (min-width: 769px) {
    /* Ligne verticale sous la présidence */
    .org-group:nth-child(1) {
        position: relative;
    }
    .org-group:nth-child(1)::after {
        content: "";
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 40px;
        background-color: var(--royal-blue);
        opacity: 0.25;
    }
}

@media (max-width: 768px) {
    .org-pillars {
        flex-direction: column;
        align-items: center;
    }
    .org-pillar {
        width: 100%;
        max-width: 400px;
    }
}

/* CARTES D'EQUIPES AVEC PHOTOS */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 5px solid var(--royal-blue);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    border-top-color: var(--brand-yellow);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 83, 255, 0.08);
}

.team-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-section);
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .team-image {
    transform: scale(1.05);
}

.team-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-title {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: 'Big Shoulders Display', sans-serif;
    text-transform: uppercase;
}

.team-desc {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* RESPONSIVE MOBILE NAVIGATION NAVBAR */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 0.8rem 1rem;
        align-items: center;
    }
    
    .nav-links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px 0;
        gap: 12px;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari, Opera */
    }
    
    .nav-links li {
        flex-shrink: 0;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 6px 12px;
        border-radius: 20px;
        background: var(--bg-section);
        border: 1px solid var(--border-color);
        display: inline-block;
        transition: all 0.2s ease;
    }
    
    .nav-links a.active,
    .nav-links a:hover {
        background: var(--royal-blue);
        color: white;
        border-color: var(--royal-blue);
        border-bottom: none;
    }
}

/* ==========================================================================
   Bouton flottant d'accès rapide Espace Dirigeants
   ========================================================================== */
.floating-dirigeant-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--royal-blue);
    color: white !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.floating-dirigeant-btn .icon {
    font-size: 1.1rem;
}

.floating-dirigeant-btn:hover {
    transform: translateY(-3px) scale(1.03);
    background-color: var(--brand-yellow);
    color: var(--text-dark) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

@media (max-width: 580px) {
    .floating-dirigeant-btn {
        padding: 10px;
        border-radius: 50%;
        width: 46px;
        height: 46px;
        justify-content: center;
        bottom: 20px;
        right: 20px;
    }
    .floating-dirigeant-btn .text {
        display: none;
    }
}

/* Optimization for intermediate screen sizes (tablets and small laptops) to prevent navbar wrapping */
@media (min-width: 769px) and (max-width: 1400px) {
    .navbar {
        padding: 0.8rem 2%;
    }
    .nav-links {
        gap: 10px;
    }
    .nav-links a {
        font-size: 0.75rem;
        padding: 4px 5px;
    }
    .nav-logo {
        font-size: 1.6rem;
    }
    .club-logo {
        width: 40px;
        height: 40px;
    }
}