/* --- THÈME & VARIABLES --- */
:root {
    /* Couleurs */
    --color-primary: #00287a;      /* Bleu DLP */
    --color-secondary: #ffc72c;    /* Doré */
    --color-text-light: #f4f4f4;
    --color-text-dark: #333;
    --color-bg-dark: #12122b;      /* Bleu nuit */
    
    /* Ombres & Bordures */
    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.6);
    --radius-card: 12px;
    --radius-btn: 20px;
    
    /* Typographie */
    --font-main: 'Poppins', sans-serif;
    
    /* Espacements */
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
}

/* --- BASE & RESET --- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    margin: 0;
    padding: 0;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- HEADER --- */
header {
    background-color: var(--color-primary);
    padding: var(--spacing-md) 15px;
    border-bottom: 3px solid var(--color-secondary);
    position: relative;
}

h1 {
    font-size: 2.5em;
    color: var(--color-secondary);
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

h2 {
    font-size: 1.1em;
    font-weight: 300;
    margin: 0;
    opacity: 0.9;
}

/* --- BOUTONS --- */
.header-btn {
    position: absolute;
    top: 15px;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-btn);
    font-weight: bold;
    font-size: 0.85em;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.1s;
}

.header-btn:active {
    transform: scale(0.95);
}

#installButton {
    right: 15px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
}
#installButton:hover {
    background-color: #ffd966;
}

#notification-toggle-button {
    width: 90%;
    max-width: 600px;
    margin: 0 auto var(--spacing-md) auto;
    display: block;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: opacity 0.2s;
}
#notification-toggle-button:active {
    opacity: 0.8;
}

/* --- MAIN CONTENT --- */
main {
    padding: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

/* --- DASHBOARD (Météo + Affluence) --- */
.info-dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center; /* Important pour aligner météo et affluence */
    gap: 15px;
    margin: 15px auto 25px auto;
    max-width: 800px;
}

/* 1. Widget Affluence (Style Pilule Simple) */
.crowd-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(31, 31, 62, 0.9);
    border: 1px solid var(--color-secondary);
    padding: 0 16px;
    border-radius: 50px;
    color: var(--color-text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.5s ease;
    height: 50px; /* Hauteur fixe pour matcher la météo */
}

/* Couleurs Affluence */
.crowd-low { color: #28a745; }
.crowd-medium { color: #ffc72c; }
.crowd-high { color: #ff8c00; }
.crowd-full { color: #dc3545; }

.crowd-avg {
    font-size: 0.85em;
    opacity: 0.7;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 8px;
}

/* 2. Widget Météo (Style 3 Colonnes + Séparateurs) */
.weather-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(31, 31, 62, 0.9);
    border: 1px solid var(--color-secondary);
    padding: 5px 10px;
    border-radius: 20px; /* Moins arrondi pour le format tableau */
    color: var(--color-text-light);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.5s ease;
    min-height: 50px; /* Hauteur fixe */
}

.weather-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    min-width: 45px;
}

.w-label {
    font-size: 0.7em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 2px;
}

.w-icon {
    font-size: 1.3em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.w-temp {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--color-secondary);
}

/* Séparateur vertical Météo */
.w-sep {
    width: 1px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 2px;
}

/* --- CARTES DE SÉLECTION --- */
.park-selection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 600px;
    margin: var(--spacing-lg) auto;
}

.park-card {
    position: relative;
    display: block;
    height: 180px;
    border-radius: var(--radius-card);
    border: 2px solid var(--color-secondary);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #000;
}

.park-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.park-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.park-card:hover .park-image {
    opacity: 0.4;
}

.park-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    z-index: 1;
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.park-content h3 {
    color: var(--color-secondary);
    font-size: 1.8em;
    margin: 0 0 5px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    width: 100%;
    line-height: 1.1;
}

.park-content p {
    color: var(--color-text-light);
    font-size: 0.95em;
    font-weight: 300;
    margin: 0;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* --- RESPONSIVE --- */

/* Desktop / Tablette */
@media (min-width: 768px) {
    .park-selection {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: 30px;
    }
    .park-card {
        height: 250px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.8em; }
    h2 { font-size: 1em; }
    header { padding: 15px 10px; }
    
    .header-btn {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75em;
    }

    .park-card { height: 150px; }
    .park-content h3 { font-size: 1.5em; }
    .park-content p { font-size: 0.85em; }

    /* Dashboard Mobile : On empile si pas de place */
    .info-dashboard {
        flex-direction: column;
        gap: 10px;
    }
    .weather-widget, .crowd-widget {
        width: 90%; /* Prend presque toute la largeur */
        max-width: 350px;
    }
}