/* =========================================================
   MEGALITH FRANCE — Styles complets (Auth + Dashboard + Carte)
   ========================================================= */

/* --- Reset & Variables --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #1A2429;
    --bg-mid: #4A585E;
    --bg-card: rgba(30, 42, 48, 0.65);
    --gold: #C5A059;
    --gold-light: #D4B76A;
    --gold-dim: rgba(197, 160, 89, 0.25);
    --gold-glow: rgba(197, 160, 89, 0.12);
    --green: #5DAA68;
    --green-light: #6BBF78;
    --red: #C45B5B;
    --text: #E8E4DC;
    --text-muted: #9AA3A8;
    --glass: rgba(26, 36, 41, 0.78);
    --glass-strong: rgba(22, 32, 37, 0.92);
    --glass-border: rgba(197, 160, 89, 0.15);
    --glass-border-strong: rgba(197, 160, 89, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font-title: 'Cinzel', serif;
    --font-body: 'Playfair Display', serif;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-dark);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* --- Vues --- */
.view {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.5); opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

.view.leaving {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* =========================================================
   VUE 1 — AUTHENTIFICATION
   ========================================================= */
.view-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #4A585E 0%, #1A2429 100%);
}

.auth-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 600px at 20% 80%, rgba(197, 160, 89, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 80% 20%, rgba(197, 160, 89, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    animation: fadeInUp 0.8s ease forwards;
}

/* En-tête Auth */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 24px rgba(197, 160, 89, 0.35));
}

.auth-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 24px;
}

.auth-title {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    color: #FFFFFF;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.15);
    margin-bottom: 0.35rem;
    line-height: 1.1;
}

.title-mega {
    font-size: 1.3em;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.title-france {
    font-weight: 400;
    letter-spacing: 0.2em;
}

.auth-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Card Auth (glassmorphism) */
.auth-card {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Onglets */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
    flex: 1;
    padding: 0.9rem;
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    color: var(--gold);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

/* Formulaires */
.auth-form {
    padding: 1.8rem 1.6rem 1.6rem;
    animation: fadeIn 0.3s ease;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}

.input-wrapper input::placeholder {
    color: rgba(154, 163, 168, 0.5);
}

.input-wrapper input:focus {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.04);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:has(input:focus) .input-icon {
    color: var(--gold);
}

/* Erreurs */
.auth-error {
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: var(--red);
    background: rgba(196, 91, 91, 0.1);
    border: 1px solid rgba(196, 91, 91, 0.2);
    border-radius: var(--radius-xs);
    animation: slideDown 0.3s ease;
}

/* Bouton doré (réutilisable) */
.btn-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem;
    font-family: var(--font-title);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(197, 160, 89, 0.45);
}

.btn-gold:active {
    transform: scale(0.98);
}

.btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer auth */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.78rem;
    font-style: italic;
    color: rgba(154, 163, 168, 0.5);
}

/* =========================================================
   VUE 2 — DASHBOARD
   ========================================================= */
.view-dashboard {
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% 0%, #4A585E 0%, #1A2429 70%);
}

.dash-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 500px 500px at 70% 90%, rgba(197, 160, 89, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 10% 30%, rgba(93, 170, 104, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.dash-container {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}

/* Header dashboard */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dash-brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.dash-brand-text {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: var(--gold);
}

.dash-user-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}

.btn-icon:hover {
    color: var(--gold);
    border-color: var(--glass-border);
}

/* Accueil dashboard */
.dash-main {
    animation: fadeInUp 0.6s ease forwards;
}

.dash-greeting {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.dash-greeting-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
}

/* Grille de stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: border-color var(--transition);
}

.stat-card:hover {
    border-color: var(--glass-border-strong);
}

.stat-main {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.8rem 1.5rem;
    border-color: var(--glass-border-strong);
    background: linear-gradient(135deg, var(--glass), rgba(197, 160, 89, 0.05));
}

.stat-icon {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-icon-sm {
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value-sm {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    background: none;
    -webkit-text-fill-color: var(--text);
}

.stat-label {
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Barre de progression */
.stat-bar {
    margin-top: 1rem;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bouton Radar */
.btn-radar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.2rem 2rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(197, 160, 89, 0.35);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-radar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(197, 160, 89, 0.5);
}

.btn-radar:active {
    transform: scale(0.97);
}

.btn-radar-pulse {
    position: absolute;
    inset: 0;
    border-radius: 60px;
    border: 2px solid var(--gold);
    animation: pulse 2.5s ease-in-out infinite;
}

.btn-radar-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bg-dark);
}

