/* ==========================================================================
   AirCazo — CSS principal (charge en asynchrone).
   Composants UI, sections de pages, animations.
   Source : cahier de design, parties 6 a 9.
   ========================================================================== */

/* ===== Header : menu mobile & tab bar ===================================== */
.menu-toggle, .search-toggle { display: inline-flex; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-menu {
    position: fixed; inset: 0; z-index: 90;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 250ms var(--ease);
    display: flex; flex-direction: column;
    padding: 16px;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-bottom: 24px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
    padding: 14px 16px; border-radius: var(--radius);
    font-size: 1.125rem; font-weight: 600;
}
.mobile-menu nav a:hover { background: var(--bg-card); }

.tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
    height: 64px; display: flex;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--divider);
}
.tab-bar a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px;
    font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.tab-bar a[aria-current="page"] { color: var(--color-primary); }
@media (min-width: 1024px) { .tab-bar { display: none; } }
.has-tab-bar .page-main { padding-bottom: 200px; }
@media (min-width: 1024px) { .has-tab-bar .page-main { padding-bottom: 140px; } }

/* ===== Footer ============================================================= */
.site-footer {
    background: var(--color-night); color: #9CA3AF;
    padding: 56px 0 32px; margin-top: 64px;
    border-top: 1px solid var(--divider);
}
.footer-grid {
    display: grid; gap: 32px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.footer-brand svg { height: 28px; margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; max-width: 32ch; }
.footer-col h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: #F9FAFB; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 0.9375rem; color: #9CA3AF; transition: color 150ms var(--ease); }
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 12px 24px;
    justify-content: space-between; align-items: center;
    margin-top: 40px; padding-top: 24px;
    border-top: 1px solid var(--divider);
    font-size: 0.8125rem;
}
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; color: #9CA3AF; font-weight: 600; }
.theme-toggle:hover { color: var(--color-primary); }

/* ===== Grille et cartes radio (cahier design 6.2) ========================= */
.radio-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .radio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .radio-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
@media (min-width: 1280px) { .radio-grid { grid-template-columns: repeat(6, 1fr); } }
.radio-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .radio-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.radio-card {
    display: block; background: var(--bg-card);
    border-radius: var(--radius-lg); overflow: hidden;
    color: var(--text); border: 1px solid transparent;
    transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}
.radio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(255, 90, 60, 0.4); }
.radio-card-cover { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-elevated); }
.radio-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.radio-card:hover .radio-card-cover img { transform: scale(1.05); }
.cover-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--bg-elevated);
}
.cover-initial {
    font-weight: 800; color: #fff; line-height: 1;
    font-size: 2.6rem; text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}
.radio-row-cover .cover-initial { font-size: 1.55rem; }
.radio-logo .cover-initial,
.discover-feature-cover .cover-initial { font-size: 3.2rem; }
.radio-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 41, 0.85) 0%, transparent 55%);
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: 14px; opacity: 0; transition: opacity 200ms var(--ease);
}
.radio-card:hover .radio-card-overlay, .radio-card:focus-within .radio-card-overlay { opacity: 1; }
.radio-card-play {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 90, 60, 0.4);
    transition: transform 120ms var(--ease);
}
.radio-card-play:hover { transform: scale(1.08); }
.radio-card-play:active { transform: scale(0.94); }
.radio-card-info { padding: 14px; }
.radio-card-name { font-size: 1rem; font-weight: 700; margin: 0 0 3px; }
.radio-card-meta { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Carte horizontale (listes denses — cahier design 6.2.2) */
.radio-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid transparent; padding: 12px;
    color: var(--text); transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.radio-row:hover { border-color: rgba(255, 90, 60, 0.4); }
.radio-row-cover { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated); }
.radio-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.radio-row-body { flex: 1; min-width: 0; }
.radio-row-name { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.radio-row-meta { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-row .play-btn {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: transform 120ms var(--ease), background 150ms var(--ease);
}
.radio-row .play-btn:hover { background: var(--color-primary-dark); transform: scale(1.06); }
.radio-list { display: flex; flex-direction: column; gap: 10px; }

/* ===== Badges et tags (cahier design 6.7) ================================= */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; font-size: 12px; font-weight: 600;
    border-radius: var(--radius-pill);
    background: rgba(255, 90, 60, 0.15); color: var(--color-primary);
    border: 1px solid rgba(255, 90, 60, 0.3);
}
.badge-live { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); border-color: rgba(239, 68, 68, 0.3); }
.badge-fm { background: rgba(255, 200, 87, 0.15); color: #B98900; border-color: rgba(255, 200, 87, 0.35); }
[data-theme="dark"] .badge-fm, :root:not([data-theme="light"]) .badge-fm { color: var(--color-amber); }
.badge-new { background: rgba(16, 185, 129, 0.15); color: var(--color-success); border-color: rgba(16, 185, 129, 0.3); }
.badge-muted { background: rgba(127, 127, 127, 0.12); color: var(--text-muted); border-color: var(--border); }

/* ===== Chips (genres, filtres) ============================================ */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: var(--radius-pill);
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 0.9375rem; font-weight: 600; color: var(--text);
    transition: all 150ms var(--ease);
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ===== Vignettes humeur (cahier design 9.1) =============================== */
.mood-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .mood-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .mood-grid { grid-template-columns: repeat(3, 1fr); } }
.mood-tile {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); min-height: 116px;
    transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}
