/* Maria l'indésirable — site documentaire / CSS externalisé / responsive / 3 thèmes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Thème clair (défaut) ---------- */
:root,
:root[data-theme="clair"] {
    --violet: #4b3892;
    --accent: #4b3892;
    --ink: #27272a;
    --text: #27272a;
    --muted: #52525b;
    --line: #e4e4e7;
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --surface: #fafafa;
    --header-bg: rgba(255, 255, 255, 0.96);
    --focus: #4b3892;
    --card-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
    --video-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    --maxw: 1100px;
}

/* ---------- Thème sombre (fond noir) ---------- */
:root[data-theme="sombre"] {
    --violet: #b7a6e8;
    --accent: #b7a6e8;
    --ink: #f4f2fa;
    --text: #f4f2fa;
    --muted: #c9c5d6;
    --line: #3a3644;
    --bg: #000000;
    --bg-soft: #121016;
    --surface: #141118;
    --header-bg: rgba(0, 0, 0, 0.94);
    --focus: #b7a6e8;
    --card-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
    --video-shadow: 0 18px 60px rgba(0, 0, 0, 0.8);
}

/* ---------- Thème accessible (fort contraste, texte agrandi) ---------- */
:root[data-theme="accessible"] {
    --violet: #ffd700;
    --accent: #ffd700;
    --ink: #ffffff;
    --text: #ffffff;
    --muted: #ffffff;
    --line: #ffffff;
    --bg: #000000;
    --bg-soft: #000000;
    --surface: #000000;
    --header-bg: #000000;
    --focus: #ffd700;
    --card-shadow: none;
    --video-shadow: none;
    --maxw: 1100px;
}

html {
    scroll-behavior: smooth;
}

:root[data-theme="accessible"] body {
    font-size: 1.25rem;
    line-height: 1.9;
    letter-spacing: 0.02em;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Header + menu ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

:root[data-theme="accessible"] .site-header {
    backdrop-filter: none;
    border-bottom: 3px solid var(--line);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.65rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* burger (checkbox hack, sans JS) */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-burger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
}

.nav-burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    margin: 6px 0;
    border-radius: 2px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    align-items: center;
}

/* menu centré entre le logo (gauche) et le bouton thème (droite) */
.main-nav {
    margin-left: auto;
    margin-right: auto;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-family: "Martian Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--accent);
}

.main-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

:root[data-theme="accessible"] .main-nav a {
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 1rem;
}

/* langue + bouton thème à droite */
.lang-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-right: 0.5rem;
}

.lang-btn {
    font-family: "Martian Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.3rem 0.35rem;
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--accent);
    border-color: var(--line);
}

.lang-btn.is-active {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

/* mention « contenus disponibles en français » (versions non-FR) */
.lang-note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
    margin: 0 0 0.8rem 0;
}

/* sélecteur de thème : bouton icône + menu déroulant */
.theme-wrap {
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface);
}

.theme-btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.theme-btn .theme-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    z-index: 100;
}

.theme-menu[hidden] {
    display: none;
}

.theme-menu button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    font-family: "Martian Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
}

.theme-menu button:hover {
    background: var(--surface);
    color: var(--accent);
}

.theme-menu button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

.theme-menu button[aria-checked="true"] {
    color: var(--accent);
    font-weight: 700;
}

.theme-menu button[aria-checked="true"]::after {
    content: "✓";
    margin-left: auto;
    font-weight: 700;
}

.swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid #999;
}

.swatch-clair {
    background: #ffffff;
}

.swatch-sombre {
    background: #000000;
}

.swatch-accessible {
    background: linear-gradient(135deg, #000000 50%, #ffd700 50%);
}

:root[data-theme="accessible"] .theme-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--accent);
}

:root[data-theme="accessible"] .theme-menu {
    border: 2px solid #fff;
    border-radius: 0;
    box-shadow: none;
    min-width: 270px;
}

:root[data-theme="accessible"] .theme-menu button {
    font-size: 1rem;
    padding: 0.9rem 1rem;
}

/* texte masqué visuellement (accessibilité) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* l'attribut hidden doit toujours masquer, même face à display:flex */
[hidden] {
    display: none !important;
}

/* logo texte compact, en haut à gauche — couleurs et fonts conservées */
.brand {
    display: inline-block;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.brand-maria {
    font-family: "Chicle", cursive;
    color: var(--accent);
    font-size: 1.7rem;
    display: block;
    letter-spacing: 1px;
    line-height: 1;
}

/* "l'indésirable" : sous-titre compact sous "Maria", chasse resserrée */
.brand-sub {
    display: block;
    font-family: "Martian Mono", monospace;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 2px;
    letter-spacing: -0.05em;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.2rem 4rem;
}

.page-title {
    font-family: "Martian Mono", monospace;
    font-size: 1.8rem;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

:root[data-theme="accessible"] .page-title {
    font-size: 2.3rem;
    line-height: 1.3;
}

.title-bar {
    width: 50px;
    height: 3px;
    background-color: var(--accent);
    margin-bottom: 2rem;
}

.page-actions {
    margin-bottom: 1.5rem;
}

.left-btn {
    margin-top: 1.5rem;
}

:root[data-theme="accessible"] .title-bar {
    width: 80px;
    height: 5px;
}

.lead {
    color: var(--text);
    max-width: 65ch;
    margin-bottom: 2rem;
}

.lead--full {
    max-width: none;
}

:root[data-theme="accessible"] .lead {
    max-width: 100%;
    font-weight: 600;
}

/* ---------- Bande-annonce 16:9 responsive ---------- */
.video-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--video-shadow);
    margin-bottom: 3rem;
}

