/* ================================================================ */
/* 1. BASES & TYPOGRAPHIE (Style Original) */
/* ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap');

html {
    font-family: 'Open Sans', sans-serif;
    font-size: 100%; /* Retour à une base saine, 160% cassait la mise en page */
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    background-color: #f0f0f0;
    margin: 0;
    padding-top: 130px; /* Espace pour l'entête fixe */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

/* Titres (Style Original) */
h1 {
    font-size: 3em;
    -webkit-text-stroke-width: 1px; /* Affiné pour la lisibilité */
    color: #d14e22;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

h2 {
    font-size: 2em;
    color: #d14e22; /* Orange Club */
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5em;
    color: #3c4ea4; /* Bleu Club */
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================================================ */
/* 2. ENTÊTE (HEADER) - STYLE ORIGINAL RESTAURÉ */
/* ================================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 130px; /* Hauteur fixe comme avant */
    background-color: #3c4ea4; /* Bleu fond */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espacement correct */
    padding: 0 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-bottom: 5px solid #d14e22; /* Liseré orange du bas */
}

/* Logo */
#logo img {
    height: 90px;
    width: auto;
    margin-right: 20px;
}

/* Zone Centrale (Titre + Menu) */
.header-center-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Menu Navigation (Style Boutons Gris/Bleu) */
.desktop-nav {
    display: block;
    width: 100%;
}

    .desktop-nav ul {
        display: flex;
        justify-content: center;
        list-style: none;
        gap: 10px; /* Espacement entre les boutons */
        padding: 0;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .desktop-nav li {
        background-color: #5e7ca4; /* Fond gris/bleu des boutons */
        border: 1px solid #3c4ea4;
        border-radius: 10px;
        padding: 5px 15px;
        transition: all 0.3s ease;
    }

        .desktop-nav li:hover, .desktop-nav li.active {
            background-color: #d14e22; /* Orange au survol */
            border-color: white;
            transform: translateY(-2px);
        }

    .desktop-nav a.menu {
        color: white; /* Texte blanc */
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.9rem;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    }

/* Statut Connexion (Droite) */
.desktop-login-status {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.logged-in-link {
    background-color: #28a745; /* Vert Lucas */
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logged-out-link {
    color: #d14e22 !important;
    font-weight: bold;
    background: white;
    padding: 8px 15px;
    border-radius: 10px;
}

/* Hamburger Mobile (CACHÉ SUR PC) */
.hamburger-button {
    display: none;
}

.mobile-nav-overlay {
    display: none;
}

/* ================================================================ */
/* 3. HERO SECTION (BANDEAU AVEC FORME D'AILE EXACTE) */
/* ================================================================ */
.hero-section {
    position: relative;
    width: 100%;
    height: 60vh; /* Hauteur consistante */
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Effet Parallaxe */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 0; /* Collé à l'entête */
    /* LA FORME EXACTE DEMANDÉE (Pointe vers le bas) */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 50px), 50% 100%, 0 calc(100% - 50px));
}

    /* Filtre sombre pour lisibilité */
    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1;
    }

    .hero-section h2, .hero-section p {
        position: relative;
        z-index: 2;
    }

    .hero-section h2 {
        font-size: 3em;
        text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
        margin-bottom: 10px;
    }

    .hero-section p {
        font-size: 1.4em;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        font-weight: bold;
    }

/* Images par page */
.homepage .hero-section {
    background-image: url('img/hero-homepage.png');
}

.club-life-page .hero-section {
    background-image: url('img/hero-clublife.png');
}

.photo-page .hero-section {
    background-image: url('img/hero-photo.png');
}

.info-page .hero-section {
    background-image: url('img/hero-info.png');
}

.planning-page .hero-section {
    background-image: url('img/planning_hero.jpg');
}

.meteo-page .hero-section {
    background-image: url('img/hero-meteo.png');
}


