/* ============================================================
   2. COMPONENTS.CSS - UI Elements
   ============================================================ */

/* --- CONTROLS --- */
button { padding: 0.7rem 1.2rem; border: 1px solid var(--c-primary); border-radius: 0; cursor: pointer; font-family: var(--font-family-sans); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; background-color: var(--c-primary); color: var(--c-text-on-primary); transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; }
button:hover { background-color: transparent; color: var(--c-primary); }
button:disabled { background-color: var(--c-border); border-color: var(--c-border); color: #999; cursor: not-allowed; }
.btn-outline { background-color: transparent; color: var(--c-text); border: 1px solid var(--c-border); }
.btn-outline:hover { border-color: var(--c-primary); background-color: var(--c-surface); }
.btn-danger-small { border: 1px solid var(--c-border); color: var(--c-text-muted); background: transparent; padding: 0.3rem 0.6rem; font-size: 0.65rem; }
.btn-danger-small:hover { color: var(--c-danger); border-color: var(--c-danger); }
.btn-outline.active-state { background-color: var(--c-primary); color: var(--c-text-on-primary); border-color: var(--c-primary); }

/* --- INPUTS --- */
input, select, textarea { width: 100%; padding: 0.7rem; border: 1px solid var(--c-border); border-radius: 0; background-color: var(--c-surface); color: var(--c-text); font-family: var(--font-family-sans); font-size: 0.9rem; transition: border-color 0.2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); }
label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-text-muted); margin-bottom: 0.4rem; }
.controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; align-items: flex-end; margin-bottom: 1.5rem;}
.control-group { display: flex; flex-direction: column; }
.w-full { width: 100%; grid-column: 1 / -1; }

/* Styles Input Search & Pill */
.input-pill-style, .picker-trigger, #modelSelector, #hourSelect { width: 100% !important; max-width: 100%; height: 50px; border-radius: 25px !important; border: 1px solid var(--c-border); background-color: var(--c-surface); padding: 0 20px !important; display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; box-sizing: border-box; appearance: none; text-align: center; }
.custom-select-wrapper { position: relative !important; width: 100%; }
.picker-dropdown { position: absolute !important; top: 100% !important; left: 0 !important; right: 0 !important; width: 100% !important; background: var(--c-surface); border: 1px solid var(--c-border); z-index: 10000; padding: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 15px; border-radius: 12px; margin-top: 5px; bottom: auto !important; transform: none !important; }

