@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display:wght@700&family=Montserrat:wght@700;800&family=Oswald:wght@500&display=swap');

:root {
    --primary-color: #4a90e2;
    --accent-color: #357abd;
    --bg-color-1: #ffffff;       /* Fond blanc */
    --bg-color-2: #f8fafc;       /* Très léger gris/bleu pour le dégradé */
    --surface-color: rgba(255, 255, 255, 0.9);
    --text-primary: #2d3436;
    --text-secondary: #636e72;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius-md: 12px;           /* More rounded */
    --radius-lg: 20px;           /* Very rounded for containers */
}

/* Header Noir Léger pour thèmes colorés */
body.theme-vert header,
body.theme-orange header,
body.theme-violet header {
    background: rgba(15, 15, 15, 0.8) !important;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.theme-vert .theme-btn,
body.theme-orange .theme-btn,
body.theme-violet .theme-btn {
    background: rgba(40, 40, 40, 0.8);
    border-color: var(--primary-color);
    color: #fff;
}

/* Theme Overrides */
body.theme-rouge {
    --primary-color: #e74c3c;
    --accent-color: #c0392b;
    --bg-color-1: #fee2e2;
    --bg-color-2: #fecaca;
}

body.theme-vert {
    --primary-color: #27ae60;
    --accent-color: #219150;
    --bg-color-1: #d1fae5;
    --bg-color-2: #a7f3d0;
}

body.theme-violet {
    --primary-color: #8e44ad;
    --accent-color: #7d3c98;
    --bg-color-1: #f3e8ff;
    --bg-color-2: #e9d5ff;
}

body.theme-orange {
    --primary-color: #ff9f43;
    --accent-color: #f39c12;
    --bg-color-1: #fff3e0;
    --bg-color-2: #ffe0b2;
}

body.theme-nuit {
    --primary-color: #7eb8f7;
    --accent-color: #5a9fd4;
    --bg-color-1: #0d1117;
    --bg-color-2: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --surface-color: rgba(22, 27, 34, 0.95);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* === DARK MODE OVERRIDES === */

/* Header */
body.theme-nuit header {
    background: #161b22;
    border-bottom: 2px solid #30363d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Modals */
body.theme-nuit .modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    color: #e6edf3;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

body.theme-nuit .modal-content h2 { color: #e6edf3; }
body.theme-nuit .close-modal { color: #8b949e; }
body.theme-nuit .form-group label { color: #e6edf3; }
body.theme-nuit .form-group input {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

/* Hero Section */
body.theme-nuit .hero-card {
    background: rgba(22, 27, 34, 0.8);
    border-color: #30363d;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

body.theme-nuit .hero-card:hover {
    background: rgba(30, 36, 45, 0.9);
    border-color: var(--primary-color);
}

body.theme-nuit .hero h1 { color: var(--primary-color); }
body.theme-nuit .hero p { color: var(--text-secondary); }

/* Section Title */
body.theme-nuit .section-title {
    color: var(--primary-color);
    border-bottom-color: #30363d;
}

/* Cards */
body.theme-nuit .history-card {
    background: #161b22 !important;
    border-color: #30363d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.theme-nuit .history-card:hover {
    border-color: var(--primary-color);
    background: #1c2128 !important;
}

body.theme-nuit .card-title { color: var(--primary-color); }
body.theme-nuit .card-meta { color: var(--text-secondary); }

/* Theme Picker */
body.theme-nuit .theme-btn {
    background: #161b22;
    border-color: #30363d;
    color: var(--primary-color);
}

body.theme-nuit .theme-menu {
    background: #161b22;
    border-color: #30363d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

body.theme-nuit .theme-option { color: #e6edf3; }
body.theme-nuit .theme-option:hover { background: rgba(255, 255, 255, 0.05); }

/* Auth Button */
body.theme-nuit .auth-btn {
    background: #21262d;
    border: 1px solid #30363d;
    color: #e6edf3;
}

body.theme-nuit .auth-btn:hover {
    background: var(--primary-color);
    color: #0d1117;
    border-color: var(--primary-color);
}


body.theme-abeille {
    --primary-color: #f1c40f;
    --accent-color: #d4ac0d;
    --bg-color-1: #1a1a2e;
    --bg-color-2: #2c3e50;
    --text-primary: #fef9e7;
    --text-secondary: #f0d060;
    --surface-color: rgba(28, 28, 28, 0.92);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Header Abeille : fond noir charbon */
body.theme-abeille header {
    background: #1a1a1a;
    border-bottom: 3px solid #f1c40f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
}

body.theme-abeille .header-left { 
    order: 2; 
    justify-content: center; /* Centrage Logo Lycée */
}
body.theme-abeille .header-center { 
    order: 1; 
    justify-content: flex-start; 
}
body.theme-abeille .header-right { 
    order: 3; 
}

/* Bouton S'authentifier : noir avec bordure jaune */
body.theme-abeille .auth-btn {
    background: #1a1a1a;
    color: #f1c40f;
    border: 2px solid #f1c40f;
    font-weight: 700;
}

body.theme-abeille .auth-btn:hover {
    background: #f1c40f;
    color: #1a1a1a;
    border-color: #f1c40f;
    transform: translateY(-1px);
}

/* Bouton sélecteur de thème : noir avec icône jaune */
body.theme-abeille .theme-btn {
    background: #1a1a1a;
    border: 2px solid #f1c40f;
    color: #f1c40f;
}

body.theme-abeille .theme-btn:hover {
    background: #f1c40f;
    color: #1a1a1a;
    transform: rotate(20deg) scale(1.05);
}

/* Menu thème : fond noir */
body.theme-abeille .theme-menu {
    background: rgba(20, 20, 20, 0.97);
    border: 1px solid #f1c40f;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Modal Abeille */
body.theme-abeille .modal-content {
    background: #1a1a1a;
    border: 2px solid #f1c40f;
    color: #fef9e7;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.theme-abeille .modal-content h2 {
    color: #f1c40f;
}

body.theme-abeille .modal-content input,
body.theme-abeille .modal-content textarea {
    background: #222;
    color: #fef9e7;
    border: 1px solid #444;
}

body.theme-abeille .modal-content input:focus {
    border-color: #f1c40f;
}

body.theme-abeille .modal-content label {
    color: #f1c40f;
}

body.theme-abeille .close-modal {
    color: #f1c40f;
}

body.theme-abeille .theme-option {
    color: #fef9e7;
}

body.theme-abeille .theme-option:hover {
    background: rgba(241, 196, 15, 0.15);
}

body.theme-abeille .theme-option-special {
    border-top-color: rgba(241, 196, 15, 0.3);
}

/* Hero card : fond noir avec bordure jaune */
body.theme-abeille .hero-card {
    background: rgba(20, 20, 20, 0.88);
    border-color: #f1c40f;
    box-shadow: 0 4px 30px rgba(241, 196, 15, 0.2);
}

body.theme-abeille .hero-card:hover {
    background: rgba(30, 30, 30, 0.95);
    border-color: #d4ac0d;
    box-shadow: 0 12px 40px rgba(241, 196, 15, 0.3);
}

/* Hero typo Montserrat percutante */
body.theme-abeille .hero h1 {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: #f1c40f;
    text-shadow: 0 2px 20px rgba(241, 196, 15, 0.4);
}

body.theme-abeille .hero p {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c8b560;
}

/* Section titles jaune */
body.theme-abeille .section-title {
    color: #f1c40f;
    border-bottom-color: rgba(241, 196, 15, 0.4);
}

/* Cards : hexagone avec fond jaune lumineux */
body.theme-abeille .history-card {
    clip-path: polygon(50% 0%, 100% 15%, 100% 85%, 50% 100%, 0% 85%, 0% 15%);
    border-radius: 0;
    background: #f1c40f;
    border: none;
    position: relative;
    padding: 20px;
}

body.theme-abeille .card-wrapper::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    background: #1a1a1a;
    clip-path: polygon(50% 0%, 100% 15%, 100% 85%, 50% 100%, 0% 85%, 0% 15%);
    z-index: -1;
    transition: all 0.3s ease;
}

body.theme-abeille .card-wrapper:hover::before {
    background: #f1c40f;
    filter: drop-shadow(0 0 15px rgba(241, 196, 15, 0.8));
}

body.theme-abeille .card-content {
    padding: 10px 15px 30px;
    text-align: center;
}

body.theme-abeille .card-title {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 800;
    text-shadow: none;
}

body.theme-abeille .card-meta {
    justify-content: center;
    color: #3d3000;
}

body.theme-abeille .history-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: #ffe234;
}

/* Map container */
body.theme-abeille .map-container {
    border-color: #f1c40f;
}


body.theme-abeille .map-overlay {
    background: rgba(20, 20, 20, 0.5);
}

body.theme-abeille .map-unlock-btn {
    background: #f1c40f;
    color: #1a1a1a;
    font-weight: 700;
}

body.theme-abeille .map-unlock-btn:hover {
    background: #d4ac0d;
}

/* Footer abeille */
body.theme-abeille footer {
    background: linear-gradient(160deg, #1a1a1a 0%, #2c3e50 100%);
    border-top-color: #f1c40f;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}

body.theme-abeille .footer-heading {
    color: #f1c40f;
}

body.theme-abeille .footer-links ul li a {
    color: #c8b560;
}

body.theme-abeille .footer-links ul li a i {
    color: #f1c40f;
}

body.theme-abeille .footer-links ul li a:hover {
    color: #f1c40f;
}

body.theme-abeille .footer-credits p {
    color: #c8b560;
}

body.theme-abeille .footer-credits strong {
    color: #fef9e7;
}

body.theme-abeille .footer-credits p i {
    color: #f1c40f;
}

body.theme-abeille .footer-desc {
    color: #c8b560;
}

body.theme-abeille .footer-bottom {
    border-top-color: rgba(241, 196, 15, 0.25);
}

body.theme-abeille .footer-bottom p {
    color: #c8b560;
}


/* Responsive Header */
@media (max-width: 768px) {
    .auth-btn {
        display: none !important;
    }
    .theme-picker-wrapper {
        display: block !important; /* On le garde sur l'accueil */
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    background: linear-gradient(-45deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-1), #fdfaf5);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Institutional Header */
header {
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-right {
    justify-content: flex-end;
    gap: 10px;
}

/* Theme Picker */
.theme-picker-wrapper {
    position: relative;
}



.theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-btn:hover {
    background: white;
    color: var(--primary-color);
}

.theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px;
    z-index: 1100;
    min-width: 160px;
    animation: themeMenuAppear 0.25s ease;
}

@keyframes themeMenuAppear {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.theme-option:hover {
    background: rgba(74, 144, 226, 0.1);
}

.theme-option-special {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 4px;
    padding-top: 12px;
}

.theme-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.theme-swatch-bee {
    background: repeating-linear-gradient(
        45deg,
        #f1c40f,
        #f1c40f 4px,
        #2c3e50 4px,
        #2c3e50 8px
    );
}


.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

header img.logo {
    height: 60px; /* Slightly larger for center logo */
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.header-left img.logo {
    height: 50px;
}

.header-left a {
    display: inline-flex;
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-left a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.25);
}

/* Logo central cliquable (retour accueil) - Desktop uniquement */
.logo-home-link {
    display: inline-flex;
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.logo-home-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.25);
}

@media (max-width: 768px) {
    .logo-home-link {
        pointer-events: none;
        cursor: default;
    }
}

.header-title {
    display: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
}

/* Hero Card Frame */
.hero-card {
    display: inline-block;
    padding: 40px 50px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease, background 0.35s ease;
    cursor: default;
}

.hero-card:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px);
}

/* Main Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Section Titles */
.section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

/* Map Section - Modernized */
/* Map Section - Interactive with Image */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 80px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #e0e7ff;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) grayscale(0.2) sepia(0.2);
    transition: all 0.5s ease;
    transform: scale(1.05);
}

.map-container.unlocked .map-image {
    filter: none;
    transform: scale(1);
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(2px);
}

.map-container.unlocked .map-overlay {
    opacity: 0;
    pointer-events: none;
}

.map-unlock-btn {
    background: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.map-unlock-btn:hover {
    background: var(--accent-color);
}

/* Grid of locations - Institutional Cards */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 180px; /* Écart vide plus important avant la suite */
}

.history-card {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.card-image {
    aspect-ratio: 4 / 3;
    background-color: #cbd5e0;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-card:hover .card-image::after {
    opacity: 1;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Floating Action Button (for QR simulation or extras) */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    html {
        font-size: 17px;
    }

    .header-title {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .map-container {
        height: 300px;
    }

    .history-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Authentication & Webmaster Styles */

/* Header Auth Button */
.auth-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Oswald', sans-serif;
    transition: all 0.2s;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn i {
    display: none;
}

.auth-btn:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .auth-btn {
        padding: 0;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        justify-content: center;
    }
    .auth-btn-text {
        display: none;
    }
    .auth-btn i {
        display: block;
        font-size: 1.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);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

#loginModal h2 {
    white-space: nowrap;
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    #loginModal h2 {
        font-size: 1.15rem;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.submit-btn:hover {
    background: var(--accent-color);
}

.error-msg {
    color: red;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Administrateur Mode */
body.administrateur-mode {
    border-top: 5px solid #ff9f43;
}

.wm-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.wm-toolbar {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 15px;
    align-items: center;
    font-weight: bold;
}

.wm-logout {
    background: white;
    color: #e74c3c;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Card Editing Styles */
.card-wrapper {
    position: relative;
    display: block;
}

.wm-edit-btn {
    position: absolute;
    background: #ff9f43;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: transform 0.2s;
}

.wm-edit-btn:hover {
    transform: scale(1.1);
}

.wm-edit-title {
    top: 10px;
    right: 10px;
    background: #0984e3;
}

.wm-edit-img {
    top: 10px;
    left: 10px;
}

.wm-reset-img {
    top: 55px; /* Juste en dessous du bouton d'édition */
    left: 10px;
    background: #e74c3c; /* Rouge pour symboliser la suppression */
}

.wm-add-btn {
    display: flex;
    margin: 40px auto;
    width: 60px;
    height: 60px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.wm-add-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #27ae60;
}

.wm-delete-btn {
    top: 55px;
    right: 10px;
    background: #e74c3c;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(160deg, var(--bg-color-2) 0%, var(--bg-color-1) 100%);
    border-top: 3px solid var(--primary-color);
    padding: 60px 5% 0;
    margin-top: 80px;
    color: var(--text-secondary);
    box-shadow: 0 -8px 30px rgba(74, 144, 226, 0.08);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
}

/* Brand column */
.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 16px;
    display: block;
    border-radius: 8px;
}

.footer-desc {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--text-secondary);
    max-width: 300px;
}

/* Heading */
.footer-heading {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 18px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Links column */
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease, gap 0.2s ease;
}

.footer-links ul li a i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    gap: 12px;
}

/* Credits column */
.footer-credits {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-credits p {
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-credits p i {
    color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.footer-credits strong {
    color: var(--text-primary);
}

/* Bottom bar */
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    font-family: 'Oswald', sans-serif;
    color: var(--text-secondary);
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-desc {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    footer {
        padding: 40px 6% 0;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 36px;
    }
    .footer-brand {
        grid-column: auto;
    }
}

/* Dark mode footer */
body.theme-nuit footer {
    background: linear-gradient(160deg, #161b22 0%, #0d1117 100%);
    border-top-color: #30363d;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
}

body.theme-nuit .footer-bottom {
    border-top-color: #30363d;
}

body.theme-nuit .footer-links ul li a {
    color: #8b949e;
}

body.theme-nuit .footer-links ul li a:hover {
    color: var(--primary-color);
}

body.theme-nuit .footer-credits p {
    color: #8b949e;
}

body.theme-nuit .footer-credits strong {
    color: #c9d1d9;
}

body.theme-nuit .footer-desc {
    color: #8b949e;
}

body.theme-nuit .footer-bottom p {
    color: #6e7681;
}

/* Admin Default Theme Modal */
.theme-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 5px;
}

.theme-select-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    color: #2c3e50;
    text-align: left;
}

.theme-select-btn:hover {
    background: #f1f2f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.theme-select-btn.active {
    border-color: #8e44ad;
    background: #f3e5f5;
    color: #6a1b9a;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.2);
}

.theme-select-btn .theme-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}