:root[data-theme="accessible"] .video-wrap {
    border: 3px solid #fff;
    border-radius: 0;
}

.video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Vidéos intégrées aux actualités : même cadre 16:9, marges de contenu. */
.news-content .video-wrap {
    margin: 1.5rem 0;
}

/* ---------- Synopsis ---------- */
.film-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: flex-start;
}

.film-poster {
    flex: 1 1 280px;
    min-width: 0;
}

.film-poster img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

:root[data-theme="accessible"] .film-poster img {
    border: 3px solid #fff;
    border-radius: 0;
}

.film-poster figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.6rem;
    text-align: center;
}

:root[data-theme="accessible"] .film-poster figcaption {
    font-size: 1.05rem;
}

.synopsis {
    flex: 1 1 500px;
    min-width: 0;
}

.synopsis p {
    margin: 0 0 1rem 0;
    text-align: justify;
}

:root[data-theme="accessible"] .synopsis p {
    text-align: left;
    margin-bottom: 1.4rem;
}

.dropcap {
    font-size: 3.5rem;
    color: var(--accent);
    float: left;
    line-height: 0.8;
    padding-right: 0.5rem;
    padding-top: 0.4rem;
    font-weight: 700;
}

:root[data-theme="accessible"] .dropcap {
    font-size: 4.2rem;
}

.synopsis-closing {
    margin: 2rem 0 0 0;
    text-align: justify;
    font-weight: 600;
    font-style: italic;
}

:root[data-theme="accessible"] .synopsis-closing {
    text-align: left;
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
}

