/* Styles complementaires — En Scenes ! 2026 */
/* Ici UNIQUEMENT ce que Tailwind ne peut pas faire */

/* =============================================================
   1. VARIABLES
   ============================================================= */

:root {
    --paper: #F2EFE6;
    --ink:   #151515;
    --red:   #C93625;
    --white: #FFFDF8;
    --muted: #6B675F;
    --line:  rgba(21, 21, 21, 0.18);
}

/* =============================================================
   2. BASE
   ============================================================= */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Poppins", sans-serif;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--red);
    color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
}

/* Hauteur forcee sur les images qui doivent remplir leur conteneur */
img.object-cover {
    height: 100%;
}

/* =============================================================
   3. LAYOUT
   ============================================================= */

.site-container {
    width: min(100% - 40px, 1440px);
    margin-inline: auto;
}

@media (min-width: 640px) {
    .site-container { width: min(100% - 64px, 1440px); }
}
@media (min-width: 1024px) {
    .site-container { width: min(100% - 96px, 1440px); }
}
@media (min-width: 1280px) {
    .site-container { width: min(100% - 128px, 1440px); }
}

/* =============================================================
   4. TYPOGRAPHIE
   ============================================================= */

.display-title {
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.86;
}

.section-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

/* =============================================================
   5. COMPOSANTS
   ============================================================= */

.section-rule {
    border-top: 1px solid var(--line);
}

/* Bouton primaire */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.5rem;
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.btn-primary:hover {
    background: var(--red);
}
.btn-primary .btn-arrow {
    transition: transform 0.18s ease;
}
.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Bouton rouge */
.btn-red {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.5rem;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.btn-red:hover {
    background: #a82d1e;
}

/* Bouton outline */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.5rem;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--ink);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.btn-outline:hover {
    background: var(--ink);
    color: var(--white);
}

/* Bouton outline blanc (sur fond sombre) */
.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.5rem;
    background: transparent;
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(255,253,248,0.5);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.btn-outline-white:hover {
    background: rgba(255,253,248,0.12);
}

/* =============================================================
   6. PROSE (articles, contenu editorial)
   ============================================================= */

.prose-festival {
    max-width: 760px;
}
.prose-festival p {
    margin-block: 1.25em;
    line-height: 1.75;
}
.prose-festival h2 {
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    line-height: 1.1;
}
.prose-festival h3 {
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}
.prose-festival a {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
.prose-festival ul,
.prose-festival ol {
    padding-left: 1.4em;
    margin-block: 1em;
}
.prose-festival li {
    margin-block: 0.35em;
    line-height: 1.65;
}
.prose-festival blockquote {
    border-left: 3px solid var(--red);
    margin-left: 0;
    padding-left: 1.25em;
    color: var(--muted);
    font-style: italic;
}
.prose-festival img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2em auto;
    border-radius: 6px;
}

/* =============================================================
   7. ACCESSIBILITE
   ============================================================= */

:focus-visible {
    outline: 3px solid #2046B3;
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: top 0.1s;
}
.skip-link:focus {
    top: 0;
}

/* =============================================================
   8. MOTION
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================================
   9. COULEURS UTILITAIRES
   ============================================================= */

/* Backgrounds sections */
.bg-paper     { background: var(--paper); }
.bg-white-warm { background: var(--white); }
.bg-ink       { background: var(--ink); }
.bg-red       { background: var(--red); }

/* Couleurs texte */
.text-ink     { color: var(--ink); }
.text-muted   { color: var(--muted); }
.text-red     { color: var(--red); }
.text-white-warm { color: var(--white); }

/* Texte sur fond sombre (opacites recurrentes) */
.text-on-dark-faint  { color: rgba(255, 253, 248, 0.35); }
.text-on-dark-muted  { color: rgba(255, 253, 248, 0.4); }
.text-on-dark-mid    { color: rgba(255, 253, 248, 0.5); }
.text-on-dark-label  { color: rgba(255, 253, 248, 0.55); }
.text-on-dark-body   { color: rgba(255, 253, 248, 0.75); }
.text-on-dark        { color: var(--white); }

/* =============================================================
   10. LINE-HEIGHTS RECURRENTS
   ============================================================= */

.lh-082 { line-height: 0.82; }
.lh-085 { line-height: 0.85; }
.lh-086 { line-height: 0.86; }
.lh-088 { line-height: 0.88; }
.lh-09  { line-height: 0.9; }
.lh-095 { line-height: 0.95; }
.lh-1   { line-height: 1; }
.lh-11  { line-height: 1.1; }
.lh-115 { line-height: 1.15; }

