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

:root {
    --primary-color: #2196F3;
    --secondary-color: #FFC107;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Container global */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu a i {
    font-size: 1.2rem;
}

.user-email {
    color: white;
    opacity: 0.9;
}


.user-info {
    color: white;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info i {
    font-size: 1.2rem;
}


/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem auto;
    max-width: 1400px;
    border-radius: 4px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Auth pages */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.5s ease;
}

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

.auth-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.auth-card .form-group {
    margin-bottom: 1.5rem;
}

.auth-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.auth-card label i {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

.auth-card input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.auth-card .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    margin-top: 1rem;
    font-weight: 600;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-links p {
    margin: 0.5rem 0;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* Password match message */
.password-match-message {
    margin-top: 0.5rem;
    padding: 0.7rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

.password-match-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.password-match-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.auth-card .help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.filter-section input,
.filter-section select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
}

.filter-section input:focus,
.filter-section select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

.sidebar-actions {
    margin: 1.5rem 0;
}

.sidebar-actions .btn {
    width: 100%;
}

.spot-count {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: var(--light-color);
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

/* Map */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.map-instructions {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    font-weight: 500;
}

/* Leaflet popup customization */
.leaflet-popup-content {
    margin: 0.8rem;
    min-width: 200px;
}

.popup-content h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.popup-content p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.popup-content .btn {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

/* Quand on est en mode ajout de spot, mettre le modal derrière la carte */
.modal.adding-spot-mode {
    z-index: 500;
    pointer-events: none;
}

.modal.adding-spot-mode .modal-content {
    pointer-events: auto;
}

/* La carte doit être au-dessus pendant l'ajout */
.map-container.selecting-location {
    z-index: 1000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

/* Forms */
form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Admin Styles */
.admin-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 280px;
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar h3 {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    color: white;
    font-size: 1.3rem;
    border-bottom: 2px solid #34495e;
    padding-bottom: 1rem;
}

.admin-menu {
    list-style: none;
    flex: 1;
}

.admin-menu li {
    margin-bottom: 0.3rem;
}

.admin-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.admin-menu a i {
    margin-right: 0.8rem;
}

.admin-menu a:hover {
    background-color: #34495e;
    padding-left: 2rem;
}

.admin-menu li.active a {
    background-color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
}

.admin-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #34495e;
}

.admin-sidebar-footer .btn {
    width: 100%;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background-color: #f8f9fa;
    overflow-y: auto;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-primary .stat-icon {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
}

.stat-success .stat-icon {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.stat-info .stat-icon {
    background-color: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
}

.stat-warning .stat-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--secondary-color);
}

.stat-details h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--dark-color);
}

.stat-details p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.activity-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    margin-bottom: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.activity-details {
    flex: 1;
}

.activity-details strong {
    display: block;
    color: var(--dark-color);
}

.activity-details small {
    color: #666;
    font-size: 0.85rem;
}

.activity-badge {
    flex-shrink: 0;
}

.activity-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s;
}

.activity-link:hover {
    gap: 0.8rem;
}

/* Admin Tables */
.admin-table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--primary-color);
    color: white;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Role Select */
.role-select {
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.role-select:disabled {
    background-color: var(--light-color);
    cursor: not-allowed;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.2);
    color: #f57c00;
}

.badge-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background-color: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
}

/* Button Icons */
.btn-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin: 0 0.2rem;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-icon.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-icon.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-icon.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-icon.btn-info {
    background-color: #00bcd4;
    color: white;
}

/* Post Conditions */
.post-conditions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}

.post-conditions span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Proposal Status */
.proposal-pending {
    background-color: rgba(255, 193, 7, 0.05);
}

.proposal-approved {
    background-color: rgba(76, 175, 80, 0.05);
}

.proposal-rejected {
    background-color: rgba(244, 67, 54, 0.05);
}

