/* ==========================================================================
   CLI.M.A. v2 — Stylesheet
   Association CLI.M.A. 57-67-68
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties (palette v1 préservée)
   -------------------------------------------------------------------------- */
:root {
    --color-forest: #025021;
    --color-forest-light: #03692e;
    --color-forest-dark: #011a0b;
    --color-content-bg: #e8f5e2;
    --color-teal: #1D4665;
    --color-gold: #FED500;
    --color-lime: #AAFF00;
    --color-sky: #A4D1F4;
    --color-sky-light: #D2EAF8;
    --color-case: #DAFCCE;
    --color-case-border: #b8e6a8;
    --color-white: #FFFFFF;
    --color-muted: #6a9a7a;
    --color-text: #1a3a2a;
    --color-text-light: #4a7a5a;
    --color-danger: #c0392b;

    --font-main: "Verdana", "Segoe UI", sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
    --nav-height: 48px;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-forest);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-teal);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-forest);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    color: var(--color-forest);
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.content {
    flex: 1;
    background-color: var(--color-content-bg);
    padding: 24px 0;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest));
    color: var(--color-white);
    padding: 16px 0;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--color-white);
}

.header-brand:hover {
    color: var(--color-gold);
    text-decoration: none;
}

.header-logo {
    width: 60px;
    height: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 1.3rem;
    color: var(--color-white);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-text .tagline {
    font-size: 0.75rem;
    color: var(--color-lime);
    margin-top: 2px;
    font-weight: 400;
}

.header-auth {
    font-size: 0.8rem;
    text-align: right;
    flex-shrink: 0;
}

.header-auth a {
    color: var(--color-gold);
}

.header-auth a:hover {
    color: var(--color-lime);
}

.header-auth .welcome {
    color: var(--color-white);
    margin-bottom: 4px;
}

/* Login form compact */
.login-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    width: 110px;
    font-family: var(--font-main);
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-form button {
    padding: 4px 12px;
    font-size: 0.8rem;
    border: 1px solid var(--color-gold);
    border-radius: 3px;
    background: transparent;
    color: var(--color-gold);
    cursor: pointer;
    font-family: var(--font-main);
    transition: background 0.2s, color 0.2s;
}

.login-form button:hover {
    background: var(--color-gold);
    color: var(--color-forest-dark);
}

.signup-link {
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Bouton de déconnexion (formulaire POST stylé comme un lien) */
.logout-link {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--color-gold);
    cursor: pointer;
}

.logout-link:hover {
    color: var(--color-lime);
    text-decoration: underline;
}

.signup-link a {
    color: var(--color-lime);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
    background: var(--color-forest);
    border-bottom: 2px solid var(--color-lime);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: none;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    display: block;
    padding: 12px 16px;
    color: var(--color-gold);
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--color-forest-light);
    color: var(--color-white);
    text-decoration: none;
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-gold);
    transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger animation quand ouvert */
.nav-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile : nav visible quand ouvert */
.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-forest);
    border-bottom: 2px solid var(--color-lime);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

/* Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: var(--color-gold);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-main);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.nav-dropdown-toggle::after {
    content: ' \25BE';
    font-size: 0.7em;
    opacity: 0.7;
}

.nav-dropdown-toggle:hover {
    background: var(--color-forest-light);
    color: var(--color-white);
}

.nav-dropdown-menu {
    display: none;
    list-style: none;
    background: var(--color-forest);
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

/* Mobile : sous-menu indenté */
.nav-dropdown-menu a {
    padding-left: 32px;
}

/* --------------------------------------------------------------------------
   6. Sections de contenu
   -------------------------------------------------------------------------- */
.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.2rem;
    color: var(--color-forest);
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--color-lime);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.1rem;
}

