/* ============================================
   VARIABLES & RESET
============================================ */
:root {
    /* Couleurs principales - gardons ton identité */
    --primary-dark: #0f0f0f;        /* Fond général */
    --primary-green: #1c3b23;       /* Vert header */
    --secondary-green: #0a3113;     /* Vert bannière */
    --accent-green: #2a5731;        /* Vert menu */
    --light-green: #86ff9f;         /* Vert clair texte */
    
    /* Couleurs d'accentuation */
    --accent-orange: #FFA500;       /* Orange - excellent contraste */
    --accent-yellow: #FFD700;       /* Jaune doré */
    --brand-teal: #00ff88;          /* Vert fluo */
    
    /* Couleurs de texte - TOUJOURS CLAIRES */
    --text-primary: #FFFFFF;        /* Texte principal - BLANC */
    --text-secondary: #E0E0E0;      /* Texte secondaire */
    --text-muted: #B0B0B0;          /* Texte atténué */
    
    /* Couleurs de fond pour conteneurs */
    --container-bg: #1a1a1a;        /* Fond conteneurs */
    --container-border: #2a5731;    /* Bordures */
    --card-bg: #222222;             /* Cartes */
    
    /* États */
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #f44336;
    --info: #2196F3;

    /* Alias pour les blocs ajoutés plus tard (notifications etc.) */
  --panel: var(--container-bg);
  --panel-2: rgba(255,255,255,0.08);
  --accent: var(--accent-orange);
  --bg: var(--primary-dark);
  --brand: var(--light-green);
  --text: var(--text-primary);
  --muted: var(--text-muted);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary); /* TOUJOURS CLAIR */
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHIE & LIENS
============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    color: var(--accent-orange); /* Orange pour les titres principaux */
}

h2 {
    font-size: 2rem;
    color: var(--light-green); /* Vert clair pour les sous-titres */
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

strong, b {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   HEADER & NAVIGATION (Style original préservé)
============================================ */
header {
    background-color: var(--primary-green);
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.user-menu {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.user-menu a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    border-color: var(--accent-orange);
}

/* Menu principal */
.menu-toggle {
    background-color: var(--accent-green);
    color: var(--text-primary);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px 20px;
    display: block;
    width: calc(100% - 40px);
}

.menu-toggle:hover {
    background-color: #3a7d44;
    transform: translateY(-2px);
}

#mainDropdown {
    display: none;
    background: var(--accent-green);
    list-style: none;
    margin: 0 20px 20px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#mainDropdown li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#mainDropdown li:last-child {
    border-bottom: none;
}

#mainDropdown li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

#mainDropdown li a:hover {
    background-color: rgba(255,255,255,0.1);
}

.submenu {
    display: none;
    background: #3a7d44;
    list-style: none;
}

.submenu li a {
    padding-left: 30px;
}

/* Bannière d'accueil */
.welcome-banner {
    background: var(--secondary-green);
    text-align: center;
    color: var(--light-green);
    padding: 15px;
    font-size: 1.1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.ecolobike-logo {
    font-size: 1.3em;
    font-weight: bold;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse-gradient 8s infinite ease-in-out;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
    padding: 0 5px;
}

@keyframes pulse-gradient {
    0%, 100% { background-image: linear-gradient(45deg, #4CAF50, var(--accent-orange)); }
    50% { background-image: linear-gradient(45deg, var(--accent-orange), #4CAF50); }
}

/* ============================================
   CONTENU PRINCIPAL & CONTENEURS
============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.main-content {
    background: var(--container-bg);
    border-radius: 8px;
    border: 1px solid var(--container-border);
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Cartes */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--container-border);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--accent-orange);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-orange), #ff8c00);
    color: #000;
    border: 1px solid var(--accent-orange);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ff8c00, var(--accent-orange));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.3);
    text-decoration: none;
    color: #000;
}

.btn-secondary {
  background: var(--accent-green);
  color: var(--accent-orange);
  border: 2px solid var(--accent-orange);
}

.btn-secondary:hover {
  background: #0e3b15;
  color: var(--accent-yellow);
  transform: translateY(-2px);
}


.btn-success {
    background: var(--success);
    color: white;
    border: 1px solid var(--success);
}