/* --- NAV TABS --- */
.tabs { display: flex; gap: 1rem; height: 100%; align-items: center; }
.tab { padding: 0.6rem 1.2rem; cursor: pointer; color: var(--c-text-muted); font-family: var(--font-family-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 30px; transition: all 0.25s ease; }
.tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: stroke 0.2s; }
.tab:hover { background-color: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.tab.active { background-color: var(--c-primary); color: var(--c-text-on-primary); border-color: var(--c-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.tab.disabled { opacity: 0.3; pointer-events: none; cursor: not-allowed; }

.sub-tabs { display: flex; border-bottom: 1px solid var(--c-border); margin-bottom: 1rem; margin-top: 10px; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tab { background: none; border: none; color: var(--c-text-muted); padding: 0.8rem 1.2rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sub-tab:hover { color: var(--c-text); }
.sub-tab.active { color: var(--c-text); border-bottom: 2px solid var(--c-primary); }

/* --- BADGES (Tous styles confondus) --- */
.badge { font-size: 0.6rem; font-weight: 700; padding: 3px 6px; border-radius: 6px; text-transform: uppercase; color: white !important; letter-spacing: 0.5px; line-height: 1; display: inline-block; }
.badge-perso { background-color: #333333 !important; }
.badge-group { background-color: #007AFF !important; }
.badge-public { background-color: #34C759 !important; }

.model-badge-btn { background-color: var(--c-surface); color: var(--c-text-muted); border: 1px solid var(--c-border); padding: 8px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 5px; user-select: none; }
.model-badge-btn:hover { background-color: var(--c-bg); border-color: var(--c-primary); color: var(--c-primary); }
.model-badge-btn.selected { background-color: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; box-shadow: 0 2px 5px rgba(21, 101, 192, 0.15); }
html.dark .model-badge-btn.selected { background-color: #1a3a5a; color: #90caf9; border-color: #4779a5; }
.badge-check { display: none; font-size: 0.8em; }
.model-badge-btn.selected .badge-check { display: inline-block; }

.model-tag { font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; background-color: var(--c-bg); border: 1px solid var(--c-border); color: var(--c-text-muted); cursor: pointer; transition: all 0.2s; }
.model-tag:hover { border-color: var(--c-primary); color: var(--c-primary); }
.model-tag.active { background-color: var(--c-primary); color: var(--c-text-on-primary); border-color: var(--c-primary); }

.min-badge { font-size: 0.7rem; padding: 3px 10px; border: 1px solid #e0e0e0; background: transparent; color: var(--c-text); border-radius: 2px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.05em; }
.min-badge:hover { border-color: var(--c-text); }
.min-badge.active { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }

.unified-badge-btn { background-color: var(--c-surface); color: var(--c-text-muted); border: 1px solid var(--c-border); padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; user-select: none; height: 28px; }
.unified-badge-btn:hover { border-color: var(--c-primary); color: var(--c-primary); background-color: var(--c-bg); }
.unified-badge-btn.selected, .unified-badge-btn.active { background-color: #e3f2fd; color: #1565c0; border-color: #bbdefb; font-weight: 700; }
html.dark .unified-badge-btn.selected, html.dark .unified-badge-btn.active { background-color: #1565c0; color: #e3f2fd; border-color: #0d47a1; }

.hour-pill { font-size: 0.75rem; padding: 2px 10px; border-radius: 12px; background-color: transparent; border: 1px solid var(--c-border); color: var(--c-text); cursor: pointer; transition: all 0.2s; }
.hour-pill:hover { border-color: var(--c-primary); }
.hour-pill.active { background-color: var(--c-text); color: var(--c-bg); border-color: var(--c-text); font-weight: 600; }

.hour-badge-item { font-size: 0.7rem; padding: 2px 8px; border-radius: 12px; background-color: var(--c-surface); border: 1px solid var(--c-border); cursor: pointer; color: var(--c-text); }
.hour-badge-item:hover { border-color: var(--c-primary); }
.hour-badge-item.active { background-color: var(--c-primary); color: var(--c-text-on-primary); border-color: var(--c-primary); }

/* --- MODALES --- */
.modal { display: none; position: fixed; z-index: 9999 !important; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }
.modal-content { background-color: var(--c-bg); margin: 5vh auto; padding: 2rem; border: 1px solid var(--c-border); width: 90%; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); border-radius: 12px; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--c-border); padding-bottom: 0.5rem; }
.close-btn { font-size: 2rem; font-weight: 300; cursor: pointer; line-height: 1; }
.modal-compact { max-width: 900px; } 
.modal-body-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }

/* FIX MODALE SWITCHER */
#forecast-switcher-modal .filter-group, #forecast-switcher-modal .filter-select, #forecast-switcher-modal select { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; display: block; margin-bottom: 10px; }
#forecast-switcher-modal select { height: 45px; font-size: 1rem; padding-left: 10px; }
#switcher-filters-container { width: 100%; padding: 0; display: flex; flex-direction: column; gap: 15px; }

/* --- SWITCH & SLIDER --- */
.switch { position: relative; display: inline-block; width: 34px; height: 20px; margin-left: 10px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #34C759; }
input:checked + .slider:before { transform: translateX(14px); }

/* --- BUTTONS SPÉCIAUX --- */
.star-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 10px; transition: transform 0.2s, color 0.2s; }
.star-btn:hover { transform: scale(1.2); }
.star-active { color: #ffc107; }
html.dark .star-active { color: #ffd700; }
.star-inactive { color: #e0e0e0; }
html.dark .star-inactive { color: #444; }

.btn-round { width: 50px; height: 50px; min-width: 50px; padding: 0; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); box-shadow: 0 4px 12px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1002; transition: transform 0.2s; }
.btn-round:hover { transform: scale(1.05); border-color: var(--c-primary); }

.btn-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.btn-icon:hover { transform: scale(1.05); border-color: var(--c-primary); }

.btn-add-badge { width: 28px; padding: 0; font-size: 1.1rem; line-height: 1; color: var(--c-text-muted); border: 1px dashed var(--c-border); }
.btn-add-badge:hover { border-style: solid; color: var(--c-primary); border-color: var(--c-primary); }

.btn-add-mini { width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--c-text-muted); color: var(--c-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; line-height: 1; }
.btn-add-mini:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn-expand-hours { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 4px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; color: var(--c-text-muted); }
.btn-expand-hours:hover { color: var(--c-primary); border-color: var(--c-primary); }

.btn-pill-config, .btn-pill-action { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.btn-pill-config span, .btn-pill-action span { display: none; }
.btn-pill-config svg, .btn-pill-action svg { margin: 0; }

.action-btn-header { width: 32px; height: 32px; padding: 6px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.action-btn-header svg { width: 100%; height: 100%; }

/* --- UTILITAIRES --- */
.loader-spinner { border: 2px solid #f3f3f3; border-top: 2px solid #3498db; border-radius: 50%; width: 12px; height: 12px; animation: spin 1s linear infinite; display: inline-block; margin-right: 5px; }
.rotating { animation: spin 1s linear infinite; pointer-events: none; opacity: 0.7; }
.app-mini-footer { text-align: center; font-size: 0.7rem; color: var(--c-text-muted); padding: 2rem 0 1rem; margin-top: auto; width: 100%; border-top: 1px solid rgba(0,0,0,0.05); background: var(--c-bg); }
.airspace-info-box { background: rgba(255, 255, 255, 0.95); border: 1px solid var(--c-primary); padding: 10px; font-size: 0.8rem; box-shadow: 0 2px 10px rgba(0,0,0,0.2); max-width: 250px; pointer-events: none; z-index: 1000; }
.airspace-title { font-weight: bold; color: var(--c-danger); margin-bottom: 4px; border-bottom: 1px solid #eee; }
.airspace-detail { margin-bottom: 2px; }

/* --- FONTS HARMONISATION --- */
#forecastSearchContainer input, #forecastFilterBar select, #forecastFilterBar button, .picker-trigger, .model-badge-btn { font-family: var(--font-family-sans) !important; }

/* --- NOUVEAUX STYLES CTA (Fin de fichier) --- */
.cta-tabs-container { display: flex; gap: 8px; padding: 10px 0; margin-bottom: 10px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cta-tabs-container::-webkit-scrollbar { display: none; }
.cta-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background-color: #ffffff; color: var(--c-text); border: 1px solid var(--c-accent-red); border-radius: 4px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; }
.cta-btn svg { width: 16px; height: 16px; fill: currentColor; }
.cta-btn.active { background-color: var(--c-accent-red); color: #ffffff; border-color: var(--c-accent-red); }
.cta-btn:hover:not(.active) { background-color: #fff0f0; }

/* --- PATCH CTA TABS (Correction Onglets) --- */
.cta-tabs-container {
    display: flex !important;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 10px;
    overflow-x: auto;
}
.cta-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: var(--c-bg);
    color: var(--c-text);
    border: 1px solid var(--c-accent-red) !important;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}
.cta-btn.active {
    background-color: var(--c-accent-red) !important;
    color: #ffffff !important;
    border-color: var(--c-accent-red) !important;
}
.cta-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

/* --- SWITCHER LIEUX (Cartouches) --- */
.switcher-locations-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    max-height: 300px;
    overflow-y: auto;
}

.loc-switcher-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    background-color: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    color: var(--c-text);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.loc-switcher-badge:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background-color: var(--c-bg);
}

.loc-switcher-badge.current {
    background-color: var(--c-primary);
    color: var(--c-text-on-primary);
    border-color: var(--c-primary);
    font-weight: 600;
}

/* --- BOUTONS MODAL STYLE (Harmonisation) --- */
.btn-modal-action {
    width: 100%;
    padding: 12px 10px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
    font-family: var(--font-family-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-top: 0; /* Reset */
}

.btn-modal-action:hover {
    border-color: #000000;
    background-color: #fafafa;
}

.btn-modal-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    /* Suppression des bordures pour "sortir du cadre" */
    border-top: none; 
    padding-top: 0; 
}

.btn-half {
    flex: 1;
}

/* --- HISTORIQUE BADGES --- */
.hist-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hist-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    border: 1px solid var(--c-border); /* Contour fin */
    background-color: transparent;     /* Fond transparent */
    color: var(--c-text-muted);
    border-radius: 4px;
    white-space: nowrap;
}

/* ==========================================================================
   1. VARIABLES & BASE (STYLE STANDARD UNIQUE)
   ========================================================================== */
:root {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    --hover-color: #f4f4f4;
    --accent-color: #000000;
    --accent-text: #ffffff;
    --shadow-soft: 0 4px 6px rgba(0,0,0,0.05);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. COMPOSANTS UI (BOUTONS, INPUTS)
   ========================================================================== */
button { font-family: inherit; transition: opacity 0.2s; }

.btn-primary, .btn-black, .btn-action {
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: 1px solid var(--accent-color);
    padding: 12px 24px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary, .btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
}
.btn-secondary:hover { background-color: var(--hover-color); }

.btn-text {
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer; text-decoration: underline;
    font-size: 0.8rem;
}

input, select, textarea {
    display: block; width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: #888;
}
label {
    display: block; margin-bottom: 6px;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; color: var(--text-muted);
    letter-spacing: 0.5px;
}

.badge {
    display: inline-block; padding: 4px 8px;
    font-size: 0.7rem; font-weight: bold;
    border-radius: 4px; text-transform: uppercase;
    color: #fff; background-color: #666;
}
.badge-public { background-color: #2ecc71; }
.badge-group { background-color: #f1c40f; color: #000; }

/* ==========================================================================
   3. MODALES & PROFIL (ESSENTIEL POUR LA MAJ)
   ========================================================================== */
.modal {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto; background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}
.modal-content, .profile-content {
    background-color: var(--bg-card);
    margin: 5% auto; padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%; max-width: 500px;
    border-radius: 8px; position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.close-btn {
    color: var(--text-muted); float: right;
    font-size: 28px; font-weight: bold; cursor: pointer;
}

/* Style spécifique Profil (Avatar Rond + Grille) */
.profile-header-section {
    display: flex; align-items: center; gap: 20px; margin-bottom: 30px;
}
.profile-pic-wrapper {
    position: relative; width: 100px; height: 100px; flex-shrink: 0;
}
#profile-preview {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #370028; background-color: #f0f0f0;
}
.btn-avatar-change {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 16px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; text-transform: uppercase; border-radius: 4px;
}
.btn-avatar-change:hover { background-color: var(--hover-color); }

.form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group.half { flex: 1; }

/* ==========================================================================
   4. AUTOCOMPLETE & TABLES
   ========================================================================== */
.city-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color); border-top: none;
    z-index: 1000; max-height: 200px; overflow-y: auto;
    border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow-soft);
}
.city-suggestion-item {
    padding: 10px; cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.city-suggestion-item:hover { background-color: var(--hover-color); }
.city-suggestion-item small { color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background-color: #f9f9f9; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; color: var(--text-muted); }

/* ==========================================================================
   🔻 AJOUTS REQUIS : À COLLER À LA FIN DE VOTRE FICHIER COMPONENTS.CSS 🔻
   ========================================================================== */

/* --- 1. NOUVEAU STYLE PROFIL (Avatar Rond + Colonnes) --- */
.profile-header-section {
    display: flex; align-items: center; gap: 20px; margin-bottom: 30px;
}
.profile-pic-wrapper {
    position: relative; width: 100px; height: 100px; flex-shrink: 0;
}
#profile-preview {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #370028; background-color: #f0f0f0;
}
.btn-avatar-change {
    background-color: transparent; color: inherit;
    border: 1px solid currentColor; padding: 8px 16px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    text-transform: uppercase; border-radius: 4px;
}

/* Grille pour les champs (Nom/Prénom côte à côte) */
.form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group.half { flex: 1; }

/* --- 2. AUTOCOMPLETE VILLE (Suggestions) --- */
.city-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background-color: #fff; border: 1px solid #ddd;
    border-top: none; z-index: 1000; max-height: 200px; overflow-y: auto;
    border-radius: 0 0 4px 4px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.city-suggestion-item {
    padding: 10px; cursor: pointer; border-bottom: 1px solid #eee;
    color: #333; font-size: 0.9rem;
}
.city-suggestion-item:hover { background-color: #f5f5f5; }

/* --- 3. DARK MODE (Variables & Force Brute) --- */

/* Définition des variables Dark Mode si le body a la classe .dark-mode */
body.dark-mode {
    --bg-main: #121212; --bg-card: #1e1e1e; --text-main: #e0e0e0;
    --border-color: #444; --input-bg: #2d2d2d;
}

/* Application forcée du Dark Mode sur les éléments clés */
body.dark-mode, body.dark-mode .modal-content, body.dark-mode .dashboard-card {
    background-color: #1e1e1e !important; color: #e0e0e0 !important;
}
body.dark-mode header, body.dark-mode nav, body.dark-mode .menu-dropdown {
    background-color: #000000 !important; color: #fff !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background-color: #2d2d2d !important; color: #fff !important;
    border: 1px solid #555 !important;
}
body.dark-mode .city-suggestions {
    background-color: #2d2d2d !important; border-color: #444 !important;
}
body.dark-mode .city-suggestion-item {
    color: #fff !important; border-bottom-color: #444 !important;
}
body.dark-mode .city-suggestion-item:hover { background-color: #444 !important; }
body.dark-mode img.logo, body.dark-mode header img {
    filter: invert(1) brightness(100%); /* Inverse le logo noir en blanc */
}



/* --- STYLE HISTORIQUE --- */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.history-item:hover {
    background: #f9f9f9;
    border-color: #ddd;
}

.hist-city {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.hist-date {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

.hist-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hist-arrow {
    font-size: 1.5rem;
    color: #ccc;
    line-height: 1;
}

/* --- STYLE HISTORIQUE --- */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card); /* Compatible Dark Mode si configuré */
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: var(--hover-color);
}

.hist-left {
    display: flex;
    flex-direction: column;
}

.hist-city {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-main);
}

.hist-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