/* ================================================================ */
/* 4. CONTENU & ARTICLES (ALTERNES ORANGE/BLEU + SPÉCIAUX) */
/* ================================================================ */
.main-content-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Style de base des articles (Cadres) */
article {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 40px; /* Plus d'espace intérieur (augmenter la taille) */
    margin-bottom: 50px; /* Plus d'espace entre les articles */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Ombre plus prononcée pour mettre en valeur */
    text-align: justify;
    border: 5px solid; /* L'épaisseur de la bordure */
    width: 95%; /* Prend bien toute la largeur */
    margin-left: auto;
    margin-right: auto;
}

    /* --- ALTERNANCE DES COULEURS (Automatique) --- */

    /* Les articles impairs (1, 3, 5...) sont ORANGE */
    article:nth-of-type(odd) {
        border-color: #d14e22;
    }

        article:nth-of-type(odd) h2 {
            color: #d14e22;
        }

    /* Les articles pairs (2, 4, 6...) sont BLEU */
    article:nth-of-type(even) {
        border-color: #3c4ea4;
    }

        article:nth-of-type(even) h2 {
            color: #3c4ea4;
        }

    /* --- ARTICLES SPÉCIAUX (Modifications spécifiques) --- */

    /* 1. Newsletter (Plus petit, centré, distinct) */
    article.special-newsletter {
        max-width: 800px; /* Plus petit */
        border-width: 3px;
        border-style: dashed; /* Bordure en pointillés pour différencier */
        border-color: #d14e22 !important; /* Toujours orange */
        background-color: #fff8f5; /* Fond très légèrement orangé */
        text-align: center;
    }

        article.special-newsletter h2 {
            font-size: 1.6em; /* Titre un peu plus petit */
            color: #d14e22 !important;
        }

    /* 2. Appel à l'action "Prendre son envol" (Attractif) */
    article.special-cta {
        background: linear-gradient(to bottom, #ffffff, #eef4ff); /* Dégradé subtil */
        border-color: #3c4ea4 !important; /* Toujours bleu */
        text-align: center;
        padding: 50px;
        transform: scale(1.02); /* Légèrement plus grand */
    }

        article.special-cta h2 {
            color: #3c4ea4 !important;
            font-size: 2.2em;
            text-transform: uppercase;
        }

/* Boutons Généraux */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

    .btn:hover {
        transform: translateY(-3px);
        opacity: 0.9;
    }

.btn-primary {
    background-color: #3c4ea4;
}

.btn-secondary {
    background-color: #d14e22;
}
/* Orange */


/* ================================================================ */
/* 5. STYLE FOOTER (BLEU + SPONSORS) */
/* ================================================================ */
footer {
    background-color: #3c4ea4; /* BLEU CLUB (au lieu de gris) */
    color: white;
    padding: 40px 20px 20px;
    border-top: 8px solid #d14e22; /* Gros liseré orange */
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

    .footer-section h3 {
        color: #ffffff; /* Titre en blanc sur fond bleu */
        border-bottom: 2px solid #d14e22; /* Souligné orange */
        padding-bottom: 10px;
        margin-bottom: 15px;
        font-weight: bold;
    }

    .footer-section p, .footer-section a {
        color: #e0e0e0; /* Blanc cassé pour le texte */
        font-size: 0.95rem;
    }

        .footer-section a:hover {
            color: #fff;
            text-decoration: underline;
            font-weight: bold;
        }

/* Sponsors dans le footer (Encadré blanc pour bien voir les logos) */
.sponsors-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    width: fit-content;
}

.sponsor-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 0.85rem;
    color: #ccc;
}

/* ================================================================ */
/* 6. MODULES SPÉCIFIQUES (METEO, CHAT, PLANNING, PHOTOS) */
/* ================================================================ */