/* =============================================================
   11. LIENS
   ============================================================= */

/* Lien sans decoration, couleur heritee */
.link-reset {
    text-decoration: none;
    color: inherit;
}

/* Lien sans decoration, blanc chaud */
.link-reset-white {
    text-decoration: none;
    color: var(--white);
}

/* Lien discret sur fond sombre */
.link-on-dark {
    text-decoration: none;
    color: rgba(255, 253, 248, 0.6);
}

/* =============================================================
   12. HERO
   ============================================================= */

/* Conteneur hero avec hauteur et padding clamp */
.hero-container {
    min-height: 85svh;
    min-height: 85vh;
    padding-bottom: clamp(3rem, 8vw, 6rem);
    padding-top: clamp(5rem, 12vw, 9rem);
}

/* Badge annonce (date, label contextuel) */
.badge-announce {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--red);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
}

/* =============================================================
   13. BORDURES
   ============================================================= */

.border-line  { border: 1px solid var(--line); }
.border-t-line { border-top: 1px solid var(--line); }
.border-b-line { border-bottom: 1px solid var(--line); }

/* Bordure sur fond sombre */
.border-on-dark     { border-color: rgba(255, 253, 248, 0.12); }
.border-t-on-dark   { border-top: 1px solid rgba(255, 253, 248, 0.1); }

/* =============================================================
   14. IMAGES
   ============================================================= */