.mood-tile:hover { transform: translateY(-3px); border-color: var(--color-primary); }
.mood-tile .mood-icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 90, 60, 0.14); color: var(--color-primary);
}
.mood-tile h3 { font-size: 1.0625rem; margin: 0; }
.mood-tile p { font-size: 0.8125rem; color: var(--text-muted); margin: 0; }

/* ===== Player audio sticky (cahier design 6.3.1) ========================== */
.player {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: color-mix(in srgb, var(--color-night) 95%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 90, 60, 0.22);
    padding: 12px 16px;
    display: grid; grid-template-columns: 1fr auto 1fr auto;
    align-items: center; gap: 16px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%); transition: transform 280ms var(--ease);
    color: #F9FAFB;
}
.player.is-active { transform: translateY(0); }
.has-tab-bar .player { bottom: 64px; }
@media (min-width: 1024px) { .has-tab-bar .player { bottom: 0; } }
.player-radio { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-radio img, .player-radio .ph { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--color-coal); }
.player-radio-name { font-weight: 700; font-size: 14px; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-now { font-size: 12px; color: #9CA3AF; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-controls .btn-icon { color: #9CA3AF; }
.player-controls .btn-icon:hover { color: #fff; }
.player-playpause {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: transform 120ms var(--ease), background 150ms var(--ease);
}
.player-playpause:hover { background: var(--color-primary-dark); transform: scale(1.05); }
.player-volume { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.player-volume input[type="range"] { width: 96px; accent-color: var(--color-primary); }
.player-busy .player-playpause { opacity: 0.7; }
@media (max-width: 720px) {
    .player { grid-template-columns: 1fr auto; gap: 8px; padding: 8px 12px; }
    .player-volume, .player-close { display: none; }
}

/* ===== Champs de formulaire (cahier design 6.4) =========================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.field-helper { font-size: 13px; color: var(--text-muted); }
.field-error { font-size: 13px; color: var(--color-danger); }
.input, .textarea, .select {
    width: 100%; height: 48px; padding: 0 16px;
    background: var(--bg-card); color: var(--text);
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 16px; transition: all 150ms var(--ease);
}
.textarea { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.1);
}
.input[aria-invalid="true"] { border-color: var(--color-danger); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Alertes en ligne =================================================== */
.alert { padding: 14px 16px; border-radius: var(--radius); border-left: 4px solid; font-size: 0.9375rem; margin-bottom: 18px; }
.alert-success { background: rgba(16, 185, 129, 0.12); border-color: var(--color-success); }
.alert-warning { background: rgba(245, 158, 11, 0.12); border-color: var(--color-warning); }
.alert-danger { background: rgba(239, 68, 68, 0.12); border-color: var(--color-danger); }
.alert-info { background: rgba(59, 130, 246, 0.12); border-color: var(--color-info); }

/* ===== Modale & drawer (cahier design 6.5) ================================ */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 41, 0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 200ms var(--ease);
}
.modal {
    background: var(--bg-card); border-radius: var(--radius-xl);
    max-width: 560px; width: calc(100% - 32px); max-height: 90vh;
    overflow-y: auto; padding: 32px;
    animation: scaleIn 200ms var(--ease);
}
@media (max-width: 640px) {
    .modal-backdrop { align-items: flex-end; }
    .modal { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 85vh; animation: slideUp 250ms var(--ease); }
}

/* ===== Toast (cahier design 6.9) ========================================== */
.toast-zone { position: fixed; bottom: 100px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--bg-card); border: 1px solid var(--border);
    border-left: 4px solid var(--color-success);
    border-radius: var(--radius); padding: 14px 18px;
    min-width: 260px; max-width: 380px;
    box-shadow: var(--shadow-card-hover);
    display: flex; align-items: flex-start; gap: 10px;
    animation: slideInRight 250ms var(--ease);
}
.toast-danger { border-left-color: var(--color-danger); }
.toast-info { border-left-color: var(--color-info); }

/* ===== Etats de chargement (cahier design 6.8) ============================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 0%, rgba(255, 255, 255, 0.06) 50%, var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-card { aspect-ratio: 1 / 1; border-radius: var(--radius-lg); }
.spinner {
    width: 20px; height: 20px; border: 2px solid rgba(127, 127, 127, 0.25);
    border-top-color: var(--color-primary); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Fil d'Ariane ======================================================= */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { opacity: 0.5; }

/* ===== Hero de page generique ============================================= */
.page-hero { padding: 40px 0 32px; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .lead { margin-bottom: 0; }

/* ===== Page radio (cahier design 9.2) ===================================== */
.radio-hero {
    position: relative; overflow: hidden;
    padding: 48px 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--radio-color, var(--color-primary)) 28%, var(--bg)) 0%, var(--bg) 100%);
}
.radio-hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
@media (min-width: 768px) { .radio-hero-inner { flex-direction: row; text-align: left; align-items: flex-start; gap: 28px; } }
.radio-logo {
    width: 160px; height: 160px; flex-shrink: 0;
    border-radius: var(--radius-lg); object-fit: cover;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    background: var(--bg-card);
}
.radio-identity { flex: 1; min-width: 0; }
.radio-identity h1 { margin-bottom: 6px; }
.radio-slogan { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 14px; }
.radio-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.radio-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.radio-cta .btn-primary { --color-primary: var(--radio-color, #FF5A3C); }
.now-playing {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
}
.now-playing .live-dot { background: var(--color-danger); }
.radio-section { padding: 32px 0; border-bottom: 1px solid var(--divider); }
.radio-section h2 { margin-bottom: 16px; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 14px; line-height: 1.7; color: var(--text); }
.prose h2, .prose h3 { margin: 24px 0 12px; }

/* Grille des programmes */
.schedule-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.schedule-day {
    padding: 7px 14px; border-radius: var(--radius-pill);
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 0.875rem; font-weight: 600;
}
.schedule-day.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.schedule-list { display: flex; flex-direction: column; }
.schedule-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.schedule-item.is-now { background: rgba(255, 90, 60, 0.06); border-radius: var(--radius-sm); padding-left: 12px; padding-right: 12px; }
.schedule-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.schedule-prog strong { display: block; }
.schedule-prog span { font-size: 0.8125rem; color: var(--text-muted); }

/* Historique des morceaux */
.track-list { display: flex; flex-direction: column; }
.track-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 0.9375rem; }
.track-when { color: var(--text-muted); white-space: nowrap; font-size: 0.8125rem; min-width: 90px; }

/* FAQ accordeon natif */
.faq details {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 10px; background: var(--bg-card); overflow: hidden;
}
.faq summary {
    padding: 16px; font-weight: 600; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.25rem; color: var(--color-primary); }
.faq details[open] summary::after { content: '\2212'; }
.faq details > div { padding: 0 16px 16px; color: var(--text-muted); line-height: 1.6; }

/* Liens reseaux sociaux */
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-card);
    font-weight: 600; font-size: 0.875rem;
}
.social-link:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===== Page recherche (cahier design 9.4) ================================= */
.search-layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .search-layout { grid-template-columns: 280px 1fr; } }
.filters { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; align-self: start; }
.filters h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 12px; }
.filter-group { margin-bottom: 20px; }
.search-bar-inline {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: var(--radius-pill); padding: 6px 6px 6px 18px; height: 56px;
}
.search-bar-inline:focus-within { border-color: var(--color-primary); }
.search-bar-inline input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: 16px; }