/* --- Cartes actualités --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-card {
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow 0.2s;
}

.news-card:hover {
    box-shadow: var(--shadow);
}

.news-card .news-date {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-bottom: 4px;
}

.news-card .news-title {
    font-weight: 700;
    color: var(--color-teal);
    margin-bottom: 6px;
}

.news-card .news-body {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* --- Grille photos --- */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.photo-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.photo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.photo-card .photo-info {
    padding: 10px 12px;
}

.photo-card .photo-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-teal);
    margin-bottom: 4px;
}

.photo-card .photo-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* --- Tableau relevés --- */
.releves-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.releves-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.releves-table th {
    background: var(--color-forest);
    color: var(--color-white);
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.releves-table th:first-child {
    text-align: left;
}

.releves-table td {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid var(--color-case-border);
    white-space: nowrap;
}

.releves-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.releves-table td a {
    color: var(--color-forest);
    font-weight: 500;
}

.releves-table td a:hover {
    color: var(--color-teal);
}

.releves-table .temp-cell {
    font-weight: 700;
    border-radius: 3px;
}

.releves-table .weather-icons img {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 1px;
}

.releves-link {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* --- Tendance du jour --- */
.trend-box {
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
}

.trend-box .trend-title {
    font-weight: 700;
    color: var(--color-forest);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.trend-box .trend-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.trend-box .trend-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--color-teal);
    font-weight: 500;
}

/* --- Éphémérides --- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-item {
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
}

.event-item a {
    color: var(--color-teal);
}

/* --- Message vide --- */
.empty-message {
    color: var(--color-muted);
    font-style: italic;
    font-size: 0.9rem;
    padding: 12px 0;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--color-forest-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 24px 0;
    font-size: 0.8rem;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.site-footer a {
    color: var(--color-gold);
}

.site-footer a:hover {
    color: var(--color-lime);
}

.footer-name {
    font-weight: 700;
    color: var(--color-white);
    font-size: 0.9rem;
}

.footer-tagline {
    color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   8. Utilitaires
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

/* --------------------------------------------------------------------------
   9. Deux colonnes (relevés + photos côte à côte en desktop)
   -------------------------------------------------------------------------- */
.home-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --------------------------------------------------------------------------
   10. Media Queries
   -------------------------------------------------------------------------- */

/* Tablet */
@media (min-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 900px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 24px;
    }

    .content {
        padding: 32px 0;
    }

    /* Header */
    .header-logo {
        width: 70px;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .header-text .tagline {
        font-size: 0.85rem;
    }

    /* Nav : horizontal */
    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
    }

    .nav-links a {
        padding: 14px 10px;
        font-size: 0.8rem;
    }

    /* Nav dropdowns : position absolue en desktop */
    .nav-dropdown-toggle {
        padding: 14px 10px;
        font-size: 0.8rem;
    }

    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 180px;
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow-lg);
        border-top: 2px solid var(--color-lime);
        z-index: 1001;
    }

    .nav-dropdown-menu a {
        padding-left: 16px;
    }

    /* Home grid : 2 colonnes */
    .home-grid {
        flex-direction: row;
    }

    .home-col-left {
        flex: 1;
        min-width: 0;
    }

    .home-col-right {
        flex: 1;
        min-width: 0;
    }

    /* Photos : 3 colonnes */
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .nav-links a,
    .nav-dropdown-toggle {
        padding: 14px 16px;
        font-size: 0.82rem;
    }
}

/* --------------------------------------------------------------------------
   11. Composants ajoutés pour la version .NET (formulaires, alertes, cartes…)
   -------------------------------------------------------------------------- */

/* --- Titres de page --- */
.page-title {
    font-size: 1.4rem;
    color: var(--color-forest);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-lime);
}