/* Explorations récentes */
.recent-section {
    margin-bottom: 2rem;
}

.recent-title {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.recent-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: border-color var(--transition);
}

.recent-list li:hover {
    border-color: var(--glass-border-strong);
}

.recent-empty {
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
}

.recent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.recent-dot.tumulus {
    background: #7B8F9E;
}

.recent-name {
    flex: 1;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.recent-dept {
    font-size: 0.68rem;
    color: var(--gold);
    opacity: 0.75;
    font-style: italic;
}

.recent-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* =========================================================
   VUE 3 — CARTE (Radar)
   ========================================================= */
.view-map {
    display: flex;
    flex-direction: column;
}

.header {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-btn {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-btn:hover {
    background: var(--gold-dim);
}

.header-logo {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.25em;
    color: var(--gold);
}

.header-counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.counter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bg-dark);
    background: var(--gold);
    border-radius: 50px;
}

.counter-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#map {
    flex: 1;
    z-index: 1;
}

/* Bouton géoloc */
.btn-locate {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s, background 0.2s;
}

.btn-locate:hover {
    background: rgba(26, 36, 41, 0.95);
    transform: scale(1.08);
}

/* Loader */
.loader {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.4rem;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    box-shadow: var(--shadow);
}

.loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gold-dim);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Bouton toggle légende */
.btn-legend-toggle {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1001;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, transform 0.2s;
}

.btn-legend-toggle:hover {
    background: rgba(26,36,41,0.95);
    transform: scale(1.08);
}

.btn-legend-toggle.active {
    background: rgba(197,160,89,0.15);
    border-color: var(--gold);
}

/* Légende — tiroir coulissant */
.legend-drawer {
    position: fixed;
    bottom: 4rem;
    left: 1rem;
    z-index: 1000;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    box-shadow: var(--shadow);
    overflow: hidden;
    transform-origin: bottom left;
    animation: legendSlideUp 0.25s ease;
}

.legend-drawer.hidden {
    display: none;
}

@keyframes legendSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem 0.5rem;
    padding: 0.55rem 0.75rem 0.45rem;
}

.legend-col-header {
    font-size: 0.62rem;
    font-family: var(--font-title);
    letter-spacing: 0.04em;
    color: var(--gold);
    text-align: center;
    padding-bottom: 0.1rem;
    border-bottom: 1px solid rgba(197,160,89,0.2);
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.66rem;
    color: var(--text-muted);
}

/* Bouton ajouter monument (intégré dans la légende) */
.legend-add-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.45rem 0.75rem 0.6rem;
    padding: 0.35rem 0.7rem;
    background: linear-gradient(135deg, #C5A059, #A07840);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 0.72rem;
    font-family: var(--font-body);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
}

.legend-add-btn:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

/* =========================================================
   MODAL — AJOUTER UN MONUMENT
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(160deg, rgba(74,88,94,0.98), rgba(26,36,41,0.99));
    border: 1px solid rgba(197,160,89,0.25);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 1.5rem 2rem;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.3rem;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--text); }

.modal-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-family: var(--font-body);
}

.modal-coords {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.label-optional {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Select dans le modal */
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    background: #1e2d33;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.input-wrapper select option {
    background: #1e2d33;
    color: var(--text);
}

.input-wrapper select:focus,
.input-wrapper textarea:focus {
    border-color: var(--gold);
}