/* Placeholder image clair (fond creme) */
.img-placeholder      { background: #e8e5dc; }

/* Placeholder image sombre */
.img-placeholder-dark { background: #1a1a1a; }

/* =============================================================
   15. COMPOSANTS SPECIFIQUES
   ============================================================= */

/* Point decoratif rouge (liste lieux) */
.dot-red {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    margin-top: 0.55em;
    flex-shrink: 0;
}

/* Table tarifs */
.table-tarifs {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table-tarifs tr {
    border-bottom: 1px solid var(--line);
}
.table-tarifs td {
    padding-block: 0.75rem;
}
.table-tarifs .tarif-prix {
    text-align: right;
    font-weight: 700;
    color: var(--ink);
}
.table-tarifs .tarif-label {
    color: var(--muted);
}
.table-tarifs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}
.table-tarifs-footer .tarif-gratuit {
    color: var(--red);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Article spectacle sur fond sombre (live/teaser) */
.article-live {
    min-height: 320px;
    border-top: 1px solid rgba(255, 253, 248, 0.1);
}

/* Badges agenda (categorie, passe) */
.badge-event {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}
.badge-event-red   { background: var(--red);  color: #fff; }
.badge-event-ink   { background: var(--ink);  color: #fff; opacity: 0.4; }
.badge-event-muted { color: var(--muted); background: transparent; }

/* =============================================================
   16. FORMULAIRES
   ============================================================= */

/* Champs de formulaire (couleur texte) */
.form-input {
    color: var(--ink);
}

/* Bloc alerte erreur */
.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 0.75rem;
    padding: 1rem;
}
.alert-error ul {
    color: #B91C1C;
    font-size: 0.875rem;
}

/* Bloc alerte info (violet — temoignages) */
.alert-info {
    background: #F5F3FF;
    border: 1px solid #DDD6FE;
    border-radius: 0.75rem;
    padding: 1rem;
}
.alert-info-title {
    color: #5B21B6;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.alert-info-body {
    color: #6D28D9;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Badge OFF (temoignages) */
.badge-off {
    background: #ADA0CC;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

/* =============================================================
   17. BARRE ADMIN
   ============================================================= */

.admin-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #151515;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0;
    height: 44px;
    padding: 0 16px;
}

.admin-bar-user {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 16px;
    white-space: nowrap;
}

.admin-bar-user i {
    margin-right: 4px;
}

.admin-bar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
}

.admin-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 44px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.admin-bar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}
.admin-bar-link i {
    font-size: 11px;
}

.admin-bar-form {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-bar-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 44px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}
.admin-bar-logout:hover {
    color: #fff;
}
.admin-bar-logout i {
    font-size: 11px;
}

/* Liens reseaux sociaux footer */
.footer-social-link {
    border-radius: 4px;
}

/* Logo footer */
.footer-logo {
    width: 72px;
    height: auto;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* Header : hauteur barre + bordure */
.header-bar-inner {
    height: 72px;
    border-bottom: 1px solid var(--line);
}

/* Logo texte header */
.header-logo-letter-spacing {
    letter-spacing: -0.04em;
}

/* Menu mobile : fond */
.mobile-menu-panel {
    background: var(--paper);
}

/* Lien menu mobile */
.mobile-menu-link {
    border-color: var(--line);
    text-decoration: none;
}

/* Numero menu mobile */
.mobile-menu-num {
    color: var(--muted);
    min-width: 2rem;
}

/* Animation items menu mobile */
@keyframes menuItemIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-item {
    opacity: 0;
    animation: menuItemIn 0.35s ease forwards;
}

/* =============================================================
   18. CLASSES SUPPLEMENTAIRES
   ============================================================= */

/* Tailles ponctuelles */
.text-size-09   { font-size: 0.9rem; }
.text-size-085  { font-size: 0.85rem; }
.text-size-105  { font-size: 1.05rem; }
.text-size-12   { font-size: 1.2rem; }
.text-size-35   { font-size: 3.5rem; }
.text-size-15   { font-size: 1.5rem; }

/* letter-spacing ponctuels */
.ls-004  { letter-spacing: 0.04em; }
.ls-005  { letter-spacing: 0.05em; }
.ls-008  { letter-spacing: 0.08em; }
.ls-01   { letter-spacing: 0.1em; }
.ls-n002 { letter-spacing: -0.02em; }
.ls-n003 { letter-spacing: -0.03em; }

/* max-width ch */
.max-w-14ch { max-width: 14ch; }
.max-w-40ch { max-width: 40ch; }
.max-w-42ch { max-width: 42ch; }
.max-w-44ch { max-width: 44ch; }
.max-w-52ch { max-width: 52ch; }
.max-w-56ch { max-width: 56ch; }
.max-w-60ch { max-width: 60ch; }

/* min-width */
.min-w-5rem { min-width: 5rem; }
.min-w-2rem { min-width: 2rem; }

/* Dimensions logo header */
.logo-img { height: 40px; width: auto; }

/* Carte Leaflet */
.carte-leaflet { height: 420px; }

/* Hero post : hauteur + fallback svh */
.hero-post-height {
    min-height: 85svh;
    min-height: 85vh;
}

/* Gradient hero sombre */
.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.62) 100%);
    pointer-events: none;
}

/* Bloc mobile remerciements hero */
.hero-credits-mobile {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 44ch;
}

/* Swiper padding */
.swiper-padding-block { padding-block: 2rem; }

/* Overflow hidden section */
.overflow-h { overflow: hidden; }

/* Blockquote temoignage solo */
.temo-solo-quote { max-width: 52ch; }

/* Fleche animee inline */
.arrow-animated {
    display: inline-block;
    transition: transform 0.18s ease;
}
.group:hover .arrow-animated {
    transform: translateX(4px);
}

/* Texte compagnie / meta spectacle */
.meta-spectacle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Lien image block */
.link-block { display: block; }

/* Opacite image hero */
.opacity-45 { opacity: 0.45; }

/* Opacite annee revue presse */
.opacity-15 { opacity: 0.15; }

/* Taille date agenda mobile */
.date-big   { font-size: 3.5rem; line-height: 0.85; }
.date-month { font-size: 1.5rem; }

/* Texte intro taille 1.05rem */
.text-intro-sm { font-size: 1.05rem; }

/* Texte vide agenda */
.text-empty { font-size: 1.2rem; }

/* Badge label agenda dynamique (couleur via var PHP — conserve style inline) */
/* .badge-label-dynamic — couleur background injectee par PHP, pas de classe possible */

/* Lieux : tailles texte */
.lieu-nom  { font-size: 0.9rem; }
.lieu-desc { font-size: 0.85rem; }

/* Tarifs footer */
.tarif-moins18 { font-size: 0.9rem; }

/* Section max-width 14ch */
.title-max-14ch { max-width: 14ch; }


/* Titre identitaire contour terracotta — stroke 3px (hero) */
.titre-contour {
    color: transparent;
    -webkit-text-stroke: 4px #D14B28;
    font-weight: 700;
}

/* Variante stroke fin — 1.5px (nav, footer, titres secondaires) */
.titre-contour-sm {
    color: transparent;
    -webkit-text-stroke: 1.5px #D14B28;
    font-weight: 700;
}

/* Fallback accessibilite : si stroke non supporte, texte terracotta plein */
@supports not (-webkit-text-stroke: 1px #D14B28) {
    .titre-contour,
    .titre-contour-sm {
        color: #D14B28;
    }
}

/* Fond coup de pinceau — brush stroke avec bords bien ondules */
.fond-crayon {
    position: relative;
    display: inline-block;
}
.fond-crayon::before {
    content: '';
    position: absolute;
    inset: -10px -15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 200' preserveAspectRatio='none'%3E%3Cpath d='M20 70 C8 50,5 30,20 20 C40 10,90 8,160 15 C230 22,280 30,350 25 S480 10,550 18 S680 28,750 20 C800 14,850 18,875 35 C895 50,900 70,895 95 C890 120,880 140,860 155 C830 172,770 180,700 175 C630 170,560 178,480 180 S340 175,260 178 S120 172,60 162 C30 155,12 140,8 120 C4 100,8 85,20 70Z' fill='%23D14B28'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100% 100%;
    z-index: 0;
}

/* Motif hachure noir */
.motif-hachure {
    background-image: repeating-linear-gradient(45deg, #000 0, #000 1px, transparent 0, transparent 50%);
    background-size: 12px 12px;
}

/* Motif hachure lavande */
.motif-hachure-lavande {
    background-image: repeating-linear-gradient(45deg, #ADA0CC 0, #ADA0CC 1px, transparent 0, transparent 50%);
    background-size: 16px 16px;
}

/* Titre contour dans zone hachuree : interieur blanc */
.motif-hachure-lavande .titre-contour {
    color: white;
    paint-order: stroke fill;
}

/* --- Animations page accueil --- */

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fadeIn 1s ease-out both;
    animation-delay: 0.3s;
}

/* Scale in (titre hero) */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.animate-scale-in {
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
}

/* Fade in + slide up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
    animation-delay: 0.6s;
}

/* Scroll reveal — sections */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Cartes partenaires cliquables */
.carte-partenaire {
    display: flex;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.carte-partenaire:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}
.carte-partenaire span {
    color: #4a4a4a;
    transition: color 0.2s ease;
}
a.carte-partenaire:hover span {
    color: #D14B28;
}

/* Bokeh — cercles lumineux doux, bords nets, opacite pulsante */
.bokeh {
    box-shadow: 0 0 40px 10px currentColor;
    animation: bokehPulse 4s ease-in-out infinite alternate;
}
.bokeh:nth-child(2) { animation-delay: 1s; }
.bokeh:nth-child(3) { animation-delay: 2s; }
.bokeh:nth-child(4) { animation-delay: 3s; }

@keyframes bokehPulse {
    from { opacity: 0.4; transform: scale(1); }
    to { opacity: 0.7; transform: scale(1.08); }
}

/* =============================================================
   POC — HEADER ADAPTATIF
   ============================================================= */

/* Pas de transition au chargement, activee apres le premier paint */
.header-bar {
    transition: none;
}

.header-transitions-on .header-bar {
    transition:
        background-color 260ms ease,
        border-color 260ms ease,
        color 260ms ease;
}

/* --- DEFAUT / sections claires (dark) : fond papier, texte encre --- */
.header-bar[data-theme="dark"] {
    background: rgba(242, 239, 230, 0.96);
    backdrop-filter: blur(8px);
    border-bottom-color: var(--line);
    color: var(--ink);
}

/* --- Sections photo sombre (light) : fond noir, texte blanc --- */
.header-bar[data-theme="light"] {
    background: rgba(21, 21, 21, 0.68);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 253, 248, 0.10);
    color: var(--white);
}

/* --- Section rouge (red) : fond rouge, texte blanc --- */
.header-bar[data-theme="red"] {
    background: rgba(201, 54, 37, 0.95);
    backdrop-filter: blur(8px);
    border-bottom-color: rgba(255, 253, 248, 0.18);
    color: var(--white);
}

/* Liens et boutons heritent la couleur */
.header-bar a,
.header-bar button {
    color: inherit;
}

/* Menu mobile ouvert : toujours fond papier, texte encre */
.header-bar.is-menu-open {
    background: var(--paper) !important;
    border-bottom-color: var(--line) !important;
    color: var(--ink) !important;
}

/* =============================================================
   POC — PHOTO REVEAL (progressive enhancement)
   ============================================================= */

.photo-reveal {
    --photo-gray: 70%;
    --photo-saturation: 40%;
    --photo-contrast: 88%;
    --photo-brightness: 85%;
    --photo-overlay: 0.35;
    --photo-scale: 1.04;
    --photo-blur: 5px;

    position: relative;
    overflow: hidden;
    background: var(--ink);
}

/* Sans JS : image normale */
.photo-reveal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-reveal::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: none;
    background: var(--paper);
}