/* --- Formulaires --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 560px;
}

@media (min-width: 600px) {
    .form-grid.two-cols {
        grid-template-columns: 1fr 1fr;
        max-width: 760px;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-forest);
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    background: var(--color-white);
    color: var(--color-text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid var(--color-forest-light);
    outline-offset: 0;
}

.form-field .field-hint {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.form-field .field-error,
.field-validation-error {
    font-size: 0.78rem;
    color: var(--color-danger);
}

.validation-summary-errors {
    background: #fdecea;
    border: 1px solid #f5c6c1;
    border-radius: var(--radius);
    color: var(--color-danger);
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.validation-summary-errors ul {
    margin-left: 18px;
}

.form-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--color-forest);
    background: var(--color-forest);
    color: var(--color-white);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn:hover {
    background: var(--color-forest-light);
    color: var(--color-white);
    text-decoration: none;
}

.btn.btn-secondary {
    background: transparent;
    color: var(--color-forest);
}

.btn.btn-secondary:hover {
    background: var(--color-case);
}

.btn.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.btn.btn-sm {
    padding: 4px 10px;
    font-size: 0.78rem;
}

/* --- Alertes --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-info {
    background: var(--color-sky-light);
    border-color: var(--color-sky);
    color: #14425f;
}

.alert-success {
    background: var(--color-case);
    border-color: var(--color-case-border);
    color: var(--color-forest);
}

.alert-error {
    background: #fdecea;
    border-color: #f5c6c1;
    color: var(--color-danger);
}

/* --- Encadrés génériques --- */
.panel {
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.panel-white {
    background: var(--color-white);
}

/* --- Barre de filtres (relevés, photos, archives…) --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.filter-bar select,
.filter-bar input {
    padding: 5px 8px;
    font-size: 0.85rem;
    font-family: var(--font-main);
    border: 1px solid var(--color-case-border);
    border-radius: 3px;
}

.filter-bar option.has-data {
    background-color: var(--color-lime);
}

/* --- Carte Leaflet --- */
.map-container {
    width: 100%;
    height: 480px;
    border-radius: var(--radius);
    border: 1px solid var(--color-case-border);
    z-index: 0;
}

.map-container.map-tall {
    height: 620px;
}

/* Étiquettes de valeurs colorées sur les cartes (climato / temps réel) */
.map-value-label {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

/* Étiquette d'observation sur la carte */
.map-obs-label {
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: var(--shadow);
    font-size: 0.72rem;
    overflow: hidden;
    text-align: center;
    min-width: 58px;
}

.map-obs-label .obs-place {
    background: var(--color-teal);
    color: var(--color-white);
    padding: 1px 4px;
    font-weight: 600;
    white-space: nowrap;
}

.map-obs-label .obs-body {
    padding: 2px 4px;
}

.map-obs-label .obs-emoji {
    font-size: 1.15rem;
    line-height: 1.2;
}

/* --- Cellules colorées (tableaux relevés/temps réel) --- */
.temp-cell {
    font-weight: 700;
    border-radius: 3px;
}

/* --- Pictos phénomènes (emoji) --- */
.weather-emoji {
    font-size: 1rem;
    margin: 0 1px;
    cursor: default;
}

/* --- Flèche de direction du vent --- */
.wind-arrow {
    display: inline-block;
    font-weight: 700;
}

/* --- Statistiques mensuelles (module relevés) --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.stats-block {
    background: var(--color-case);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.stats-block h3 {
    font-size: 0.95rem;
    color: var(--color-forest);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-case-border);
    padding-bottom: 6px;
}

.stats-block table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.stats-block td {
    padding: 3px 4px;
    vertical-align: top;
}

.stats-block td.stat-value {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.stats-block td.stat-date {
    text-align: right;
    color: var(--color-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    gap: 6px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 5px 11px;
    border: 1px solid var(--color-case-border);
    border-radius: 3px;
    font-size: 0.85rem;
    background: var(--color-white);
}

.pagination .current {
    background: var(--color-forest);
    color: var(--color-white);
    border-color: var(--color-forest);
}

/* --- Graphiques --- */
.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
    background: var(--color-white);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 16px;
}

/* --- Tableau générique --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--color-white);
}

.data-table th {
    background: var(--color-forest);
    color: var(--color-white);
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.data-table td {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid var(--color-case-border);
}

.data-table tbody tr:hover {
    background: var(--color-sky-light);
}

.data-table tr.row-strong td {
    font-weight: 700;
}

/* --- Utilitaires --- */
.text-muted {
    color: var(--color-muted);
}

.text-danger {
    color: var(--color-danger);
}

.text-small {
    font-size: 0.8rem;
}

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* --------------------------------------------------------------------------
   12. Accueil — tableau de bord (layout C)
   -------------------------------------------------------------------------- */

/* --- Bandeau des températures actuelles (défilant, accessible) --- */
.temp-marquee {
    position: relative;
    overflow: hidden;
    background: var(--color-forest);
    border-bottom: 2px solid var(--color-lime);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.temp-marquee__track {
    display: flex;
    width: max-content;
    animation: temp-scroll 45s linear infinite;
}

/* Pause au survol et au focus clavier */
.temp-marquee:hover .temp-marquee__track,
.temp-marquee:focus-within .temp-marquee__track {
    animation-play-state: paused;
}

.temp-marquee__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.temp-marquee__item {
    padding: 8px 16px;
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--color-gold);
}

.temp-marquee__item a {
    color: var(--color-gold);
}

.temp-marquee__item a:hover {
    color: var(--color-lime);
    text-decoration: none;
}

.temp-marquee .temp-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 6px;
}