.input-wrapper textarea {
    resize: vertical;
    min-height: 70px;
}

/* Marqueurs communautaires */
.marker-community-pending {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8842A, #C56820);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(232,132,42,0.5), 0 3px 12px rgba(0,0,0,0.4);
    font-size: 16px;
    border: 2px solid rgba(255,255,255,0.2);
}

.marker-community-confirmed {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C5A059, #A07840);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px rgba(197,160,89,0.6), 0 3px 12px rgba(0,0,0,0.4);
    font-size: 16px;
    border: 2px solid rgba(255,255,255,0.3);
}

.popup-community-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    margin-bottom: 0.4rem;
    font-family: var(--font-body);
}

.badge-pending   { background: rgba(232,132,42,0.2); color: #E8842A; border: 1px solid rgba(232,132,42,0.4); }
.badge-confirmed { background: rgba(197,160,89,0.2); color: var(--gold); border: 1px solid rgba(197,160,89,0.4); }

/* =========================================================
   POPUPS LEAFLET
   ========================================================= */
.leaflet-popup-content-wrapper {
    background: var(--glass-strong) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
}

.leaflet-popup-tip {
    background: var(--glass-strong) !important;
    border: 1px solid var(--glass-border) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 1rem 1.2rem !important;
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 1.2rem !important;
    top: 6px !important;
    right: 8px !important;
}

.popup-title {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.popup-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.popup-coords {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.btn-visit {
    display: block;
    width: 100%;
    padding: 0.6rem;
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-visit:hover { opacity: 0.88; }

.btn-visit.visited {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    cursor: default;
}

/* =========================================================
   MARQUEURS ICÔNES PNG
   ========================================================= */
.marker-icon-img {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 6px rgba(197, 160, 89, 0.6))
            drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s;
}

.marker-icon-img:hover {
    transform: scale(1.15);
}

.marker-icon-img.visited {
    filter: drop-shadow(0 0 6px rgba(93, 170, 104, 0.7))
            drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Marqueur détecté — brillance dorée pulsante */
.marker-glow .marker-icon-img,
.marker-glow img {
    animation: markerPulse 0.8s ease-in-out infinite alternate;
}

@keyframes markerPulse {
    from {
        filter: drop-shadow(0 0 6px rgba(197, 160, 89, 0.6))
                drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 18px rgba(197, 160, 89, 1))
                drop-shadow(0 0 30px rgba(197, 160, 89, 0.7))
                drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
        transform: scale(1.25);
    }
}

/* Légende icônes */
.legend-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(197, 160, 89, 0.5));
}

.legend-icon-visited {
    filter: sepia(1) saturate(4) hue-rotate(85deg) brightness(0.85) drop-shadow(0 0 3px rgba(80,180,80,0.6));
}

.legend-icon-silver {
    filter: grayscale(1) brightness(1.8) drop-shadow(0 0 3px rgba(200,210,220,0.6));
}

/* =========================================================
   NOTIFICATION RADAR
   ========================================================= */
.radar-alert {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    min-width: 280px;
    max-width: 90vw;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.2), rgba(26, 36, 41, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.25), var(--shadow-lg);
    animation: radarSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-alert.hiding {
    animation: radarSlideOut 0.4s ease forwards;
}

@keyframes radarSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.95); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes radarSlideOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.radar-alert-icon {
    color: var(--gold);
    flex-shrink: 0;
    animation: radarIconPulse 1.5s ease-in-out infinite;
}

@keyframes radarIconPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

.radar-alert-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.radar-alert-text strong {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.radar-alert-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.radar-alert-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.2rem;
    margin-left: auto;
    line-height: 1;
    transition: color 0.2s;
}

.radar-alert-close:hover {
    color: var(--text);
}

/* Indicateur radar actif */
.radar-status {
    position: fixed;
    top: 55px;
    right: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(93, 170, 104, 0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    font-family: var(--font-title);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
}

.radar-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: radarDotPulse 2s ease-in-out infinite;
}