.text-muted {
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-grid,
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table-container {
        overflow-x: scroll;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-card h2 {
        font-size: 1.5rem;
    }
}


.wind-compass,
.wave-compass {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.compass-direction {
    background-color: var(--light-color);
    padding: 0.8rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
}

.compass-direction.good {
    background-color: #c8e6c9;
    color: #2e7d32;
    font-weight: bold;
}

.compass-direction .rating {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.compass-direction strong {
    display: block;
    font-size: 1rem;
}

/* Spot Detail Page */
.spot-detail-container {
    background-color: #f8f9fa;
    min-height: calc(100vh - 80px);
}

.spot-detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1976D2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.spot-detail-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.spot-location {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    opacity: 0.9;
}

.spot-coordinates {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    opacity: 0.8;
}

.spot-detail-content {
    padding: 2rem 0;
}

.spot-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.spot-detail-card,
.spot-detail-map-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spot-detail-card h3,
.spot-detail-map-card h3 {
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
    font-size: 1.3rem;
}

.spot-detail-card h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
    font-size: 1.1rem;
}

.sports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sports-list .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.parking-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: 4px;
}

.config-author {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: #666;
    font-style: italic;
}

.spot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.spot-actions .btn {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .spot-detail-header h1 {
        font-size: 1.5rem;
    }
    
    .spot-actions .btn {
        width: 100%;
    }
}



/* Grille pour les orientations */
.orientation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.orientation-item {
    display: flex;
    flex-direction: column;
}

.orientation-item label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.orientation-item input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

.orientation-item input:focus {
    outline: none;
    border-color: var(--primary-color);
}


/* Galerie de miniatures */
.media-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.media-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.media-thumbnail:hover {
    transform: scale(1.05);
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail {
    position: relative;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
}

.video-overlay i {
    font-size: 3rem;
    color: white;
}

.delete-media-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.delete-media-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.1);
}

/* Modal pour médias en grand */
#media-modal,
#video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
}

.close-media {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close-media:hover {
    color: #ddd;
}

.modal-media-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-media-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-media-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

/* Session cards cliquables */
.session-card {
    transition: all 0.3s;
}

.session-card:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Bouton pour replier les filtres */
.toggle-filters-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.toggle-filters-btn:hover {
    background: #0056b3;
}

.filters-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.filters-content.collapsed {
    max-height: 0;
}

/* Menu déroulant */
./* Menu déroulant - IMPORTANT */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 0.2rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    z-index: 1000;
    margin-top: 0.5rem;
    list-style: none;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-menu i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}




/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-width: none;
        height: auto;
        position: relative;
    }
    
    .map-container {
        height: 60vh;
        min-height: 400px;
    }
}