/* ============================================
   SECTIONS SPÉCIFIQUES
============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-green), #2a5731);
    padding: 60px 30px;
    text-align: center;
    border-radius: 12px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero h1 {
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.hero .subtitle {
    color: var(--light-green);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    border: 1px solid var(--container-border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-5px);
}

.feature-card h3 {
    color: var(--accent-orange);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   FORMULAIRES
============================================ */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--container-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
    background: rgba(255,255,255,0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ============================================
   TABLES
============================================ */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid var(--container-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

table th {
    background: var(--primary-green);
    color: var(--text-primary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--container-border);
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--container-border);
    color: var(--text-secondary);
}

table tr:hover {
    background: rgba(255,255,255,0.05);
}

/* ============================================
   ALERTES & MESSAGES
============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success);
    color: var(--light-green);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: var(--warning);
    color: var(--accent-orange);
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border-color: var(--danger);
    color: #ff6b6b;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--info);
    color: #64b5f6;
}

/* ============================================
   FOOTER
============================================ */
footer {
    background-color: var(--primary-green);
    color: var(--text-primary);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 3px solid var(--accent-orange);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    color: var(--light-green);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-orange);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }
    
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 40px 20px;
        margin: 15px 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-menu {
        justify-content: center;
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
    }
    
    .menu-toggle {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #mainDropdown li a {
        padding: 12px 15px;
    }
    
    .card, .feature-card {
        padding: 20px 15px;
    }
}

/* ============================================
   UTILITAIRES
============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Animation pour les chargements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Notifications */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s;
}

.notification-bell:hover {
    background: var(--panel-2);
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: black;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

/* Dropdown notifications */
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--panel);
    border: 1px solid var(--panel-2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.notifications-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

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

.notifications-header {
    padding: 15px;
    border-bottom: 1px solid var(--panel-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h4 {
    margin: 0;
    color: var(--brand);
}

.notifications-header .view-all {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--panel-2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--panel-2);
}

.notification-item.unread {
    background: rgba(76, 175, 80, 0.1);
}

.notification-item.empty {
    text-align: center;
    color: var(--muted);
    cursor: default;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #2a4d2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content strong {
    color: var(--text);
    font-size: 0.9rem;
}

.notification-content p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-content small {
    color: var(--muted);
    font-size: 0.8rem;
}

.notification-action {
    display: flex;
    align-items: center;
}

.mark-read-btn {
    background: none;
    border: 1px solid var(--panel-2);
    color: var(--muted);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mark-read-btn:hover {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.notifications-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--panel-2);
}

.notifications-footer button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background 0.2s;
}

.notifications-footer button:hover {
    background: var(--panel-2);
}

/* Header Notification - Version compacte */
.header-notification {
    position: relative;
    margin-left: 15px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
}

.notification-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: black;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

/* Dropdown compact */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--panel);
    border: 1px solid var(--panel-2);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
    margin-top: 8px;
}

.notification-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

.dropdown-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--panel-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-title {
    font-weight: bold;
    color: var(--text);
    font-size: 0.95rem;
}

.dropdown-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dropdown-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.dropdown-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
}

.notification-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--panel-2);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.notification-sender {
    font-weight: bold;
    color: var(--text);
    font-size: 0.9rem;
}

.notification-mark-read {
    background: none;
    border: 1px solid var(--panel-2);
    color: var(--muted);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.notification-mark-read:hover {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.notification-preview {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.notification-time {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Grille pour les images valides */
.annonce-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.annonce-image-container {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #2a4d2a;
    background: #1a2c1a;
}

.annonce-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

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

/* Section images en attente */
.images-en-attente-section {
    background: rgba(255, 152, 0, 0.05);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.images-attente-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Placeholder pour images en attente */
.image-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, rgba(26, 44, 26, 0.8), rgba(42, 77, 42, 0.8));
    border: 2px dashed #FF9800;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    position: relative;
    transition: all 0.3s;
}

.image-placeholder:hover {
    background: linear-gradient(135deg, rgba(26, 44, 26, 0.9), rgba(42, 77, 42, 0.9));
    border-style: solid;
    transform: translateY(-3px);
}

.placeholder-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #FF9800;
    opacity: 0.7;
}

.placeholder-text {
    color: #a8d5a8;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.placeholder-price {
    background: #FF9800;
    color: black;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.8rem;
    margin: 5px 0;
}

.placeholder-info {
    font-size: 0.7rem;
    color: #5a7a5a;
    margin-top: 5px;
    line-height: 1.2;
}
/* FIX MENU: #mainDropdown est display:none par défaut */
#mainDropdown.show { display: block; }

/* FIX MOBILE: ouvrir le sous-menu si li.active (ton JS toggle 'active') */
@media (max-width: 768px) {
  #mainDropdown li.active > .submenu { display: block; }
}

.header-container {
  background-color: var(--primary-green);
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}


.header-container {
  background-color: var(--primary-green);
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