@keyframes radarDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(93, 170, 104, 0.5); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(93, 170, 104, 0); }
}

/* Cercle de proximité sur la carte */
.proximity-circle {
    stroke: var(--gold);
    stroke-width: 2;
    fill: rgba(197, 160, 89, 0.08);
}

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(197, 160, 89, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 160, 89, 0.35);
}

/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    background: var(--glass-strong);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--glass-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav.hidden {
    display: none !important;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.6rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-family: var(--font-title);
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-btn.active {
    color: var(--gold);
}

.nav-btn svg {
    transition: transform 0.2s;
}

.nav-btn.active svg {
    transform: translateY(-2px);
}

/* =========================================================
   PAGES RÉGLAGES & INFOS
   ========================================================= */
.view-page {
    overflow-y: auto;
}

.page-container {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}

.page-header {
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.page-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text);
}

.settings-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0.25rem 0;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.settings-section-title {
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 0.75rem 1.1rem 0.4rem;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.settings-label span {
    font-size: 0.88rem;
    color: var(--text);
}

.settings-label small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}

.toggle input:checked + .toggle-slider {
    background: rgba(197, 160, 89, 0.35);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: var(--gold);
}

/* Select réglages */
.settings-select {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.82rem;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-select option {
    background: #1e2d33;
}

/* Boutons actions dans réglages */
.settings-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid currentColor;
    font-family: var(--font-body);
    font-size: 0.78rem;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.settings-btn:hover {
    opacity: 0.75;
}

.settings-btn-danger {
    color: var(--red);
}

/* Texte légal */
.legal-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0.3rem 1.1rem 0.65rem;
}

.legal-text strong {
    color: var(--text);
}

.legal-text-muted {
    opacity: 0.55;
    font-size: 0.74rem;
    padding-top: 0;
}

/* =========================================================
   EXPLOITS
   ========================================================= */

.exploits-level-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(197,160,89,0.08);
    border: 1px solid rgba(197,160,89,0.2);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
}

.exploits-level-icon { font-size: 2.2rem; flex-shrink: 0; }

.exploits-level-info { flex: 1; min-width: 0; }

.exploits-level-name {
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.exploits-level-bar {
    height: 6px;
    background: rgba(197,160,89,0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.exploits-level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    width: 0;
    transition: width 0.8s ease;
}

.exploits-level-next {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.exploits-section { margin-bottom: 2rem; }

.exploits-section-title {
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(197,160,89,0.6);
    margin-bottom: 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(197,160,89,0.12);
}

.france-map-wrap {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 0.8rem;
    border: 1px solid rgba(197,160,89,0.1);
}

.france-map-legend {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    justify-content: center;
    margin-top: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.france-dot-example {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

.france-dot-example.unvisited {
    background: rgba(197,160,89,0.1);
    border: 1px solid rgba(197,160,89,0.22);
}

.france-dot-example.visited { background: var(--gold); }

.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.badge-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 0.9rem 0.7rem;
    text-align: center;
    border: 1px solid rgba(197,160,89,0.1);
    position: relative;
    transition: all 0.3s;
}

.badge-card.badge-unlocked {
    background: rgba(197,160,89,0.07);
    border-color: rgba(197,160,89,0.28);
}

.badge-card.badge-locked { opacity: 0.4; }

.badge-icon { font-size: 1.7rem; margin-bottom: 0.35rem; }

.badge-name {
    font-family: var(--font-title);
    font-size: 0.68rem;
    color: var(--gold);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.badge-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.badge-check {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    color: #7bc67e;
    font-size: 0.75rem;
    font-weight: bold;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
    .auth-title {
        letter-spacing: 0.2em;
    }

    .auth-container {
        padding: 1.5rem 1rem;
    }

    .dash-greeting {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 2.4rem;
    }

    .btn-radar-content {
        font-size: 0.85rem;
    }

    .legend {
        bottom: 5.5rem;
    }
}