/* Mobile */
@media (max-width: 768px) {/* ============================================
   RESPONSIVE - NAVIGATION MOBILE
   ============================================ */

/* Tablettes */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.3rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Mobile - ICÔNES UNIQUEMENT */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        padding: 0 0.5rem;
    }
    
    .nav-brand a {
        font-size: 1.3rem;
    }
    
    /* Masquer tous les textes, garder uniquement les icônes */
    .nav-text {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    /* Menu compact horizontal */
    .nav-menu {
        gap: 0.2rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.2rem 0;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-menu li {
        flex-shrink: 0;
    }
    
    .nav-menu a,
    .user-info {
        padding: 0.6rem;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        border-radius: 50%;
    }
    
    .nav-menu a i,
    .user-info i {
        margin: 0;
        font-size: 1.3rem;
    }
    
    /* User info simplifié */
    .user-info {
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Menu déroulant mobile */
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        margin: 0;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
        background: white;
        z-index: 9999;
    }
    
    .dropdown:hover .dropdown-menu,
    .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .dropdown-menu a:last-child {
        border-bottom: none;
    }
    
    /* Overlay pour fermer le menu */
    .dropdown.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
}

/* Très petits mobiles */
@media (max-width: 400px) {
    .nav-brand a {
        font-size: 1.1rem;
    }
    
    .nav-brand a i {
        font-size: 1.2rem;
    }
    
    .nav-menu a,
    .user-info {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .nav-menu a i,
    .user-info i {
        font-size: 1.2rem;
    }
}

/* Desktop - GARDER LE TEXTE */
@media (min-width: 769px) {
    .nav-text {
        display: inline;
    }
    
    .dropdown-arrow {
        display: inline;
    }
}

/* Très petits mobiles */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-brand a {
        font-size: 1.2rem;
    }
    
    .spot-detail-header h1 {
        font-size: 1.2rem;
    }
    
    .wind-compass,
    .wave-compass {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compass-direction {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
    
    .orientation-grid {
        grid-template-columns: 1fr;
    }
    
    .media-gallery-thumbnails {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
}

/* Mode paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .map-container {
        height: 70vh;
    }
    
    .sidebar {
        max-height: 30vh;
        overflow-y: auto;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Améliorer les zones tactiles */
    .btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        padding: 1rem;
    }
    
    select,
    input,
    textarea {
        font-size: 16px !important; /* Évite le zoom automatique sur iOS */
    }
    
    /* Désactiver le hover sur mobile */
    .nav-menu a:hover,
    .btn:hover,
    .session-card:hover {
        transform: none;
    }
}


/* Désactiver la sélection de texte sur les éléments interactifs mobiles */
@media (max-width: 768px) {
    .btn,
    button,
    .nav-menu a,
    .session-card {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Améliorer le scroll sur iOS */
    .modal-content,
    .sidebar,
    .filters-content {
        -webkit-overflow-scrolling: touch;
    }
}


/* FORCER MASQUAGE MOBILE - À mettre TOUT EN BAS */
@media (max-width: 768px) {
    .nav-text,
    .dropdown-arrow {
        display: none !important;
    }
}



/* ============================================
   FILTRES COMPACTS (ADMIN)
   ============================================ */

.filters-section-compact {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.filters-form-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.filter-item-compact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-item-compact label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.filter-item-compact input,
.filter-item-compact select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-actions-compact {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Mobile - Filtres encore plus compacts */
@media (max-width: 768px) {
    .filters-section-compact {
        padding: 0.75rem;
    }
    
    .filters-form-compact {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .filter-item-compact label {
        font-size: 0.75rem;
    }
    
    .filter-item-compact input,
    .filter-item-compact select {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
    
    .filter-actions-compact {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    
    .filter-actions-compact .btn {
        flex: 1;
    }
    
    /* Masquer le texte des boutons sur mobile */
    .btn-text {
        display: none;
    }
    
    .btn i {
        margin: 0;
    }
    
    /* Titre plus petit sur mobile */
    .admin-container h1 {
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Table responsive */
    .admin-table {
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.4rem;
    }
    
    /* Masquer certaines colonnes sur très petits écrans */
    .admin-table th:nth-child(1),
    .admin-table td:nth-child(1) {
        display: none; /* Masquer ID */
    }
}

/* Très petits mobiles */
@media (max-width: 480px) {
    .filters-form-compact {
        grid-template-columns: 1fr;
    }
    
    .filter-actions-compact {
        flex-direction: column;
    }
    
    .filter-actions-compact .btn {
        width: 100%;
    }
    
    /* Afficher le texte des boutons en vertical */
    .btn-text {
        display: inline;
    }
}


/* ============================================
   PAGE HEADER ADMIN
   ============================================ */

.admin-page-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.admin-page-header h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filtres en ligne */
.filters-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}

.filter-group-inline label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.filter-group-inline input,
.filter-group-inline select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-actions-inline {
    display: flex;
    gap: 0.5rem;
}

.btn-compact {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-compact i {
    font-size: 1rem;
}

/* Desktop - garder le texte des boutons */
.btn-text-desktop {
    display: inline;
}

/* Tablettes */
@media (max-width: 1024px) {
    .admin-page-header {
        padding: 1rem;
    }
    
    .filters-form-inline {
        gap: 0.75rem;
    }
    
    .filter-group-inline {
        min-width: 120px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .admin-page-header {
        padding: 0.75rem;
    }
    
    .admin-page-header h1 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .filters-form-inline {
        gap: 0.5rem;
    }
    
    .filter-group-inline {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
    
    .filter-group-inline label {
        font-size: 0.75rem;
    }
    
    .filter-group-inline input,
    .filter-group-inline select {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
    
    .filter-actions-inline {
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .filter-actions-inline .btn {
        flex: 1;
    }
    
    /* Masquer le texte des boutons sur mobile */
    .btn-text-desktop {
        display: none;
    }
    
    .btn-compact {
        padding: 0.5rem;
        justify-content: center;
    }
}

/* Très petits mobiles */
@media (max-width: 480px) {
    .admin-page-header {
        padding: 0.5rem;
    }
    
    .admin-page-header h1 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .filters-form-inline {
        gap: 0.4rem;
    }
    
    .filter-group-inline {
        min-width: 100%;
    }
    
    .filter-actions-inline {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .filter-actions-inline .btn {
        width: 100%;
    }
}

/* Posts list spacing */
.posts-list {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .posts-list {
        margin-top: 0.5rem;
    }
}



/* ============================================
   INDICATEUR CONDITIONS SUR PAGE SPOT
   ============================================ */

.spot-conditions-alert {
    margin: 1.5rem 0;
    animation: slideInDown 0.5s ease-out;
}

.conditions-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    animation: pulse-banner 2s ease-in-out infinite;
}

.spot-conditions-alert.relax .conditions-banner {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: none;
}

.conditions-icon {
    font-size: 3rem;
    position: relative;
    min-width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.windsock-anim {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 2.5rem;
    animation: windsock-wave 1.5s ease-in-out infinite;
}

.wave-anim {
    position: absolute;
    right: 0;
    bottom: 10px;
    font-size: 2.8rem;
    animation: wave-motion 2s ease-in-out infinite;
}

.conditions-text {
    flex: 1;
}

.conditions-text strong {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.conditions-text p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-banner {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.6);
    }
}

@keyframes windsock-wave {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

@keyframes wave-motion {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .conditions-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .conditions-icon {
        min-width: 60px;
        height: 60px;
    }
    
    .conditions-text strong {
        font-size: 1.1rem;
    }
    
    .conditions-text p {
        font-size: 0.95rem;
    }
}