/* Avec JS : effet activé */
.js .photo-reveal img {
    filter:
        blur(var(--photo-blur))
        grayscale(var(--photo-gray))
        saturate(var(--photo-saturation))
        contrast(var(--photo-contrast))
        brightness(var(--photo-brightness));
    transform: scale(var(--photo-scale));
    transform-origin: center center;
    will-change: filter, transform;
}

.js .photo-reveal::after {
    display: block;
    opacity: var(--photo-overlay);
}

/* Pas de zoom sur mobile */
@media (max-width: 639px) {
    .js .photo-reveal img {
        transform: none;
    }
}

/* Reduced motion : image normale */
@media (prefers-reduced-motion: reduce) {
    .js .photo-reveal img {
        filter: none;
        transform: none;
    }
    .js .photo-reveal::after {
        display: none;
    }
}

/* =============================================================
   TYPOGRAPHIE — TAILLES CLAMP
   ============================================================= */

/* Titres hero (h1 pages) */
.title-hero       { font-size: clamp(3rem, 10vw, 8rem); }
.title-hero-xl    { font-size: clamp(3.5rem, 12vw, 9rem); }
.title-hero-sm    { font-size: clamp(2.5rem, 8vw, 7rem); }
.title-hero-post  { font-size: clamp(4rem, 11vw, 10rem); }

