/* ==========================================================
   Alvéa — Gestion de ruchers
   Tokens : fond neutre chaud, accent miel, texte charbon.
   Fraunces (titres, empattements chaleureux) + Inter (données/UI).
   ========================================================== */

:root {
    --color-bg: #F7F5F0;
    --color-surface: #FFFFFF;
    --color-border: #E2DFD6;
    --color-text: #2A2620;
    --color-text-muted: #6B6558;
    --color-accent: #C98A2C;
    --color-accent-dark: #9C6B1C;
    --color-accent-soft: #F3E4C6;
    --color-success: #4B7B4E;
    --color-success-soft: #E4EEE3;
    --color-warning: #B5511F;
    --color-warning-soft: #F5E2D6;
    --color-danger: #A83232;

    --color-tile-bg: #F5CB5C;
    --color-tile-border: #E0B23F;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius: 8px;
    --shadow: 0 1px 3px rgba(42, 38, 32, 0.08), 0 1px 2px rgba(42, 38, 32, 0.06);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 0.4em 0;
    color: var(--color-text);
}

a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Barre de navigation --- */
.topbar {
    background: var(--color-text);
    color: #fff;
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
}

.brand-link:hover {
    text-decoration: none;
    opacity: 0.9;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: block;
}

.topbar .brand-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
}

.topbar .brand-tag {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #A79E8F;
}

.topbar nav a {
    color: #E9E5DA;
    margin-left: 1.2rem;
    font-size: 0.92rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.search-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #E9E5DA;
    background: rgba(255, 255, 255, 0.08);
    margin-right: 0.8rem;
    flex-shrink: 0;
}

.search-icon-btn:hover { background: rgba(255, 255, 255, 0.18); color: var(--color-accent); text-decoration: none; }

.notif-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D9534F;
    vertical-align: middle;
    margin-left: 2px;
}

.topbar nav a:hover { color: var(--color-accent); text-decoration: none; }

/* --- Fil d'Ariane : reflète la hiérarchie rucher > ruche > suivi --- */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb .sep { margin: 0 0.4em; color: var(--color-border); }
.breadcrumb .current { color: var(--color-text); font-weight: 600; }

/* --- Contenu --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
    flex: 1 0 auto;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem;
    margin-bottom: 1.2rem;
}

.card-form { max-width: 720px; }

/* --- Boutons --- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-bg); }

.btn-danger { background: transparent; color: var(--color-danger); border-color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger); color: #fff; }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

/* --- Formulaires --- */
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; margin-top: 0.9rem; }
label:first-child { margin-top: 0; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
    border-color: var(--color-accent);
}

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

.form-actions { margin-top: 1.3rem; display: flex; gap: 0.6rem; }

/* --- Tableaux --- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.65rem 0.6rem; border-bottom: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
th:last-child, td:last-child { border-right: none; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); font-weight: 600; }
tr:hover td { background: var(--color-bg); }

.table-wrap { overflow-x: auto; }

/* --- Tableaux responsives : deviennent des fiches empilées sur mobile --- */
@media (max-width: 640px) {
    .table-responsive thead { display: none; }
    .table-responsive, .table-responsive tbody, .table-responsive tr, .table-responsive td {
        display: block;
        width: 100%;
    }
    .table-responsive tfoot { display: block; }
    .table-responsive tfoot tr { display: block; }
    .table-responsive tr {
        margin-bottom: 0.8rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        padding: 0.7rem 0.9rem;
        background: var(--color-surface);
    }
    .table-responsive tr:last-child { margin-bottom: 0; }
    .table-responsive td {
        border: none;
        padding: 0.4rem 0;
        border-bottom: 1px dashed var(--color-border);
        text-align: left;
        word-break: break-word;
    }
    .table-responsive td:last-child { border-bottom: none; padding-top: 0.6rem; }
    .table-responsive td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--color-text-muted);
        margin-bottom: 0.15rem;
    }
    .table-responsive td:empty,
    .table-responsive td[data-label=""] { display: none; }
    .table-responsive .btn-sm { width: 100%; text-align: center; }
}

/* Tableau de suivi : beaucoup de colonnes, on optimise la densité */
.table-suivis th, .table-suivis td { padding: 0.55rem 0.5rem; vertical-align: top; }
.table-suivis td:first-child, .table-suivis th:first-child { white-space: nowrap; }
.table-suivis td:last-child { white-space: nowrap; text-align: right; }
.table-suivis td { font-size: 0.87rem; }