/* --- METEO (meteo.php) --- */
.windy-app-main-widgets {
    background-color: #eef;
    border: 3px solid #3c4ea4;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.flight-conditions-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.general-assessment, .specific-alerts-list-container, .detailed-conditions-grid-container {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    min-width: 300px;
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.condition-card {
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 150px;
}
/* Couleurs Météo */
.card-level-excellent {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.card-level-good {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.card-level-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-level-dangerous {
    color: #dc3545;
    font-weight: bold;
}

/* --- CHAT (vie_du_club.php) --- */
.chat-container {
    border: 1px solid #ddd;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.message-item {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    position: relative;
}

    .message-item.sent {
        align-self: flex-end;
        background: #dcf8c6;
        margin-left: auto;
    }

    .message-item.received {
        align-self: flex-start;
        background: white;
        border: 1px solid #eee;
    }

.chat-form {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

    .chat-form input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 20px;
    }

/* --- PLANNING (planning.php) --- */
#fullCalendar {
    margin-top: 20px;
    min-height: 600px;
}

.fc-event {
    cursor: pointer;
    background-color: #3c4ea4;
    border: none;
    padding: 5px;
}

.highlight-event {
    background: #f0f8ff;
    border-left: 5px solid #d14e22;
    padding: 15px;
    margin-bottom: 20px;
}

/* --- PHOTOS (photo.php) --- */
.carousel-slide {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-images-wrapper {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
}

    .carousel-images-wrapper::-webkit-scrollbar {
        display: none;
    }

.photo-item-wrapper {
    min-width: 100%;
    height: 100%;
}

    .photo-item-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* ================================================================ */
/* --- ACCORDÉONS (STYLE FAQ : Fond Bleu / Texte Blanc) --- */
/* ================================================================ */

.accordion-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: white;
    border: 1px solid #eee;
}

/* L'entête (Le bouton sur lequel on clique) */
.accordion-header {
    background-color: #3c4ea4; /* FOND BLEU */
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 6px solid #d14e22; /* BARRE ORANGE À GAUCHE */
    transition: background-color 0.3s ease;
}

    /* Au survol de la souris */
    .accordion-header:hover {
        background-color: #2a3875; /* Bleu légèrement plus foncé */
    }

    /* Le titre h3 à l'intérieur */
    .accordion-header h3 {
        margin: 0;
        color: white; /* TEXTE BLANC */
        font-size: 1.1rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 10px;
        text-transform: none; /* Pas de majuscules forcées */
    }

/* La petite flèche à droite */
.arrow {
    color: white; /* Flèche blanche */
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Quand c'est ouvert : on tourne la flèche */
.accordion-header.active .arrow {
    transform: rotate(90deg);
}

/* Le contenu (Caché par défaut) */
.accordion-body {
    background: white;
    max-height: 0; /* Caché */
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 20px;
    opacity: 0.8;
}

    /* Le contenu (Visible quand la classe 'show' est ajoutée par le JS) */
    .accordion-body.show {
        max-height: 2000px; /* Assez grand pour tout afficher */
        padding: 20px;
        opacity: 1;
        border-top: 1px solid #eee;
    }

    .accordion-body p {
        margin-bottom: 10px;
        color: #444;
        line-height: 1.6;
    }

/* ================================================================ */
/* 7. RESPONSIVE MOBILE (DESIGN APP) */
/* ================================================================ */


@media (max-width: 1024px) {
    /* Entête Mobile */
    header {
        height: 80px;
        padding: 0 15px;
    }

    #logo img {
        height: 60px;
    }

    /* Cacher Menu PC */
    .desktop-nav, .desktop-login-status {
        display: none;
    }

    /* Hamburger Icon */
    .hamburger-button {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

        .hamburger-button .bar {
            width: 30px;
            height: 3px;
            background: white;
            border-radius: 3px;
            transition: 0.3s;
        }

    /* --- OVERLAY MENU MOBILE --- */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%; /* Plein écran pour plus de propreté */
        background: linear-gradient(135deg, #3c4ea4 0%, #2a3875 100%); /* Dégradé Bleu */
        z-index: 3000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centré verticalement */
    }

        .mobile-nav-overlay.open {
            right: 0;
        }

    /* Croix Fermeture */
    .close-mobile-nav {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
        opacity: 0.8;
        transition: 0.3s;
    }

        .close-mobile-nav:hover {
            opacity: 1;
            transform: rotate(90deg);
        }

    /* Liste des Liens */
    .mobile-nav-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
        text-align: center;
    }

    /* Style des Boutons de Menu */
    .mobile-nav-menu li {
        margin-bottom: 15px;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-nav-menu a {
        display: block;
        color: white;
        font-size: 1.2rem;
        font-weight: 600;
        text-transform: uppercase;
        padding: 15px 0;
        border-radius: 50px; /* Forme capsule */
        background-color: rgba(255, 255, 255, 0.1); /* Blanc transparent */
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.2s ease;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

        /* Effet au clic/actif */
        .mobile-nav-menu a:active,
        .mobile-nav-menu li.active a {
            background-color: #d14e22; /* Orange */
            border-color: #d14e22;
            transform: scale(0.98);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
        }

    /* Bouton Connexion en bas */
    .mobile-login-area {
        margin-top: 40px;
        text-align: center;
        width: 100%;
    }

    .mobile-btn-login {
        display: inline-block;
        background-color: white;
        color: #3c4ea4;
        font-weight: bold;
        padding: 12px 30px;
        border-radius: 10px;
        font-size: 1.1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

        .mobile-btn-login.logged {
            background-color: #28a745;
            color: white;
        }

    /* Ajustements Contenu général */
    body {
        padding-top: 80px;
    }

    .hero-section {
        height: 40vh;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.5em;
    }

    .footer-content {
        flex-direction: column;
    }

    .flight-conditions-header-sections {
        flex-direction: column;
    }
}



/* Image dans le chat */
.chat-image-preview {
    max-width: 100%; /* Ne dépasse pas la bulle */
    max-height: 300px; /* Hauteur max raisonnable */
    width: auto;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 5px;
    display: block;
    cursor: pointer; /* Montre qu'on peut cliquer pour zoomer */
    transition: transform 0.2s;
}

    .chat-image-preview:hover {
        opacity: 0.9;
    }