@keyframes temp-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Accessibilité : mouvement réduit → bandeau statique défilable au clavier */
@media (prefers-reduced-motion: reduce) {
    .temp-marquee {
        overflow-x: auto;
    }

    .temp-marquee__track {
        animation: none;
    }

    .temp-marquee__list[aria-hidden="true"] {
        display: none;
    }
}

/* --- Grille tableau de bord : grande tuile relevés + colonne latérale --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

.tile {
    background: var(--color-white);
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.tile-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tile .section-title {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

/* --- Vignettes de vigilance météo (cartes Météo-France) --- */
.vigilance-maps {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.vigilance-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.vigilance-map img {
    width: 150px;
    height: auto;
    border: 1px solid var(--color-case-border);
    border-radius: var(--radius);
}

.vigilance-map:hover img {
    border-color: var(--color-forest-light);
}

.vigilance-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-forest);
}

/* --- Diaporama photos --- */
.slideshow {
    position: relative;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

@media (min-width: 600px) {
    .slide__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .slide__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Carte photo : bloc plein (évite tout repli en flux inline si la grille ne charge pas) */
.slide .photo-card {
    display: flex;
    flex-direction: column;
}

.slide .photo-card {
    position: relative;
}

.slide .photo-card img {
    height: 190px;
}

.photo-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-teal);
    color: var(--color-white);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    box-shadow: var(--shadow);
}

.slideshow__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
}

.slideshow__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius);
    background: var(--color-forest);
    color: var(--color-white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.slideshow__btn:hover {
    background: var(--color-forest-light);
}

.slideshow__dots {
    display: flex;
    gap: 8px;
}

.slideshow__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-case-border);
    cursor: pointer;
    transition: background 0.2s;
}

.slideshow__dot[aria-current="true"] {
    background: var(--color-forest);
}

.slideshow__dot:hover {
    background: var(--color-muted);
}

/* --------------------------------------------------------------------------
   13. Popin d'affichage d'une photographie (lightbox)
   -------------------------------------------------------------------------- */
body.no-scroll {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox__inner {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius);
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 72vh;
    object-fit: contain;
    background: #000;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
}

.lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: background 0.2s;
}

.lightbox__close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox__meta {
    padding: 14px 20px 18px;
}

.lightbox__title {
    font-size: 1.15rem;
    color: var(--color-forest);
    margin-bottom: 4px;
}

.lightbox__sub {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.lightbox__comment {
    margin-top: 10px;
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.5;
    white-space: pre-wrap;
}

.lightbox__author {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-teal);
}
