body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f4f7f4;
    color: #2d3748;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- HEADER --- */
header {
    background-color: #2d5a27;
    color: #ffffff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-menu-container {
    position: relative;
}

.auth-compact-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.auth-compact-form input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #a3b18a;
    font-size: 0.85em;
    outline: none;
}

.auth-compact-form button {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-login-head {
    background-color: #ffffff;
    color: #2d5a27;
}

.btn-signup-head {
    background-color: #a3b18a;
    color: #ffffff;
}

.btn-user-profile {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.btn-user-profile:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #ffffff;
    color: #2d3748;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    width: 200px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-item {
    padding: 10px 16px;
    color: #2d3748;
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f4f7f4;
    color: #2d5a27;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

/* --- MAIN & LAYOUT GLOBAL --- */
main {
    max-width: 1250px;
    margin: 25px auto;
    padding: 20px;
}

h2 {
    color: #2d5a27;
    margin-top: 0;
    font-size: 1.3em;
}

/* --- BARRE DE FILTRES HORIZONTALE --- */
.filtres-barre {
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.filtres-header h2 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #2d5a27;
}

.filtres-puces-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filtres-puces-grid {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.chip-filter {
    background-color: #f0f4f0;
    color: #2d5a27;
    border: 1px solid #a3b18a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.chip-filter:hover {
    background-color: #a3b18a;
    color: #ffffff;
}

.chip-filter.active {
    background-color: #2d5a27;
    color: #ffffff;
    border-color: #2d5a27;
}

/* --- LAYOUT DUO : CARTE + PANNEAU --- */
.map-and-side-wrapper {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* COLONNE CARTE */
.map-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    min-width: 0;
    /* Assure que la colonne prend la hauteur minimale requise par le conteneur flex */
    min-height: 480px; 
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.map-actions {
    display: flex;
    gap: 8px;
}

#ma-carte {
    width: 100%;
    /* Remplacer 'height: 480px;' par : */
    flex: 1;
    min-height: 400px; /* Sécurité pour conserver une hauteur minimale */
    border-radius: 8px;
    z-index: 1;
}

/* COLONNE PANNEAU LATÉRAL */
.side-panel-column {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
}

.panel-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.panel-placeholder-box {
    background: #ffffff;
    border: 2px dashed #a3b18a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: #6b705c;
    font-size: 0.9em;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.panel-header h3 {
    margin: 0;
    color: #2d5a27;
    font-size: 1.2em;
}

.badges-wrapper {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.panel-desc {
    font-size: 0.9em;
    color: #4a5568;
    white-space: pre-line;
    margin-bottom: 10px;
}

.coords-tag {
    display: block;
    font-family: monospace;
    color: #718096;
    margin-bottom: 15px;
}

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- FORMULAIRES --- */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 4px;
    color: #2d5a27;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.help-text {
    font-size: 0.82em;
    color: #666;
    margin-top: -5px;
    margin-bottom: 15px;
}

.sports-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #fafbfc;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82em;
    max-height: 120px;
    overflow-y: auto;
}

.status-msg {
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 6px;
}

/* --- SPOTS GRID --- */
.section-spots-liste {
    margin-top: 30px;
}

.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.spot-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.spot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.spot-header h3 {
    margin: 0;
    font-size: 1.05em;
    color: #2d5a27;
}

.badge {
    display: inline-block;
    background-color: #e8ede6;
    color: #3a5a40;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

/* --- BOUTONS --- */
button.btn-cta {
    background-color: #3a5a40;
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

button.btn-cta:hover {
    background-color: #2d5a27;
}

.btn-toggle-carte {
    background-color: #ffffff;
    color: #2d5a27;
    border: 1px solid #a3b18a;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-toggle-carte:hover {
    background-color: #2d5a27;
    color: #ffffff;
}

.btn-maps {
    display: block;
    text-align: center;
    padding: 8px 14px;
    background-color: #4285F4;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-maps:hover {
    background-color: #3367D6;
}

.btn-fermer {
    cursor: pointer;
    color: #888;
    font-size: 1.1em;
}

/* --- SECTION CHAT --- */
.chat-section {
    margin-top: 40px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.chat-container {
    display: flex;
    gap: 20px;
    min-height: 350px;
    background: #fafbfc;
    border: 1px solid #a3b18a;
    border-radius: 10px;
    padding: 15px;
}

.chat-salons {
    flex: 1;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.salons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-messages-area {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-quitter {
    display: none;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

.messages-box {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 250px;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

.placeholder-text {
    color: #888;
    font-size: 0.9em;
    text-align: center;
}

.chat-form {
    display: flex;
    gap: 8px;
}

.chat-form input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.9em;
}

footer {
    text-align: center;
    padding: 20px;
    color: #6b705c;
    font-size: 0.9em;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px;
    }

    .user-menu-container {
        display: flex;
        justify-content: center;
    }

    .auth-compact-form {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .auth-compact-form input {
        flex: 1 1 120px; /* S'adapte sur petit écran */
    }

    .chip-filter {
        padding: 8px 16px; /* Plus facile à cliquer sur mobile */
    }

    .map-and-side-wrapper {
        flex-direction: column;
    }

    .side-panel-column {
        flex: none;
        width: 100%;
    }

    #ma-carte {
        height: 380px;
    }

    .chat-container {
        flex-direction: column;
    }

    .chat-salons {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
    }
}

/* Container du logo à gauche */
.brand-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Dimension du logo SVG */
.site-logo {
    height: 45px; /* Ajuste la hauteur selon tes préférences */
    width: auto;  /* Conserve les proportions */
    display: block;
}

.leaflet-container img {
    max-width: none !important;
}

/* style.css */

.pub-box {
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    background-color: #fafafa;
    border: 1px solid #e2e8f0;
    min-height: 250px; /* Évite les saut de mise en page au chargement de la pub */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pub-tag {
    display: block;
    font-size: 0.7em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* --- BANNIÈRE DE BIENVENUE --- */
.banner-welcome {
    background: #ffffff;
    border: 1px solid #a3b18a;
    border-left: 5px solid #2d5a27;
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-in-out;
}

.banner-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.banner-welcome-header h2 {
    margin: 0;
    font-size: 1.25em;
    color: #2d5a27;
}

.banner-welcome-content p {
    margin: 0 0 10px 0;
    font-size: 0.93em;
    color: #4a5568;
}

.banner-rules {
    background-color: #f4f7f4;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.88em;
    color: #2d3748;
}

.banner-rules ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
}

.banner-rules li {
    margin-bottom: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MODALE POURQUOI LA PUB --- */
.modal {
    display: none; /* Masqué par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.25s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #2d5a27;
}

.modal-body h3 {
    margin: 16px 0 6px 0;
    font-size: 1em;
    color: #1a202c;
}

.modal-body p {
    margin: 0 0 12px 0;
    font-size: 0.92em;
    color: #4a5568;
    line-height: 1.5;
}

.modal-footer-note {
    margin-top: 20px !important;
    font-weight: bold;
    text-align: center;
    color: #2d5a27 !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}