/* --- Badges de statut --- */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: var(--color-success-soft); color: var(--color-success); }
.badge-hivernage { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.badge-perdue, .badge-vendue { background: var(--color-warning-soft); color: var(--color-warning); }

/* --- Messages flash --- */
.flash { padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: 0.9rem; }
.flash-success { background: var(--color-success-soft); color: var(--color-success); }
.flash-error { background: var(--color-warning-soft); color: var(--color-danger); }

/* --- Sélecteur de vue (cartes / liste) --- */
.view-toggle { display: inline-flex; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.view-toggle a { padding: 0.4rem 0.8rem; font-size: 0.82rem; font-weight: 600; color: var(--color-text-muted); background: var(--color-surface); }
.view-toggle a:hover { text-decoration: none; background: var(--color-bg); }
.view-toggle a.active { background: var(--color-accent); color: #fff; }
.view-toggle a + a { border-left: 1px solid var(--color-border); }

/* --- Tuiles (ruchers / ruches) --- */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

.tile {
    display: block;
    background: var(--color-tile-bg);
    border: 1px solid var(--color-tile-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    color: var(--color-text);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.tile:hover {
    text-decoration: none;
    border-color: var(--color-accent-dark);
    transform: translateY(-2px);
}

.tile-statique { cursor: default; }
.tile-statique:hover { transform: none; border-color: var(--color-tile-border); }

.tile-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.tile-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
}

.tile-meta {
    font-size: 0.88rem;
    color: #6B5320;
    margin-top: 0.25rem;
}

.tile-foot {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-tile-border);
    font-size: 0.82rem;
    color: #6B5320;
}

/* --- État vide --- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--color-text-muted); }
.empty-state a { font-weight: 600; }

/* --- Résumé (tableau de bord) --- */
.stats-row {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stats-item {
    flex: 1 1 80px;
    min-width: 80px;
}

.stats-nombre {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.stats-libelle {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .stats-row { gap: 1.2rem; }
    .stats-item { flex: 1 1 auto; min-width: 0; }
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.site-footer a { color: var(--color-text-muted); text-decoration: underline; }

/* --- Visionneuse photo (lightbox) --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 17, 13, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.actif { display: flex; }

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-fermer {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.3rem 0.6rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-radius: 6px;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-compteur {
    position: absolute;
    bottom: 1.3rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.82rem;
    opacity: 0.75;
}

.photo-badge { cursor: pointer; }
.photo-badge:hover { opacity: 0.8; }

/* --- Calendrier --- */
.calendrier-grille {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.calendrier-entete {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    padding-bottom: 0.3rem;
}

.calendrier-jour {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 56px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.3rem;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.calendrier-jour:hover { border-color: var(--color-accent); text-decoration: none; background: var(--color-bg); }
.calendrier-vide { border: none; }
.calendrier-numero { font-size: 0.82rem; font-weight: 600; }
.calendrier-aujourdhui { border-color: var(--color-accent); border-width: 2px; background: var(--color-accent-soft); }
.calendrier-selectionne { background: var(--color-tile-bg); border-color: var(--color-accent-dark); }

.calendrier-point {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 100px;
    padding: 0 0.35rem;
    height: 16px;
    width: fit-content;
}

.calendrier-point-suivi { background: var(--color-success-soft); color: var(--color-success); }
.calendrier-point-recolte { background: var(--color-tile-bg); }
.calendrier-point-tache { background: var(--color-warning-soft); }

@media (max-width: 640px) {
    .calendrier-jour { min-height: 42px; padding: 0.2rem; }
    .calendrier-numero { font-size: 0.72rem; }
    .calendrier-point { font-size: 0.6rem; height: 13px; }
}

/* --- Bande des 5 derniers jours (tableau de bord) --- */
.jours-strip {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.jour-carte {
    flex: 1;
    min-width: 92px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.8rem 0.6rem;
    text-align: center;
    color: var(--color-text);
}

.jour-carte:hover { border-color: var(--color-accent); text-decoration: none; }
.jour-carte-aujourdhui { background: var(--color-accent-soft); border-color: var(--color-accent); border-width: 2px; }

.jour-carte-etiquette {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.jour-carte-numero {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.25rem 0 0.5rem;
}

.jour-carte-badges {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    min-height: 16px;
}

/* --- Page d'accueil publique --- */
.hero-accueil {
    text-align: center;
    padding: 2.5rem 1rem 1rem;
}

.hero-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.hero-accueil h1 {
    font-size: 2.4rem;
    margin-bottom: 0.3rem;
}

.hero-sous-titre {
    font-size: 1.15rem;
    color: var(--color-accent-dark);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.hero-texte {
    max-width: 480px;
    margin: 0 auto 1.6rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero-accueil h1 { font-size: 1.9rem; }
    .hero-actions .btn { flex: 1 1 140px; text-align: center; }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.2rem 2rem;
    max-width: 980px;
    margin: 1rem auto 0;
    padding: 1rem;
}

.feature-icone {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.feature-item h3 {
    font-size: 1.08rem;
    margin-bottom: 0.4rem;
}

.feature-item p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

/* --- Étiquette QR code --- */
.etiquette-qr {
    text-align: center;
    max-width: 360px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.etiquette-nom {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.etiquette-ruche {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.2rem 0 1.2rem;
}

.etiquette-image {
    width: 220px;
    height: 220px;
    image-rendering: pixelated;
}

@media print {
    .etiquette-qr { box-shadow: none; border: 1px solid #999; }
    .etiquette-image { width: 6cm; height: 6cm; }
}

/* --- Registre d'élevage --- */
.registre-infos th {
    text-align: left;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 1rem 0.3rem 0;
    white-space: nowrap;
    vertical-align: top;
}

.registre-infos td { padding: 0.3rem 0; }

@media print {
    .registre-table { font-size: 10px; }
    .registre-entete { break-inside: avoid; }
}

/* --- Journal des modifications --- */
.changelog-liste {
    max-width: 720px;
    margin: 1.5rem 0 0;
    position: relative;
}

.changelog-entree {
    display: flex;
    gap: 1.2rem;
    position: relative;
    padding-bottom: 2rem;
}

.changelog-entree:last-child { padding-bottom: 0; }

.changelog-entree:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 20px;
    bottom: -2rem;
    width: 2px;
    background: var(--color-border);
}

.changelog-marqueur {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 0.35rem;
    position: relative;
    z-index: 1;
}

.changelog-contenu h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.changelog-contenu h2:not(:first-of-type) {
    margin-top: 1.3rem;
}

.changelog-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.changelog-contenu ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text-muted);
}

.changelog-contenu li { margin-bottom: 0.3rem; }

/* --- Barre de recherche moderne (page Recherche) --- */
.search-bar-moderne {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    padding: 0.35rem 0.35rem 0.35rem 1.1rem;
    transition: border-color 0.15s ease;
}

.search-bar-moderne:focus-within { border-color: var(--color-accent); }

.search-bar-icone { color: var(--color-text-muted); flex-shrink: 0; }

.search-bar-moderne input[type="search"] {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.search-bar-moderne input[type="search"]:focus { outline: none; }
.search-bar-moderne .btn { border-radius: 100px; flex-shrink: 0; }

@media (max-width: 640px) {
    .search-bar-moderne { flex-wrap: wrap; padding: 0.35rem 0.35rem 0.35rem 1rem; }
    .search-bar-moderne input[type="search"] { flex: 1; min-width: 0; }
    .search-bar-moderne .btn { flex-basis: 100%; margin-top: 0.5rem; text-align: center; }
}

@media (max-width: 640px) {
    .jours-strip { gap: 0.35rem; }
    .jour-carte { min-width: 0; flex-basis: 0; padding: 0.5rem 0.1rem; }
    .jour-carte-etiquette { font-size: 0.56rem; line-height: 1.15; white-space: normal; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
    .jour-carte-numero { font-size: 0.82rem; margin: 0.15rem 0 0.35rem; }
    .jour-carte-badges { gap: 0.15rem; }
    .calendrier-point { font-size: 0.58rem; height: 15px; padding: 0 0.25rem; }
}

/* --- Météo (réutilise le style des cartes jour) --- */
.meteo-strip {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
}

.meteo-carte { flex: 1; min-width: 84px; }
.meteo-carte-aujourdhui { flex: 1.5; min-width: 130px; }

.meteo-icone {
    color: var(--color-accent-dark);
    display: flex;
    justify-content: center;
    margin: 0.3rem 0;
}

.meteo-icone-large svg { width: 32px; height: 32px; }

.meteo-details {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 0.2rem;
}

@media (max-width: 640px) {
    .meteo-carte, .meteo-carte-aujourdhui { min-width: 0; }
    .meteo-icone-large svg { width: 26px; height: 26px; }
    .meteo-details { font-size: 0.68rem; }
}

/* --- Page de login --- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card { width: 100%; max-width: 360px; }
.login-card h1 { text-align: center; font-size: 1.6rem; }
.login-card .sub { text-align: center; color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 1.5rem; }

/* --- Responsive --- */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}

@media (max-width: 640px) {
    .topbar-inner { padding: 0.8rem 1rem; flex-wrap: wrap; }
    .brand-tag { display: none; }
    .hamburger-btn { display: block; order: 2; }
    .topbar nav {
        display: none;
        order: 3;
        flex-direction: column;
        width: 100%;
        margin-top: 0.6rem;
        gap: 0;
    }
    .topbar nav.nav-open { display: flex; }
    .topbar nav a {
        margin-left: 0;
        padding: 0.75rem 0.2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .search-icon-btn { width: 30px; height: 30px; margin-right: 0.4rem; }
    .container { padding: 1rem; }
    .page-head { flex-direction: column; align-items: flex-start; }
    th, td { padding: 0.5rem 0.4rem; font-size: 0.85rem; }
}

/* --- Impression (export "PDF" via le navigateur) --- */
@media print {
    .topbar, .breadcrumb, .btn, .view-toggle, .no-print, .site-footer, .lightbox-overlay { display: none !important; }
    body { background: #fff; color: #000; }
    .container, .container-wide { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
    table { font-size: 11px; }
    th, td { border-color: #999 !important; }
    .tile { break-inside: avoid; }
}