/* ===== Pagination ========================================================= */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--bg-card); font-weight: 600; font-size: 0.9375rem;
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .is-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ===== Etats vides ======================================================== */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.empty-state .empty-icon { color: var(--border); margin: 0 auto 16px; }
.empty-state h2 { color: var(--text); margin-bottom: 8px; }

/* ===== Articles editoriaux ================================================ */
.article-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
.article-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid transparent; transition: border-color 200ms var(--ease); }
.article-card:hover { border-color: rgba(255, 90, 60, 0.4); }
.article-card .cover { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--bg-elevated); }
.article-card .body { padding: 16px; }
.article-card h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.article-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ===== Cartes statistiques (dashboards) =================================== */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; }
.stat-card .stat-label { font-size: 0.8125rem; color: var(--text-muted); }

/* ===== Animations (cahier design 8) ======================================= */
@keyframes fadeIn { from { opacity: 0; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } }
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.45); opacity: 0; } }

.fade-up { opacity: 0; transform: translateY(20px); }
.fade-up.in-view {
    opacity: 1; transform: translateY(0);
    transition: opacity 400ms var(--ease), transform 400ms var(--ease);
    transition-delay: calc(var(--i, 0) * 50ms);
}

/* ===== Authentification =================================================== */
.auth-card {
    max-width: 420px; margin: 0 auto;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 32px;
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-sep {
    display: flex; align-items: center; gap: 12px; margin: 22px 0;
    color: var(--text-muted); font-size: 0.875rem;
}
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-alt { margin-top: 20px; font-size: 0.9375rem; }
.auth-alt a, .field-helper a { color: var(--color-primary); font-weight: 600; }

/* ===== Espace compte ====================================================== */
.account-nav {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-bottom: 24px; padding-bottom: 14px;
    border-bottom: 1px solid var(--divider);
}
.account-nav a, .account-nav-logout {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: var(--radius-sm);
    font-size: 0.9375rem; font-weight: 600; color: var(--text-muted);
}
.account-nav a:hover, .account-nav-logout:hover { background: var(--bg-card); color: var(--text); }
.account-nav a[aria-current="page"] { background: rgba(255, 90, 60, 0.1); color: var(--color-primary); }
.account-nav-form { margin-left: auto; }
.account-nav-logout { background: none; border: none; cursor: pointer; }
.account-panel { max-width: 540px; }
.danger-zone h2 { color: var(--color-danger); }
.danger-btn { border-color: var(--color-danger); color: var(--color-danger); }
.danger-btn:hover { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }

/* ===== Pages d'erreur ===================================================== */
.error-page { max-width: 560px; margin: 0 auto; text-align: center; }
.error-code { font-size: 5rem; font-weight: 800; line-height: 1; color: var(--color-primary); margin-bottom: 8px; }
.error-page h1 { margin-bottom: 12px; }
.error-page .lead { margin: 0 auto 28px; }
.error-page .radio-cta { justify-content: center; }
.error-trace {
    text-align: left; margin-top: 32px; background: var(--bg-card);
    border: 1px solid var(--border); padding: 16px; border-radius: var(--radius);
    overflow: auto; font-size: 12px; line-height: 1.5;
}

/* ===== Bandeau d'appel a l'action ========================================= */
.cta-band {
    display: flex; flex-wrap: wrap; gap: 20px 32px;
    align-items: center; justify-content: space-between;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px 32px;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; max-width: 52ch; }

/* ===== Vedette de decouverte ============================================== */
.discover-feature {
    display: flex; flex-direction: column; gap: 20px; align-items: center;
    text-align: center; padding: 32px; margin-bottom: 16px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--radio-color, var(--color-primary)) 22%, var(--bg)) 0%,
        var(--bg-card) 100%);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
}
@media (min-width: 768px) {
    .discover-feature { flex-direction: row; text-align: left; gap: 32px; }
    .discover-feature-body .radio-cta { justify-content: flex-start; }
}
.discover-feature-cover {
    width: 200px; height: 200px; flex-shrink: 0;
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--bg-elevated); box-shadow: var(--shadow-card-hover);
}
.discover-feature-cover img { width: 100%; height: 100%; object-fit: cover; }
.discover-feature-body h2 { margin: 10px 0 4px; }
.discover-feature-body .radio-cta { margin-top: 18px; justify-content: center; }

/* ===== Recherche : icone de la barre ====================================== */
.search-icon { display: flex; flex-shrink: 0; color: var(--text-muted); }

/* ===== Pages legales ====================================================== */
.legal-prose { max-width: 70ch; }
.legal-prose h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.legal-prose code {
    background: var(--bg-card); padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}

/* ===== Utilitaires ======================================================== */
.stack > * + * { margin-top: var(--stack-gap, 16px); }
.flow { display: flex; flex-direction: column; gap: 12px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none; }