/* Titres de sections (h2) */
.title-section    { font-size: clamp(2.4rem, 6vw, 6rem); }
.title-section-md { font-size: clamp(2rem, 5vw, 4rem); }
.title-section-sm { font-size: clamp(1.8rem, 3.5vw, 3.2rem); }
.title-section-xs { font-size: clamp(1.5rem, 3vw, 2.5rem); }

/* Titres de cartes / articles (h2/h3 dans grilles) */
.title-card       { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.title-card-sm    { font-size: clamp(1.1rem, 2vw, 1.5rem); }

/* Titres partenaires / archives */
.title-partner    { font-size: clamp(2.5rem, 6vw, 5rem); }
.title-archive    { font-size: clamp(1.8rem, 4vw, 3.5rem); }

/* Titres article individuel */
.title-article    { font-size: clamp(2rem, 6vw, 4.5rem); }

/* Texte intro / chapeau */
.text-intro       { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.text-intro-lg    { font-size: clamp(1.1rem, 2vw, 1.5rem); }

/* =============================================================
   SECTIONS — PADDING VERTICAL
   ============================================================= */

.section-padding    { padding-block: clamp(5rem, 10vw, 9rem); }
.section-padding-md { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-padding-sm { padding-block: clamp(3rem, 6vw, 6rem); }

/* =============================================================
   RATIOS D'IMAGES
   ============================================================= */

.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

/* =============================================================
   COMPOSANTS SPECIFIQUES
   ============================================================= */

/* Ligne article programme / OFF */
.article-row { min-height: 280px; }

/* Logos partenaires — grayscale au repos, couleur au hover */
.partner-logo {
    height: 48px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter 0.2s ease, opacity 0.2s ease;
}
.partner-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Zoom image au hover (remplace onmouseover inline) */
.img-hover-zoom {
    overflow: hidden;
}
.img-hover-zoom img {
    transition: transform 0.3s ease;
}
.img-hover-zoom:hover img {
    transform: scale(1.015);
}

/* Lien archive (hover fond gris) */
.archive-row {
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.archive-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Année archive — hover rouge */
.archive-year {
    transition: color 0.15s ease;
}
.archive-row:hover .archive-year {
    color: var(--red);
}

/* Flèche archive — hover translate */
.archive-arrow {
    transition: transform 0.18s ease;
}
.archive-row:hover .archive-arrow {
    transform: translateX(6px);
}

/* Navigation éditions (prev/next) — hover rouge */
.edition-nav-year {
    transition: color 0.15s ease;
}
.edition-nav-year:hover {
    color: var(--red);
}

/* =============================================================
   AGENDA CULTUREL
   ============================================================= */

.agenda-row:hover .agenda-titre {
    color: var(--red);
}

.agenda-row:hover .agenda-arrow {
    transform: translateX(6px);
    color: var(--red);
}

/* Parution mise en avant */
.press-featured {
    background: rgba(201, 54, 37, 0.03);
    border-left: 2px solid var(--red);
    padding-left: 1rem;
    margin-left: -1rem;
}

/* x-cloak Alpine.js */
[x-cloak] { display: none !important; }

/* Article OFF min-height */
.article-row-off { min-height: 260px; }

/* =============================================================
   19. LE FILAGE
   ============================================================= */

/* scroll-margin pour les ancres (header 72px + 32px) */
[data-filage-section],
[data-filage-section] h2 {
    scroll-margin-top: calc(72px + 2rem);
}

/* Scope : colonne rail + contenu sur desktop */
@media (min-width: 1024px) {
    .filage-scope {
        display: grid;
        grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
        gap: clamp(3rem, 7vw, 7rem);
        align-items: stretch;
    }
    .filage-content {
        align-self: start;
    }
}

/* Rail sticky */
.filage-rail__inner {
    position: sticky;
    top: calc(72px + 2rem);
}

/* Eyebrow */
.filage__eyebrow {
    margin: 0 0 1.5rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Liste */
.filage__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Lien */
.filage-link {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .5rem;
    min-height: 44px;
    padding-block: .75rem;
    color: var(--muted);
    text-decoration: none;
    border-top: 1px solid var(--line);
    align-items: center;
}

.filage-link__number {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .04em;
    transition: color 180ms ease;
}

.filage-link__label {
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.2;
    transition: color 180ms ease, transform 280ms ease;
}

.filage-link:hover {
    color: var(--ink);
}

.filage-link.is-active {
    color: var(--ink);
}

.filage-link.is-active .filage-link__number {
    color: var(--red);
}

.filage-link.is-active .filage-link__label {
    transform: translateX(.5rem);
}

/* Active panel */
.filage-active {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.filage-active [data-filage-active-number] {
    display: block;
    color: var(--red);
    font-size: clamp(3.5rem, 5vw, 6rem);
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.06em;
}

.filage-active [data-filage-active-label] {
    display: block;
    margin-top: .75rem;
    max-width: 10ch;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 800;
    line-height: .95;
    text-transform: uppercase;
    color: var(--ink);
}

.filage-active__rule {
    display: block;
    margin-top: .875rem;
    height: 3px;
    width: 100%;
    background: var(--red);
    transform-origin: left center;
    transform: scaleX(1);
    transition: transform 280ms ease;
}

/* Compteur */
.filage__counter {
    margin-top: 1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--muted);
}

/* Variante Lecture : active panel compact, pas de gros numero */
.filage--reading .filage-active [data-filage-active-number] {
    font-size: clamp(2rem, 3vw, 3rem);
}

.filage--reading .filage-active [data-filage-active-label] {
    font-size: clamp(.9rem, 1.2vw, 1.1rem);
}

/* Rail masque sous 1024px */
@media (max-width: 1023px) {
    .filage-rail {
        display: none;
    }
}

/* =============================================================
   TICKET MOBILE
   ============================================================= */

.filage-mobile {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: none;
}

/* Visible uniquement sous 1024px */
@media (max-width: 1023px) {
    .filage-mobile {
        display: block;
    }
}

.filage-mobile__trigger {
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .75rem 1rem;
    background: var(--ink);
    color: var(--white);
    border: 0;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.filage-mobile__counter {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: .04em;
    white-space: nowrap;
}

.filage-mobile__label {
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--white);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.filage-mobile__arrow {
    font-size: 1rem;
    color: var(--white);
    opacity: .6;
}

.filage-mobile__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + .5rem);
    max-height: min(70svh, 560px);
    overflow-y: auto;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.filage-mobile__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem .75rem;
    border-bottom: 1px solid var(--line);
}

.filage-mobile__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--ink);
    font-size: 1rem;
}

.filage-mobile__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.filage-mobile__link {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .5rem;
    min-height: 52px;
    padding: .875rem 1rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.filage-mobile__link.is-active {
    color: var(--ink);
}

.filage-mobile__link.is-active .filage-link__number {
    color: var(--red);
}

/* Print */
@media print {
    .filage,
    .filage-rail,
    .filage-mobile {
        display: none !important;
    }
}