/* ---------- Fiche technique ---------- */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tech-card {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 250px;
    background-color: var(--surface);
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 4px solid var(--line);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-card:hover {
    border-left-color: var(--accent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

:root[data-theme="sombre"] .tech-card:hover {
    box-shadow: none;
}

:root[data-theme="accessible"] .tech-card {
    border: 2px solid #fff;
    border-left: 8px solid var(--accent);
    border-radius: 0;
    padding: 1.5rem;
}

.tech-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-family: "Martian Mono", monospace;
}

:root[data-theme="accessible"] .tech-label {
    font-size: 1rem;
}

.tech-value {
    font-size: 0.92rem;
    font-weight: 500;
    margin: 0;
}

:root[data-theme="accessible"] .tech-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.tech-value .sub-label {
    font-weight: 600;
}

.tech-value a {
    color: var(--accent);
    text-underline-offset: 3px;
}

.tech-value a:hover {
    text-decoration-thickness: 2px;
}

.flag {
    vertical-align: middle;
    margin-left: 4px;
}

/* ---------- Ressources ---------- */
.res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.res-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

:root[data-theme="accessible"] .res-card {
    border: 2px solid #fff;
    border-radius: 0;
    padding: 1.8rem;
}

.res-card h3 {
    font-family: "Martian Mono", monospace;
    font-size: 1.02rem;
    color: var(--text);
}

:root[data-theme="accessible"] .res-card h3 {
    font-size: 1.3rem;
}

.res-card p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
}

:root[data-theme="accessible"] .res-card p {
    font-size: 1.15rem;
}

.badge {
    display: inline-block;
    align-self: flex-start;
    font-family: "Martian Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

:root[data-theme="accessible"] .badge {
    font-size: 0.9rem;
    border-width: 2px;
}

.btn-disabled {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    cursor: not-allowed;
}

:root[data-theme="accessible"] .btn-disabled {
    font-size: 1.1rem;
    text-decoration: underline;
}

/* ---------- Actualités (front) ---------- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 1rem;
}

.news-article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

:root[data-theme="sombre"] .news-article {
    box-shadow: none;
    border-color: #4a4458;
}

.news-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.news-date {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
}

.news-title {
    font-family: "Martian Mono", monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    flex: 1 1 12rem;
}

.news-title a {
    color: var(--accent);
}

.news-article > .news-content {
    padding: 1.2rem 1.5rem 1.5rem;
}

.news-article .news-content > :last-child {
    margin-bottom: 0;
}

/* images inline des actus : alignement + taille choisis dans l'éditeur ;
   marge tout autour dès que du texte les entoure */
.news-content img.al {
    float: left;
    margin: 0.5rem 1rem 0.5rem 0;
}

.news-content img.ar {
    float: right;
    margin: 0.5rem 0 0.5rem 1rem;
}

.news-content img.ac {
    display: block;
    margin: 0.5rem auto;
}

.news-content img.is-small {
    max-width: 300px;
}

.news-content img.is-medium {
    max-width: 550px;
}

.news-content img.sel-img {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.news-content a.zoom.al {
    float: left;
    margin: 0.5rem 1rem 0.5rem 0;
}

.news-content a.zoom.ar {
    float: right;
    margin: 0.5rem 0 0.5rem 1rem;
}

.news-content a.zoom.ac {
    display: table;
    margin: 0.5rem auto;
}

/* mention sous les images cliquables (actus + fenêtre de lecture, pas l'éditeur) */
.news-article .news-content a.zoom::after,
.news-modal-box .news-content a.zoom::after {
    content: "cliquer pour agrandir";
    display: block;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
    text-align: center;
    margin-top: 0.3rem;
}

/* image seule à gauche/droite : légende alignée sur l'image, pas la page */
.news-article .news-content a.zoom.solo.al::after,
.news-modal-box .news-content a.zoom.solo.al::after {
    text-align: left;
}

.news-article .news-content a.zoom.solo.ar::after,
.news-modal-box .news-content a.zoom.solo.ar::after {
    text-align: right;
}

.news-content a.zoom.solo.al {
    display: table;
    float: none;
    margin: 0.5rem auto 0.5rem 0;
}

.news-content a.zoom.solo.ar {
    display: table;
    float: none;
    margin: 0.5rem 0 0.5rem auto;
}

/* habillage : image seule sur sa ligne (sans texte autour) */
.news-content img.solo {
    display: block;
    float: none;
}

.news-content img.solo.al {
    margin: 0.5rem auto 0.5rem 0;
}

.news-content img.solo.ar {
    margin: 0.5rem 0 0.5rem auto;
}

/* l'éditeur englobe les flottants : le cadre suit le contenu */
.editor-area {
    display: flow-root;
}

/* mini-barre flottante d'image sélectionnée (éditeur) */

/* carrousel d'accueil : jamais plus de 300 px */
.news-rotator .news-content img {
    max-width: 300px;
}

.news-rotator .news-content img.is-medium {
    max-width: 300px;
}

:root[data-theme="accessible"] .news-article {
    border-width: 2px;
    border-radius: 0;
    box-shadow: none;
}

:root[data-theme="accessible"] .news-head {
    border-bottom-width: 2px;
}

:root[data-theme="accessible"] .news-date {
    font-size: 0.95rem;
    border-width: 2px;
}

:root[data-theme="accessible"] .news-title {
    font-size: 1.4rem;
}

/* contenu HTML brut des actus : même rendu côté front et dans l'éditeur */
.news-content {
    overflow-wrap: break-word;
}

.news-content h2 {
    font-family: "Martian Mono", monospace;
    font-size: 1.25rem;
    margin: 0 0 0.7rem 0;
    color: var(--text);
}

.news-content h3 {
    font-family: "Martian Mono", monospace;
    font-size: 1.05rem;
    margin: 0 0 0.6rem 0;
    color: var(--text);
}

.news-content p {
    margin: 0 0 0.9rem 0;
}

.news-content ul,
.news-content ol {
    margin: 0 0 0.9rem 1.4rem;
}

.news-content li {
    margin-bottom: 0.3rem;
}

.news-content a {
    color: var(--accent);
    text-underline-offset: 3px;
}

.news-content blockquote {
    margin: 0 0 0.9rem 0;
    padding: 0.8rem 1.1rem;
    border-left: 4px solid var(--accent);
    background: var(--surface);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

:root[data-theme="accessible"] .news-content {
    font-size: 1.2rem;
    line-height: 1.9;
}

:root[data-theme="accessible"] .news-content blockquote {
    border-left-width: 6px;
    border-radius: 0;
}

.news-empty {
    color: var(--muted);
    font-style: italic;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
}

.pagination a,
.pagination span {
    font-family: "Martian Mono", monospace;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Back-office actualités ---------- */
.admin-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-field > span {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-field select,
.admin-field input[type="text"],
.admin-field input[type="password"],
.admin-field input[type="datetime-local"],
.admin-field input[type="file"] {
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.admin-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.2rem 0;
}

.admin-meta .admin-field input {
    width: 100%;
}

/* champs d'édition assortis à la tête des cartes : aperçu fidèle */
.admin-meta input[name="title"] {
    font-family: "Martian Mono", monospace;
    font-weight: 700;
    font-size: 1rem;
}

.admin-meta input[name="newsdate"] {
    font-family: "Martian Mono", monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

.btn {
    display: inline-block;
    font-family: "Martian Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: transparent;
    border: 1px solid #c0392b;
    color: #c0392b;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.msg {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.msg-ok {
    background: #e8f5e9;
    border: 1px solid #2e7d32;
    color: #1b5e20;
}

.msg-err {
    background: #fdecea;
    border: 1px solid #c0392b;
    color: #7b241c;
}

:root[data-theme="sombre"] .msg-ok,
:root[data-theme="accessible"] .msg-ok {
    background: #0a2a0e;
    color: #a5d6a7;
}

:root[data-theme="sombre"] .msg-err,
:root[data-theme="accessible"] .msg-err {
    background: #2a0a0a;
    color: #f5a5a5;
}

.admin-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* repli navigateurs anciens sans grid : même disposition en flex */
@supports not (display: grid) {
    .admin-layout {
        display: flex;
    }

    .admin-list {
        flex: 0 0 300px;
    }

    .admin-editor {
        flex: 1;
    }
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.admin-list h2,
.admin-editor h2 {
    font-family: "Martian Mono", monospace;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.admin-item {
    display: block;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
}

.admin-item:hover {
    border-color: var(--accent);
}

.admin-item.selected {
    border-color: var(--accent);
    border-left-color: var(--accent);
}

.admin-item-date {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    color: var(--accent);
}

.admin-item-title {
    display: block;
    font-weight: 600;
    margin-top: 0.2rem;
}

.admin-item-excerpt {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

/* réorganisation manuelle (agenda, festivals) */
.admin-moverow {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.admin-moverow .admin-item {
    flex: 1;
    min-width: 0;
}

.admin-moves {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
}

.move-btn {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.move-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.move-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.admin-more {
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.4rem;
}

.admin-editor {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.toolbar button {
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

.toolbar button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toolbar-sep {
    width: 1px;
    background: var(--line);
    margin: 4px 2px;
}

.editor-area {
    min-height: 320px;
    padding: 1rem 1.2rem;
}

.editor-area:focus {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

.admin-actions {
    display: flex;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.admin-editor-title {
    padding: 1rem 1.2rem 0;
}

.admin-placeholder {
    padding: 0 1.2rem 1.2rem;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

/* ---------- Édition des quizz (back-office) ---------- */
.quiz-title-field {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
}

.quiz-q {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.2rem;
    margin-bottom: 1.2rem;
    background: #efeff1;
}

/* Thèmes sombre/accessible : fond adapté (le gris clair ne vaut que pour le clair, défaut sans attribut). */
:root[data-theme="sombre"] .quiz-q,
:root[data-theme="accessible"] .quiz-q {
    background: var(--surface);
}

.quiz-q h3 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.quiz-q .admin-field textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    height: 4.6em;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    resize: vertical;
}

.quiz-choice {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
}

.quiz-choice input[type="radio"] {
    flex: 0 0 auto;
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--accent);
    cursor: pointer;
}

.quiz-choice input[type="text"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: transparent;
    border: 0;
    padding: 0.2rem 0.1rem;
}

.quiz-choice input[type="text"]:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

.quiz-delete {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.quiz-file {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Édition / traduction des langues (back-office) ---------- */
.trad-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.2rem;
}

.trad-progress {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 1rem 0;
}

.trad-field {
    margin-bottom: 1rem;
}

.trad-field label,
.trad-key {
    display: block;
    margin-bottom: 0.3rem;
}

.trad-field label code,
.trad-key code {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    color: var(--accent);
}

.trad-field textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    resize: vertical;
}

.trad-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.trad-ro {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    min-height: 3.2em;
}

.trad-dst textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    resize: vertical;
}

.trad-dst textarea.missing {
    border: 2px solid #c0392b;
    background: #fdf0ef;
}

:root[data-theme="sombre"] .trad-dst textarea.missing {
    background: #3a1f1d;
}

@media (max-width: 720px) {
    .trad-pair {
        grid-template-columns: 1fr;
    }
}

/* mini-barre flottante d'image sélectionnée (éditeur) */
.img-tools {
    position: fixed;
    z-index: 250;
    display: flex;
    gap: 0.3rem;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 0.35rem;
}

.img-tools[hidden] {
    display: none;
}

.img-tools button {
    font-family: "Martian Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    white-space: nowrap;
}

.img-tools button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.img-tools button[aria-pressed="true"] {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
}

.img-tools select {
    font-family: "Martian Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.4rem 0.3rem;
    cursor: pointer;
    max-width: 110px;
}

.img-tools select:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.img-tools .danger {
    color: #d64545;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.img-tools .danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.login-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.login-card h3 {
    font-family: "Martian Mono", monospace;
    font-size: 1.02rem;
    color: var(--text);
}

.login-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.login-card .btn {
    align-self: flex-start;
}

:root[data-theme="accessible"] .login-card {
    border-width: 2px;
    border-radius: 0;
}

/* citation mise en évidence entre la bande-annonce et le synopsis :
   filets haut/bas + losange, sans guillemet */
.pull-quote {
    position: relative;
    margin: 2.8rem auto 0;
    max-width: 62ch;
    padding: 1.6rem 1rem;
    text-align: center;
    font-size: clamp(1.1rem, 2.6vw, 1.35rem);
    font-weight: 600;
    line-height: 1.65;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pull-quote-main {
    display: block;
}

.pull-quote-sub {
    display: block;
    margin-top: 0.6rem;
    font-style: italic;
}

.pull-quote::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--bg);
    border: 1px solid var(--accent);
}

:root[data-theme="accessible"] .pull-quote {
    font-size: 1.5rem;
    border-top-width: 2px;
    border-bottom-width: 2px;
}

/* ---------- Lauriers des festivals (film) : 250 px, variante selon thème ----------
   Version noire (lauriers-noirs-*) en thèmes clair/accessible,
   version blanche (lauriers-blancs-*) en thème sombre. */
.lauriers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
}

.lauriers-grid img {
    width: 250px;
    height: auto;
    display: block;
}

.lauriers-grid .laurier-blanc {
    display: none;
}

.lauriers-grid .laurier-noir {
    display: block;
}

:root[data-theme="sombre"] .lauriers-grid .laurier-noir {
    display: none;
}

:root[data-theme="sombre"] .lauriers-grid .laurier-blanc {
    display: block;
}

:root[data-theme="accessible"] .lauriers-grid .laurier-noir {
    display: none;
}

:root[data-theme="accessible"] .lauriers-grid .laurier-blanc {
    display: block;
}

/* ---------- Bandeau photo parallaxe (pleine largeur) ----------
   Le bandeau ne montre qu'une tranche (~1/3) de l'image ;
   le défilement fait voyager la fenêtre sur toute sa hauteur. */
.parallax {
    position: relative;
    width: 100vw;
    /* image 1,83:1 -> cette hauteur montre ~1/2 de la photo sur écran 16:9 */
    height: clamp(280px, 48vh, 560px);
    margin: 3.5rem 0 3.5rem calc(50% - 50vw);
    overflow: hidden;
    background: var(--bg);
}

#parallax-img,
.parallax-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    display: block;
    will-change: transform;
}

/* écran étroit : l'image deviendrait plus petite que le bandeau -> remplissage fixe */
#parallax-img.is-cover,
.parallax-img.is-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* respiration visuelle avant la fiche technique */
.film-breather {
    margin: 3.5rem 0 0;
}

.film-breather img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* affiche flottante page Le film : 50% à droite du titre, le texte des
   sections s'enroule autour */
.film-poster-float {
    float: right;
    width: 33%;
    max-width: 350px;
    margin: 0 0 1.5rem 2rem;
}

.film-poster-float img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.container::after {
    content: "";
    display: block;
    clear: both;
}
.film-section {
    margin-top: 3.5rem;
}

.film-section:first-child {
    margin-top: 0;
}

.section-title {
    font-family: "Martian Mono", monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.section-bar {
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    margin: 0.6rem 0 1.8rem;
}

/* Séparateur entre les deux sections de l'agenda (à venir / passées) */
.agenda-divider {
    border: none;
    height: 1px;
    background-color: var(--line);
    margin: 2.2rem 0;
}

/* Espace supplémentaire avant la seconde section de l'agenda */
.agenda-divider + .section-title {
    margin-top: 1.2rem;
}

.synopsis-grid .synopsis {
    max-width: 75ch;
    padding-right: 1rem;
}

/* synopsis : texte à gauche, photo à droite, même hauteur */
.synopsis-grid {
    display: flex;
    gap: 1.2rem;
    align-items: stretch;
}

.synopsis-grid .synopsis {
    flex: 1 1 auto;
    min-width: 0;
}

.synopsis-main {
    flex: 1 1 auto;
    min-width: 0;
}

.synopsis-photo {
    flex: 0 0 300px;
    align-self: start;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
}

.synopsis-photo img {
    width: 100%;
    height: auto;
    display: block;
}

:root[data-theme="accessible"] .synopsis-photo {
    border: 3px solid #fff;
    border-radius: 0;
}

:root[data-theme="accessible"] .ressources-photo {
    border: 3px solid #fff;
    border-radius: 0;
}

.film-section .tech-grid {
    margin-bottom: 0;
}

:root[data-theme="accessible"] .section-title {
    font-size: 1.5rem;
}

:root[data-theme="accessible"] .section-bar {
    width: 60px;
    height: 5px;
}

/* ---------- Carrousel d'actualités (1 visible, rotation 10 s) ---------- */
/* actus empilées dans la même case : hauteur = la plus haute, aucun saut */
.news-rotator {
    display: grid;
}

.news-rotator .news-article {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.news-rotator .news-article.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
}

.rotator-nav {
    display: flex;
    align-items: center;
    margin-top: 1.2rem;
}

/* espaceur qui équilibre le lien : les pastilles restent centrées */
.rotator-nav::before {
    content: "";
    flex: 1;
}

.rotator-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.rotator-arrow {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.rotator-arrow:hover {
    color: var(--accent);
}

.rotator-all {
    flex: 1;
    text-align: right;
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}

.rotator-all:hover {
    color: var(--accent);
}

.rotator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.rotator-dot:hover {
    border-color: var(--accent);
}

.rotator-dot.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

/* page film : actus trop hautes tronquées + bouton de lecture complète */
.film-section .news-rotator .news-content.is-clipped {
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.film-section .news-rotator .news-content.is-clipped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
}

.news-more {
    margin: 0 1.5rem 1.5rem;
    font-family: "Martian Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    cursor: pointer;
    align-self: flex-start;
}

.news-more:hover {
    background: var(--accent);
    color: var(--bg);
}

.agenda-all, .agenda-back {
    margin-top: 1.5rem;
}

/* fenêtre de lecture complète (page film uniquement) */
.news-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 1rem;
    z-index: 200;
}

.news-modal[hidden] {
    display: none;
}

.news-modal-box {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 3rem 1.5rem 1.5rem;
    width: 100%;
    max-width: 1100px;
    max-height: 85vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.news-modal-x {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: #d64545;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.news-modal-x:hover {
    color: #fff;
    background: #c0392b;
    border-color: #c0392b;
}

/* pastille date ajustée à son texte dans la popup */
.news-modal-box .news-date {
    align-self: flex-start;
}

.news-modal-box .btn {
    align-self: flex-start;
    margin-top: 0.4rem;
}

/* prévisualisation éditeur : moitié de largeur, comme une colonne d'accueil */
.news-modal-box--half {
    max-width: 550px;
}

:root[data-theme="accessible"] .news-modal-box {
    border-width: 2px;
    border-radius: 0;
}

/* ---------- Fenêtre d'ajout d'image (back-office) ---------- */
.img-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    z-index: 200;
}

.img-modal[hidden] {
    display: none;
}

.img-modal-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    width: 100%;
    max-width: 430px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.img-modal-box h3 {
    font-family: "Martian Mono", monospace;
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}

.img-choices {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.img-choices legend {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 0.4rem;
}

.img-status {
    font-size: 0.9rem;
    min-height: 1.2em;
    margin: 0;
    color: var(--muted);
}

.img-status[data-err] {
    color: #c0392b;
}

.img-modal-actions {
    display: flex;
    gap: 0.8rem;
}

/* bibliothèque d'images existantes (comme "Gérer les images") */
.img-lib-box {
    max-width: 640px;
}

.img-lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.6rem;
    max-height: 50vh;
    overflow: auto;
}

.lib-thumb {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.lib-thumb:hover {
    border-color: var(--accent);
}

.lib-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.lib-thumb span {
    font-family: "Martian Mono", monospace;
    font-size: 0.65rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

:root[data-theme="accessible"] .img-modal-box {
    border-width: 2px;
    border-radius: 0;
}

/* ---------- Gestion des images (back-office) ---------- */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.filter-bar .admin-field {
    flex: 1 1 220px;
    margin: 0;
}

.imgs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.img-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.img-card > img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: var(--bg);
}

.img-name {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.img-meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.img-used {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.img-free {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

.img-card form {
    margin-top: auto;
}

:root[data-theme="accessible"] .img-card {
    border-width: 2px;
    border-radius: 0;
}

/* ---------- Menu commun du back-office ---------- */
.admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.admin-menu a {
    font-family: "Martian Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
}

.admin-menu a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-menu a[aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 700;
}

/* ---------- Colonnes Agenda / Festivals (page film) ---------- */
.duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.duo-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.duo-col .section-bar {
    margin-top: 0.6rem;
    margin-bottom: 0;
}

.duo-col > .news-article,
.duo-col > .nice-list,
.duo-col > .news-empty {
    margin-top: 1.8rem;
}

.duo-col > .news-article + .news-article {
    margin-top: 1.5rem;
}

/* listes modernes à puces (agenda, festivals) */
.nice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.nice-list li {
    position: relative;
    padding-left: 1.6rem;
}

.nice-list li::before {
    content: "";
    position: absolute;
    left: 0.1rem;
    top: 0.52em;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--accent);
}

/* titre + texte sous la puce, alignés entre eux */
.nice-text {
    margin-top: 0;
}

.nice-text > :last-child {
    margin-bottom: 0;
}

/* champ d'édition des listes simples */
.admin-field textarea {
    font: inherit;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    width: 100%;
    min-height: 260px;
    resize: vertical;
}

/* ---------- Texte suivi aéré (page Le film) ---------- */
.prose {
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.prose p {
    margin: 0 0 1.2rem 0;
}

.prose p:last-child {
    margin-bottom: 0;
}

:root[data-theme="accessible"] .prose {
    font-size: 1.2rem;
    line-height: 1.9;
    text-align: left;
}

/* photos habillées dans Mise en scène */
.mise-photo {
    width: 345px;
    border-radius: 10px;
    overflow: hidden;
}

.mise-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.mise-left {
    float: left;
    margin: 0.3rem 1.5rem 1rem 0;
}

.mise-right {
    float: right;
    margin: 0.3rem 0 1rem 1.5rem;
}

/* portrait du réalisateur : flottant à gauche, texte habillé avec marge */
.bio::after {
    content: "";
    display: block;
    clear: both;
}

.bio-photo {
    float: left;
    width: 280px;
    margin: 0.3rem 1.5rem 1rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.bio-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Page Ressources : presse, galerie, dossiers ---------- */
.press-poster-float {
    float: right;
    width: 300px;
    max-width: 45%;
    margin: 0 0 1.5rem 2rem;
}

.press-poster-float img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.press-dl-inline .btn {
    display: inline-block;
    margin: 0 1rem 1rem 0;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-note {
    text-align: center;
    color: var(--text);
    font-style: italic;
    margin-top: 1.2rem;
}

.gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ---------- Pour aller plus loin (livres + sites) ---------- */
.plus-h3 {
    font-family: "Martian Mono", monospace;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.6rem 0 1rem 0;
}

.livres-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 2.4rem;
    background-image: linear-gradient(var(--line), var(--line));
    background-size: 1px 100%;
    background-repeat: no-repeat;
    background-position: center top;
}

.livre-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    border-radius: 10px;
    padding: 0.6rem;
    transition: background-color 0.2s ease;
}

.livre-row:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

:root[data-theme="sombre"] .livre-row:hover,
:root[data-theme="accessible"] .livre-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.livre-cover {
    flex: 0 0 100px;
}

.livre-cover img {
    width: 100px;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.livre-ref {
    flex: 1 1 auto;
    min-width: 0;
}

.livre-ref p {
    margin: 0 0 0.4rem 0;
}

.livre-note {
    font-style: italic;
    color: var(--muted);
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.site-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
}

.site-card:hover {
    border-color: var(--accent);
}

.site-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--line);
    filter: brightness(0.72);
    transition: filter 0.25s ease;
}

.site-card:hover img {
    filter: brightness(1);
}

.site-card .site-name {
    display: block;
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
}

.site-card--text {
    justify-content: center;
    text-align: center;
    padding: 1rem 0.8rem;
}

/* Section « Au-delà des frontières » : bandeau de 4 images sur une ligne */
.trad-strip-fig {
    margin: 1.5rem 0;
}

.trad-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.trad-strip a {
    display: block;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.trad-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trad-strip-fig figcaption {
    text-align: center;
    font-style: italic;
    margin-top: 0.6rem;
    color: var(--text);
}

/* carrousel : fondu au noir entre deux images */
.gal-slot {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.gal-slot img {
    transition: opacity 1.5s ease;
}

.gal-slot img.is-out {
    opacity: 0;
}

.peda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.peda-imgs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.peda-imgs figure {
    margin: 0;
}

.peda-imgs img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.peda-dl {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.peda-dl p {
    color: var(--text);
}

a.zoom {
    cursor: zoom-in;
    display: block;
}

a.zoom:hover img {
    filter: brightness(1.05);
}

/* carte des camps en fin de page Ressources */
.map-fig {
    margin: 3.5rem 0 0;
}

.map-fig img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.map-fig figcaption,
.peda-imgs figcaption {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.6rem;
}

/* ---------- Visionneuse d'image ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-fig {
    margin: 0;
    max-width: min(92vw, 1100px);
    text-align: center;
}

.lightbox-fig img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.lightbox-fig figcaption {
    color: #fff;
    font-size: 0.9rem;
    margin-top: 0.7rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* ---------- Formulaire de contact ---------- */
.contact-card {
    background: #ededf0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

:root[data-theme="sombre"] .contact-card,
:root[data-theme="accessible"] .contact-card {
    background: var(--surface);
}

.contact-card .field {
    max-width: 680px;
}

.contact-card .field-wide {
    max-width: none;
}

/* lignes 50/50 du formulaire */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
    margin-bottom: 1.1rem;
}

.form-row .field {
    margin-bottom: 0;
    min-width: 0;
}

.form-row .admin-field input {
    width: 100%;
}

.form-note {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0 0 1rem 0;
}

.acces-form {
    padding: 0 1.2rem 1.2rem;
}

/* captcha arithmétique à côté du bouton */
.captcha-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.captcha-row .field {
    margin-bottom: 0;
    flex: 0 1 280px;
}

.captcha-row .btn {
    margin: 0;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.field > span:first-child,
.field > label {
    font-family: "Martian Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.field > label em {
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
    font-style: italic;
}

.field-help {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    width: 100%;
}

.field textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

/* menu déroulant habillé (fini l'aspect système) */
.select-wrap {
    position: relative;
    display: block;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.65rem 2.5rem 0.65rem 0.8rem;
    width: 100%;
    cursor: pointer;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.field input:focus-visible,
.field textarea:focus-visible,
.select-wrap select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--accent);
}

/* pot de miel anti-robots : invisible */
.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    margin: 0;
}

.contact-card .msg {
    margin-bottom: 1.1rem;
}

:root[data-theme="accessible"] .contact-card {
    border-width: 2px;
    border-radius: 0;
}

/* ---------- Statistiques (back-office) ---------- */
.stat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.stat-tabs a {
    font-family: "Martian Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 1rem;
}

.stat-tabs a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.stat-tabs a[aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 700;
}

.page-subtitle {
    font-family: "Martian Mono", monospace;
    font-size: 1.02rem;
    color: var(--text);
    margin: 2.2rem 0 1rem 0;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-num {
    font-family: "Martian Mono", monospace;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.88rem;
    color: var(--muted);
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.45rem;
}

.bar-label {
    flex: 0 0 170px;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    flex: 1;
    height: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    min-width: 0;
}

.bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}

.bar-count {
    flex: 0 0 64px;
    text-align: right;
    font-family: "Martian Mono", monospace;
    font-size: 0.82rem;
}

table.stat-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

table.stat-table th,
table.stat-table td {
    text-align: left;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--line);
}

table.stat-table th {
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

table.stat-table td:last-child,
table.stat-table th:last-child {
    text-align: right;
    font-family: "Martian Mono", monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ---------- Pie charts (navigateurs / appareils / langues) ---------- */
.pie-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    margin: 0 0 1rem 0;
}

.pie {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
}

.pie-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    min-width: min(100%, 260px);
    flex: 1;
}

.pie-legend li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.pie-dot {
    flex: 0 0 auto;
    width: 0.8em;
    height: 0.8em;
    border-radius: 50%;
    transform: translateY(1px);
}

.pie-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pie-val {
    margin-left: auto;
    font-family: "Martian Mono", monospace;
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    padding-left: 1rem;
}

/* ---------- Graphique « Visites par heure » (X = heure, Y = visites) ---------- */
.hour-chart {
    margin-bottom: 0.5rem;
}

.hour-body {
    display: flex;
    gap: 0.5rem;
}

.hour-y {
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    font-family: "Martian Mono", monospace;
    font-size: 0.75rem;
    color: var(--muted);
    /* Aligne les étiquettes Y sur la zone des barres (hors étiquettes X). */
    padding-bottom: 1.5rem;
}

.hour-plot {
    position: relative;
    flex: 1;
    min-width: 0;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-left: 0.4rem;
}

.hour-grid {
    position: absolute;
    inset: 0 0 1.5rem 0.4rem;
    pointer-events: none;
}

.hg-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
    opacity: 0.7;
}

.hour-bars {
    position: relative;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 4px;
    height: 220px;
    align-items: stretch;
    padding-top: 0.4rem;
}

.hg-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hg-bar-cell {
    flex: 1;
    display: flex;
    align-items: flex-end;
    min-height: 0;
}

.hg-bar {
    display: block;
    width: 100%;
    min-height: 2px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

.hg-x {
    flex: 0 0 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: "Martian Mono", monospace;
    font-size: 0.68rem;
    color: var(--muted);
    padding-top: 0.25rem;
    white-space: nowrap;
}

.hour-caption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.4rem 0 0 52px;
    font-size: 0.78rem;
    color: var(--muted);
}

/* Place manque : n'afficher les heures qu'une fois sur deux... */
@media (max-width: 720px) {
    .hour-bars {
        gap: 3px;
    }
    .hg-col:nth-child(odd) .hg-x {
        visibility: hidden;
    }
    .pie {
        width: 130px;
        height: 130px;
    }
}

/* ... puis une fois sur trois sur très petit écran. */
@media (max-width: 460px) {
    .site-grid {
        grid-template-columns: 1fr;
    }
    .livres-list {
        grid-template-columns: 1fr;
        background-image: none;
    }
    .hour-bars {
        gap: 2px;
        height: 180px;
    }
    .hg-col .hg-x {
        visibility: hidden;
    }
    .hg-col:nth-child(3n+1) .hg-x {
        visibility: visible;
    }
    .hg-x {
        font-size: 0.62rem;
    }
}

:root[data-theme="accessible"] .stat-card {
    border-width: 2px;
    border-radius: 0;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.6rem 1.2rem 2.2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

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

.site-footer a:hover {
    color: var(--accent);
}

/* ---------- Page mentions légales ---------- */
.legal h2 {
    font-family: "Martian Mono", monospace;
    font-size: 1.02rem;
    color: var(--text);
    margin: 2rem 0 0.6rem 0;
}

.legal p {
    margin: 0 0 0.9rem 0;
    max-width: 75ch;
}

.legal ul {
    margin: 0 0 0.9rem 1.4rem;
    max-width: 75ch;
}

.legal li {
    margin-bottom: 0.3rem;
}

.legal a {
    color: var(--accent);
    text-underline-offset: 3px;
}

:root[data-theme="accessible"] .site-footer {
    border-top-width: 3px;
    font-size: 1.05rem;
}

/* focus visible global */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .nav-burger {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        display: none;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    }

    :root[data-theme="sombre"] .main-nav,
    :root[data-theme="accessible"] .main-nav {
        box-shadow: none;
    }

    .nav-toggle:checked ~ .main-nav {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.2rem 1rem;
    }

    .main-nav a {
        display: block;
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--line);
    }

    .main-nav li:last-child a {
        border-bottom: 0;
    }

    .header-inner {
        position: relative;
    }

    .brand-maria {
        font-size: 1.4rem;
    }

    .container {
        padding-top: 1.8rem;
    }

    .tech-card {
        flex-basis: 100%;
    }

    .synopsis-grid {
        flex-direction: column;
    }

    .synopsis-photo {
        flex: none;
    }

    .bio-photo {
        float: none;
        width: 100%;
        max-width: 340px;
        margin: 0 0 1.2rem 0;
    }

    .mise-photo {
        float: none;
        width: 100%;
        max-width: 340px;
        margin: 0 0 1.2rem 0;
    }

    .film-poster-float {
        float: none;
        width: 100%;
        max-width: 420px;
        margin: 0 0 1.5rem 0;
    }

    .duo {
        grid-template-columns: 1fr;
    }

    .peda-grid {
        grid-template-columns: 1fr;
    }

    .press-poster-float {
        float: none;
        width: 100%;
        max-width: 420px;
        margin: 0 0 1.5rem 0;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .livre-cover {
        flex-basis: 80px;
    }

    .livre-cover img {
        width: 80px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-meta {
        grid-template-columns: 1fr;
    }

    /* back-office : pas de menu burger, lien retour toujours visible */
    .main-nav.main-nav--static {
        display: block;
        position: static;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .main-nav--static ul {
        flex-direction: row;
        padding: 0;
    }

    .main-nav--static a {
        border-bottom: 0;
        padding: 0.4rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tech-card {
        transition: none;
    }

    .news-rotator .news-article,
    .news-rotator .news-article.is-active {
        transition: none;
    }
}
