* {
    box-sizing: border-box;
}

:root {
    /* Palette The 100 : acier, ardoise, vert radioactif / mousse, accents tactiques */
    --bg: #0c0f12;
    --bg-soft: rgba(17, 22, 26, 0.94);
    --panel-dark: rgba(20, 27, 31, 0.95);
    --panel-dark-2: rgba(27, 36, 42, 0.95);
    --line: rgba(74, 114, 110, 0.28);
    --text: #d6e2e0;
    --muted: #829596;
    --gold: #4da394; /* Accent principal : cyan terne / tactique */
    --gold-soft: #2e695f;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1860px;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top, rgba(38, 77, 72, 0.18), transparent 40%),
        linear-gradient(rgba(10, 14, 16, 0.82), rgba(8, 11, 13, 0.94)),
        url('https://images.unsplash.com/photo-1511497584788-87676104235f?auto=format&fit=crop&w=1600&q=80') center/cover fixed no-repeat;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   BANNIÈRE
   ========================================================= */

.site-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0f1418;
    border-bottom: 1px solid var(--line);
}

.site-header-media {
    position: relative;
    width: 100%;
    background: #0f1418;
    isolation: isolate;
}

.site-header-banner {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    background: #0f1418;
}

.header-mist,
.header-sparkles,
.header-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.header-mist {
    z-index: 2;
    opacity: 0.25;
    mix-blend-mode: screen;
}

.mist-back {
    background:
        radial-gradient(circle at 12% 78%, rgba(94, 148, 140, 0.20), transparent 22%),
        radial-gradient(circle at 34% 72%, rgba(68, 112, 106, 0.16), transparent 26%),
        radial-gradient(circle at 68% 70%, rgba(92, 140, 133, 0.14), transparent 24%),
        radial-gradient(circle at 88% 76%, rgba(94, 148, 140, 0.12), transparent 20%);
    filter: blur(14px);
    animation: mistDriftBack 24s linear infinite alternate;
}

.mist-front {
    background:
        radial-gradient(circle at 16% 88%, rgba(110, 170, 160, 0.18), transparent 20%),
        radial-gradient(circle at 50% 86%, rgba(90, 150, 140, 0.14), transparent 24%),
        radial-gradient(circle at 82% 88%, rgba(80, 140, 130, 0.16), transparent 18%);
    filter: blur(22px);
    opacity: 0.20;
    animation: mistDriftFront 32s ease-in-out infinite alternate;
}

.header-sparkles {
    z-index: 3;
    overflow: hidden;
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(140, 230, 210, 0.95) 0%, rgba(77, 163, 148, 0.55) 48%, rgba(77, 163, 148, 0) 74%);
    box-shadow: 0 0 10px rgba(90, 200, 180, 0.35);
    opacity: 0;
    animation: sparkleFloat 9s ease-in-out infinite;
}

.spark::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(140, 230, 210, 0.25), transparent 70%);
}

.s1  { left: 8%;  top: 62%; animation-delay: 0.2s; animation-duration: 8.5s; }
.s2  { left: 14%; top: 30%; animation-delay: 1s; animation-duration: 10s; }
.s3  { left: 22%; top: 72%; animation-delay: 1.8s; animation-duration: 11s; }
.s4  { left: 31%; top: 44%; animation-delay: 2.4s; animation-duration: 9.2s; }
.s5  { left: 43%; top: 68%; animation-delay: 0.8s; animation-duration: 10.8s; }
.s6  { left: 55%; top: 35%; animation-delay: 3.1s; animation-duration: 8.9s; }
.s7  { left: 63%; top: 76%; animation-delay: 2.1s; animation-duration: 10.6s; }
.s8  { left: 72%; top: 28%; animation-delay: 0.4s; animation-duration: 9.8s; }
.s9  { left: 79%; top: 58%; animation-delay: 2.8s; animation-duration: 11.6s; }
.s10 { left: 86%; top: 34%; animation-delay: 1.4s; animation-duration: 9.4s; }
.s11 { left: 91%; top: 70%; animation-delay: 3.6s; animation-duration: 12.2s; }
.s12 { left: 49%; top: 22%; animation-delay: 4.2s; animation-duration: 8.7s; }

.header-overlay {
    z-index: 4;
    background:
        linear-gradient(180deg, rgba(12, 15, 18, 0.04), rgba(12, 15, 18, 0.35)),
        radial-gradient(circle at center, transparent 55%, rgba(0,0,0,0.45) 100%);
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(180deg, transparent, rgba(12, 15, 18, 0.65));
    pointer-events: none;
}

.header-inner {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 8px;
    width: min(100%, var(--maxw));
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: end;
}

.site-brand {
    display: inline-block;
    max-width: 620px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(18, 25, 29, 0.65);
    border: 1px solid rgba(74, 114, 110, 0.28);
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.site-brand h1 {
    margin: 0 0 4px;
    font-size: clamp(1.45rem, 2.5vw, 2.15rem);
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e4eeeb;
}

.site-brand p {
    margin: 0;
    font-size: 0.92rem;
    color: #9cb1ae;
}

/* =========================================================
   NAVIGATION / WRAPPER
   ========================================================= */

.main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    backdrop-filter: blur(12px);
    background: rgba(13, 17, 20, 0.92);
    border-bottom: 1px solid var(--line);
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
    min-height: 52px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(77, 163, 148, 0.16);
    border-color: rgba(77, 163, 148, 0.55);
    color: #bbf0e6;
    box-shadow: 0 0 14px rgba(77, 163, 148, 0.2);
}

.page-wrap {
    flex: 1;
    width: min(100%, var(--maxw));
    margin: 0 auto;
    padding: 24px 24px 40px;
}

/* =========================================================
   BLOCS GÉNÉRAUX
   ========================================================= */

.home-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.panel,
.role-card,
.map-details,
.map-board,
.admin-entry-box {
    background: var(--panel-dark);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel {
    padding: 20px;
}

.panel h2,
.page-heading h2 {
    margin-top: 0;
    color: #e2eeeb;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 1.25rem;
}

.info-card,
.announcement-card,
.rule-item,
.note-box {
    background: var(--panel-dark-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.announcement-card h3,
.info-card h3,
.role-card h3,
.map-details h3 {
    margin-top: 0;
    color: #c9e6e0;
}

.rich-text,
.panel p,
.role-card p,
.map-details p,
.note-box {
    line-height: 1.7;
    color: var(--text);
}

.empty-state {
    opacity: 0.95;
}

.site-footer {
    text-align: center;
    padding: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: rgba(11, 15, 18, 0.96);
}

/* =========================================================
   GAZETTE / ACCUEIL
   ========================================================= */

.news-hero {
    margin-bottom: 18px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    min-height: auto;
    position: relative;
}

.news-hero-paper {
    background: linear-gradient(180deg, rgba(29, 39, 44, 0.95), rgba(20, 27, 31, 0.95));
    border: 1px solid var(--line);
}

.news-hero-paper::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(77, 163, 148, 0.03) 0px,
            rgba(77, 163, 148, 0.03) 1px,
            transparent 1px,
            transparent 5px
        );
    opacity: 0.5;
    pointer-events: none;
}

.news-hero-inner {
    position: relative;
    z-index: 1;
    padding: 30px 24px;
    max-width: 900px;
}

.news-kicker {
    display: inline-block;
    padding: 7px 14px;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid rgba(77, 163, 148, 0.35);
    background: rgba(77, 163, 148, 0.12);
    color: #6ed0bf;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.victorian-masthead-wrap {
    display: inline-block;
    margin: 4px 0 14px;
    padding: 16px 20px 14px;
    border-radius: 12px;
    background: rgba(14, 20, 23, 0.65);
    border: 1px solid rgba(74, 114, 110, 0.35);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 12px 28px rgba(0,0,0,0.25);
}

.victorian-masthead {
    font-size: clamp(2.1rem, 4.8vw, 4.3rem);
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d8ece8;
    font-weight: 800;
}

.victorian-subline {
    margin-top: 8px;
    color: #8fa7a4;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.news-hero-paper p {
    margin: 0;
    max-width: 720px;
    line-height: 1.8;
    color: #cad8d6;
    font-size: 1.02rem;
}

.newspaper-layout {
    grid-template-columns: 320px minmax(0, 1fr) 340px;
}

.newspaper-column {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(22, 30, 35, 0.96), rgba(16, 21, 25, 0.98));
}

.paper-card,
.paper-panel,
.paper-rule {
    position: relative;
}

.panel-ornament {
    height: 8px;
    margin: -20px -20px 18px;
    background:
        linear-gradient(90deg, transparent, rgba(77, 163, 148, 0.8), transparent),
        linear-gradient(180deg, rgba(77, 163, 148, 0.15), rgba(77, 163, 148, 0.02));
    border-bottom: 1px solid rgba(74, 114, 110, 0.35);
}

.section-intro {
    color: #92a8a5;
    font-style: italic;
    margin-top: -4px;
    margin-bottom: 18px;
}

.journal-title-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 114, 110, 0.25);
}

.journal-edition {
    color: #55b6a5;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.journal-stamp {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(77, 163, 148, 0.35);
    color: #92ded2;
    background: rgba(77, 163, 148, 0.12);
    white-space: nowrap;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
}

.journal-card,
.journal-rule,
.journal-feature,
.journal-article,
.frontpage-feature {
    padding: 26px 28px !important;
}

.journal-card,
.journal-rule {
    background: linear-gradient(180deg, rgba(25, 34, 40, 0.90), rgba(18, 25, 29, 0.96));
    border: 1px solid rgba(74, 114, 110, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* =========================================================
   ANNONCES HOMOGÈNES
   ========================================================= */

.frontpage-feature,
.announcement-card.journal-article {
    background: linear-gradient(180deg, rgba(27, 37, 43, 0.92), rgba(19, 26, 31, 0.97));
    border: 1px solid rgba(74, 114, 110, 0.25);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 10px 24px rgba(0,0,0,0.35);
    color: var(--text);
}

.feature-frame {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(74, 114, 110, 0.14);
    border-radius: 8px;
    pointer-events: none;
}

.mini-ornament {
    width: 58px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(77, 163, 148, 0.1), rgba(77, 163, 148, 0.95), rgba(77, 163, 148, 0.1));
}

.announcement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.80rem;
    border-radius: 4px;
    border: 1px solid rgba(74, 114, 110, 0.35);
    background: rgba(77, 163, 148, 0.12);
    color: #9fe2d6;
    letter-spacing: 0.04em;
}

.badge-gold {
    background: rgba(77, 163, 148, 0.24);
    border-color: rgba(94, 196, 178, 0.5);
    color: #c9fff6;
}

.date,
.announcement-date,
.frontpage-label {
    color: #8da4a1;
}

.frontpage-label {
    margin-bottom: 12px;
    font-size: 1.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d1ece6;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(74, 114, 110, 0.3);
}

/* =========================================================
   UNE ET ANNONCES : MÊME STRUCTURE
   ========================================================= */

.frontpage-feature h3,
.secondary-feature h3,
.announcement-card.journal-article h3 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 2.3vw, 2.1rem);
    line-height: 1.15;
    color: #e5f3f0;
    position: relative;
    z-index: 1;
}

.secondary-feature h3 {
    font-size: clamp(1.28rem, 2vw, 1.7rem);
    margin-bottom: 12px;
}

.frontpage-grid {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.frontpage-visual {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(74, 114, 110, 0.28);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    background:
        linear-gradient(180deg, rgba(34, 46, 53, 0.7), rgba(20, 27, 32, 0.7));
    padding: 8px;
}

.frontpage-visual img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center top;
    background: transparent;
    filter: saturate(0.85) contrast(1.08);
}

.frontpage-content {
    color: var(--text);
    line-height: 1.85;
    text-align: justify;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    column-count: 1;
    column-gap: 0;
    overflow-wrap: break-word;
    word-break: normal;
}

.frontpage-content,
.frontpage-content p,
.frontpage-content div,
.frontpage-content span {
    color: var(--text);
    text-shadow: none;
}

.frontpage-content::before {
    display: none;
}

.frontpage-content.dropcap-text::first-letter {
    float: left;
    font-size: 3.8em;
    line-height: 0.8;
    padding-right: 10px;
    padding-top: 4px;
    font-weight: 800;
    color: #4da394;
    text-shadow: none;
}

/* =========================================================
   RICH TEXT ANNONCES / ÉDITEUR
   ========================================================= */

.rich-text,
.frontpage-content,
.announcement-content,
.rule-content,
.mc-modal-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.rich-text p,
.frontpage-content p,
.announcement-content p {
    margin: 0 0 1em;
}

.rich-text p:last-child,
.frontpage-content p:last-child,
.announcement-content p:last-child {
    margin-bottom: 0;
}

.rich-text strong,
.rich-text b,
.frontpage-content strong,
.frontpage-content b,
.announcement-content strong,
.announcement-content b {
    font-weight: 700;
    color: #f1f9f7;
}

.rich-text em,
.rich-text i,
.frontpage-content em,
.frontpage-content i,
.announcement-content em,
.announcement-content i {
    font-style: italic;
}

.rich-text u,
.frontpage-content u,
.announcement-content u {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.rich-text a,
.frontpage-content a,
.announcement-content a,
.rule-content a,
.mc-modal-body a {
    color: #5dc3b1 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    word-break: break-word;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.rich-text a:hover,
.frontpage-content a:hover,
.announcement-content a:hover,
.rule-content a:hover,
.mc-modal-body a:hover {
    color: #a4f2e4 !important;
    opacity: 1;
}

.rich-text ul,
.rich-text ol,
.frontpage-content ul,
.frontpage-content ol,
.announcement-content ul,
.announcement-content ol {
    margin: 0 0 1.1em 1.45em;
    padding-left: 0.4em;
    line-height: 1.8;
}

.rich-text li,
.frontpage-content li,
.announcement-content li {
    margin: 0 0 0.38em;
}

.rich-text li:last-child,
.frontpage-content li:last-child,
.announcement-content li:last-child {
    margin-bottom: 0;
}

.rich-text blockquote,
.frontpage-content blockquote,
.announcement-content blockquote {
    margin: 1.15em 0;
    padding: 14px 16px 14px 18px;
    border-left: 3px solid rgba(77, 163, 148, 0.65);
    background: rgba(30, 44, 48, 0.35);
    border-radius: 0 8px 8px 0;
    color: #bdd5d1;
    font-style: italic;
    box-shadow: inset 0 0 0 1px rgba(74, 114, 110, 0.15);
}

.rich-text blockquote p:last-child,
.frontpage-content blockquote p:last-child,
.announcement-content blockquote p:last-child {
    margin-bottom: 0;
}

.rich-text h2,
.rich-text h3,
.rich-text h4,
.frontpage-content h2,
.frontpage-content h3,
.frontpage-content h4,
.announcement-content h2,
.announcement-content h3,
.announcement-content h4 {
    margin: 1.1em 0 0.55em;
    line-height: 1.22;
    color: #e5f3f0;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: left;
    break-inside: avoid;
}

.rich-text h2,
.frontpage-content h2,
.announcement-content h2 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(74, 114, 110, 0.28);
}

.rich-text h3,
.frontpage-content h3,
.announcement-content h3 {
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
}

.rich-text h4,
.frontpage-content h4,
.announcement-content h4 {
    font-size: clamp(1.05rem, 1.3vw, 1.18rem);
    color: #c0ded8;
}

.rich-text br + br,
.frontpage-content br + br,
.announcement-content br + br {
    content: "";
    display: block;
    margin-top: 0.4em;
}

.frontpage-content > *:first-child,
.announcement-content > *:first-child,
.rich-text > *:first-child {
    margin-top: 0 !important;
}

.frontpage-content > *:last-child,
.announcement-content > *:last-child,
.rich-text > *:last-child {
    margin-bottom: 0 !important;
}

/* =========================================================
   ANNONCES SECONDAIRES
   ========================================================= */

.secondary-announcements {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 18px;
}

.announcement-footer {
    clear: both;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(74, 114, 110, 0.18);
    color: var(--muted);
    font-size: 0.90rem;
}

/* =========================================================
   LISTE JOUEURS
   ========================================================= */

.connected-players-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.connected-players-list li + li {
    margin-top: 4px;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination-wrap {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(74, 114, 110, 0.28);
    background: rgba(77, 163, 148, 0.08);
    color: #c9e2de;
    transition: 0.2s ease;
}

.pagination-link:hover,
.pagination-page:hover {
    background: rgba(77, 163, 148, 0.18);
    border-color: rgba(77, 163, 148, 0.45);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-page.is-active {
    background: rgba(77, 163, 148, 0.26);
    color: #e5f7f4;
    border-color: rgba(94, 196, 178, 0.55);
}

.pagination-link.is-disabled {
    opacity: 0.40;
    pointer-events: none;
}

/* =========================================================
   RÈGLES
   ========================================================= */

.rule-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    color: #d1ece6;
    border: 0;
    font: inherit;
    font-size: 1.03rem;
    cursor: pointer;
    padding: 0;
    font-weight: bold;
    letter-spacing: 0.01em;
}

.rule-body {
    display: none;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.rule-body.is-open {
    display: block;
}

.rule-item.journal-rule {
    padding-top: 16px;
}

.rule-item.journal-rule::before {
    content: "◈";
    position: absolute;
    top: 10px;
    right: 14px;
    color: rgba(77, 163, 148, 0.75);
    font-size: 1rem;
}

/* =========================================================
   AUTRES PAGES EXISTANTES
   ========================================================= */

.single-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-heading,
.admin-entry-box {
    padding: 22px;
}

.map-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}

.map-board {
    position: relative;
    overflow: hidden;
    min-height: 480px;
}

.map-image,
.map-details img,
.role-card img {
    display: block;
    width: 100%;
    height: auto;
}

.map-point {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(130, 230, 210, 0.7);
    background: rgba(77, 163, 148, 0.88);
    color: #0c1214;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(77, 163, 148, 0.5);
}

.map-details {
    padding: 18px;
}

.map-details img {
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.role-card {
    overflow: hidden;
}

.role-card img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}

.role-card-body {
    padding: 16px;
}

.button-primary {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4da394, #275f56);
    color: #ffffff;
    font-weight: bold;
    border: 1px solid rgba(130, 230, 210, 0.4);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1150px) {
    .home-grid,
    .newspaper-layout {
        grid-template-columns: 1fr;
    }

    .map-layout {
        grid-template-columns: 1fr;
    }

    .panel-left,
    .panel-center,
    .panel-right {
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
    }
}

@media (max-width: 980px) {
    .header-inner {
        padding: 0 14px;
        bottom: 6px;
    }

    .site-brand {
        max-width: 82%;
    }

    .frontpage-grid {
        grid-template-columns: 1fr;
    }

    .frontpage-visual {
        max-width: 100%;
    }

    .frontpage-visual img {
        height: 300px;
    }
}

@media (max-width: 700px) {
    .main-nav {
        justify-content: flex-start;
    }

    .main-nav a {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }

    .page-wrap {
        padding: 16px 12px 28px;
    }

    .panel,
    .page-heading,
    .admin-entry-box,
    .map-details {
        padding: 16px;
    }

    .map-board {
        min-height: 260px;
    }

    .site-header::after {
        height: 18px;
    }

    .header-inner {
        position: relative;
        bottom: auto;
        padding: 8px 10px 10px;
        display: block;
        background: rgba(14, 20, 23, 0.7);
        border-top: 1px solid rgba(74, 114, 110, 0.15);
    }

    .site-brand {
        width: 100%;
        max-width: 100%;
        padding: 10px 12px;
        background: rgba(18, 25, 29, 0.4);
    }

    .site-brand h1 {
        font-size: 1.18rem;
    }

    .site-brand p {
        font-size: 0.84rem;
    }

    .news-hero-inner {
        padding: 20px 16px;
    }

    .journal-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .victorian-masthead-wrap {
        width: 100%;
        padding: 14px 14px 12px;
    }

    .victorian-subline {
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

    .frontpage-content.dropcap-text::first-letter {
        font-size: 3.4em;
        padding-right: 8px;
        padding-top: 4px;
    }

    .frontpage-visual img {
        height: auto;
        max-height: 260px;
    }

    .pagination-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-pages {
        justify-content: center;
    }

    .frontpage-content ul,
    .frontpage-content ol,
    .announcement-content ul,
    .announcement-content ol,
    .rich-text ul,
    .rich-text ol {
        margin-left: 1.15em;
    }

    .frontpage-content blockquote,
    .announcement-content blockquote,
    .rich-text blockquote {
        padding: 12px 12px 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-mist,
    .spark {
        animation: none !important;
    }
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes mistDriftBack {
    0% {
        transform: translate3d(-1.2%, 0, 0) scale(1);
        opacity: 0.18;
    }
    50% {
        opacity: 0.28;
    }
    100% {
        transform: translate3d(1.8%, -1.2%, 0) scale(1.03);
        opacity: 0.22;
    }
}

@keyframes mistDriftFront {
    0% {
        transform: translate3d(2.2%, 0, 0) scale(1);
        opacity: 0.12;
    }
    50% {
        opacity: 0.20;
    }
    100% {
        transform: translate3d(-2.8%, -1.5%, 0) scale(1.04);
        opacity: 0.15;
    }
}

@keyframes sparkleFloat {
    0% {
        transform: translate3d(0, 8px, 0) scale(0.75);
        opacity: 0;
    }
    12% {
        opacity: 0.30;
    }
    50% {
        transform: translate3d(10px, -18px, 0) scale(1);
        opacity: 0.55;
    }
    88% {
        opacity: 0.18;
    }
    100% {
        transform: translate3d(18px, -34px, 0) scale(0.82);
        opacity: 0;
    }
}

/* =========================================================
   Effet papier / panneau technologique terne
   ========================================================= */

.frontpage-feature,
.secondary-feature,
.announcement-card.journal-article {
    position: relative !important;
    overflow: hidden !important;
    background:
        linear-gradient(180deg, rgba(34, 48, 54, 0.15), rgba(18, 26, 30, 0.15)),
        linear-gradient(180deg, rgba(25, 36, 41, 0.96), rgba(18, 25, 29, 0.98)) !important;
    border: 1px solid rgba(74, 114, 110, 0.25) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.025),
        inset 0 18px 30px rgba(77, 163, 148, 0.03),
        inset 0 -18px 28px rgba(0, 0, 0, 0.25),
        inset 0 0 32px rgba(0, 0, 0, 0.2),
        0 12px 28px rgba(0,0,0,0.35) !important;
}

.frontpage-feature::before,
.secondary-feature::before,
.announcement-card.journal-article::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    opacity: 0.20 !important;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(180, 220, 215, 0.035) 0px,
            rgba(180, 220, 215, 0.035) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(180, 220, 215, 0.02) 0px,
            rgba(180, 220, 215, 0.02) 1px,
            transparent 1px,
            transparent 6px
        ),
        radial-gradient(circle at 20% 15%, rgba(77, 163, 148, 0.06), transparent 28%),
        radial-gradient(circle at 85% 70%, rgba(77, 163, 148, 0.05), transparent 24%) !important;
}

.frontpage-feature::after,
.secondary-feature::after,
.announcement-card.journal-article::after {
    content: "" !important;
    position: absolute !important;
    inset: 10px !important;
    border-radius: 8px !important;
    pointer-events: none !important;
    z-index: 0 !important;
    border: 1px solid rgba(74, 114, 110, 0.12) !important;
    box-shadow:
        inset 0 0 18px rgba(77, 163, 148, 0.025),
        inset 0 0 40px rgba(0,0,0,0.15) !important;
}

.frontpage-feature > *,
.secondary-feature > *,
.announcement-card.journal-article > * {
    position: relative !important;
    z-index: 1 !important;
}

.frontpage-feature h3,
.secondary-feature h3,
.announcement-card.journal-article h3 {
    color: #e5f3f0 !important;
}

.frontpage-content,
.frontpage-content p,
.frontpage-content div,
.frontpage-content span,
.announcement-content,
.announcement-content p,
.announcement-content div,
.announcement-content span {
    color: #c9ded9 !important;
}

.frontpage-content.dropcap-text::first-letter,
.announcement-content.dropcap-text::first-letter {
    color: #4da394 !important;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.04),
        0 0 10px rgba(77, 163, 148, 0.25) !important;
}

.frontpage-visual {
    background:
        linear-gradient(180deg, rgba(38, 52, 59, 0.72), rgba(19, 27, 31, 0.72)) !important;
    border: 1px solid rgba(74, 114, 110, 0.3) !important;
    box-shadow:
        0 8px 18px rgba(0,0,0,0.25),
        inset 0 0 0 1px rgba(255,255,255,0.02) !important;
}

.frontpage-flow::after {
    content: "";
    display: block;
    clear: both;
}

.frontpage-floatbox {
    float: left !important;
    width: 380px !important;
    max-width: 42% !important;
    margin: 6px 22px 12px 0 !important;
}

.frontpage-floatbox img {
    display: block !important;
    width: 100% !important;
    height: 280px !important;
    object-fit: contain !important;
    object-position: center top !important;
}

@media (max-width: 700px) {
    .frontpage-floatbox {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 14px 0 !important;
    }

    .frontpage-floatbox img {
        height: auto !important;
        max-height: 260px !important;
    }
}

/* =========================================================
   ALIGNEMENT : titre + badges + label
   ========================================================= */

.frontpage-feature {
    padding-top: 26px !important;
}

.frontpage-label {
    display: block;
    margin: 12px 0 14px 0 !important;
    padding: 6px 0 8px 0;
    font-size: 1.85rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-transform: uppercase;
    color: #e5f3f0;
    border-top: 1px solid rgba(74, 114, 110, 0.3);
    border-bottom: 1px solid rgba(74, 114, 110, 0.3);
    text-align: left;
}

.frontpage-feature .announcement-meta {
    margin-top: 8px;
    margin-bottom: 14px;
    align-items: center;
}

.frontpage-feature h3 {
    margin-top: 4px;
    margin-bottom: 18px;
    line-height: 1.2;
}

.frontpage-feature > * {
    padding-left: 4px;
    padding-right: 4px;
}

.feature-frame {
    border-top: none !important;
    inset: 12px 10px 10px 10px !important;
}

/* =========================================================
   PERSONNAGES - ANCIEN FORMAT CARTES
   ========================================================= */

.personnages-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.personnage-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(27, 36, 42, 0.94), rgba(18, 25, 29, 0.98));
    border: 1px solid rgba(74, 114, 110, 0.22);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 10px 24px rgba(0,0,0,0.25);
}

.personnage-body {
    padding: 16px 18px 18px;
}

.personnage-body h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #e4f2ef;
}

.personnage-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    color: #a3bfbc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.personnage-meta strong {
    color: #d1ece6;
}

.personnage-text {
    color: var(--text);
    line-height: 1.8;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 1280px) {
    .personnages-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .personnages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .personnages-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PERSONNAGES - TABLEAU PUBLIC
   ========================================================= */

.personnages-tableau {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(74, 114, 110, 0.35);
    border-left: 1px solid rgba(74, 114, 110, 0.35);
    margin-top: 20px;
    background:
        linear-gradient(180deg, rgba(32, 45, 52, 0.22), rgba(19, 27, 31, 0.22)),
        rgba(15, 21, 24, 0.65);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 12px 26px rgba(0,0,0,0.25);
    align-items: stretch;
}

.personnage-cell {
    border-right: 1px solid rgba(74, 114, 110, 0.35);
    border-bottom: 1px solid rgba(74, 114, 110, 0.35);
    background: linear-gradient(180deg, rgba(32, 45, 52, 0.15), rgba(19, 27, 31, 0.22));
    height: 100%;
}

.personnage-cell-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px 16px 20px;
}

.personnage-photo-frame {
    width: 100%;
    margin-bottom: 16px;
    padding: 10px;
    border: 1px solid rgba(74, 114, 110, 0.22);
    background:
        linear-gradient(180deg, rgba(20, 27, 31, 0.85), rgba(12, 17, 20, 0.95));
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 8px 20px rgba(0,0,0,0.25);
}

.personnage-photo-frame .personnage-image-wrap {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(38, 55, 62, 0.35), rgba(12, 17, 20, 0.75));
    border: 1px solid rgba(74, 114, 110, 0.25);
    overflow: hidden;
    position: relative;
    text-align: center;
    margin-bottom: 0;
    padding: 0;
}

.personnage-photo-frame .personnage-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.personnage-photo-frame .personnage-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 20px;
    text-align: center;
    color: #8da4a1;
    font-style: italic;
    background: rgba(14, 20, 23, 0.75);
    border: 0;
    box-shadow: none;
}

.personnage-infos {
    display: flex;
    flex-direction: column;
    text-align: center;
    color: #cad8d6;
    line-height: 1.65;
    flex: 1 1 auto;
    height: 100%;
}

.personnage-title {
    margin: 0 0 14px;
    min-height: 72px;
    font-size: 1.30rem;
    line-height: 1.2;
    color: #e5f3f0;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 114, 110, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.personnage-meta-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    min-height: 232px;
    align-content: start;
}

.personnage-meta-item {
    padding: 8px 10px;
    border: 1px solid rgba(74, 114, 110, 0.15);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.personnage-meta-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6ed0bf;
    font-weight: 700;
}

.personnage-meta-value {
    display: block;
    font-size: 0.98rem;
    color: #d1ece6;
    font-weight: 600;
    word-break: break-word;
}

.personnage-desc {
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(74, 114, 110, 0.22);
    font-size: 0.95rem;
    color: #cad8d6;
    text-align: left;
    line-height: 1.8;
    word-break: break-word;
}

@media (max-width: 1280px) {
    .personnages-tableau {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .personnages-tableau {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .personnage-photo-frame .personnage-image-wrap {
        height: 300px;
    }

    .personnage-title {
        min-height: 68px;
    }

    .personnage-meta-list {
        min-height: 232px;
    }
}

@media (max-width: 640px) {
    .personnages-tableau {
        grid-template-columns: 1fr;
    }

    .personnage-photo-frame .personnage-image-wrap {
        height: 280px;
    }

    .personnage-cell-inner {
        padding: 16px 14px 18px;
    }

    .personnage-title {
        min-height: auto;
    }

    .personnage-meta-list {
        min-height: auto;
    }
}

.rule-btn {
    display: block;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #141b1f;
    color: #b5c7c4;
    text-decoration: none;
    border: 1px solid rgba(74, 114, 110, 0.3);
    border-radius: 6px;
    transition: all 0.2s;
}

.rule-btn:hover {
    background: #1c272c;
    border-color: rgba(77, 163, 148, 0.5);
    color: #e5f3f0;
}

.rule-btn.active {
    background: #23363b;
    border-color: #4da394;
    color: #ffffff;
}

.sidebar-left {
    width: 260px;
    float: left;
}

.content-main {
    margin-left: 280px;
}

.rule-content {
    background: rgba(14, 20, 24, 0.65);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

/* =========================================================
   ALBUM CARNIVAL / SURVIVANT
   ========================================================= */

.album-entry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid rgba(74, 114, 110, 0.35);
    background: rgba(77, 163, 148, 0.12);
    color: #d1ece6;
    transition: 0.2s ease;
}

.album-entry-btn:hover {
    background: rgba(77, 163, 148, 0.22);
    border-color: rgba(94, 196, 178, 0.55);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.album-card {
    position: relative;
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(27, 37, 43, 0.94), rgba(18, 25, 29, 0.98));
    border: 1px solid rgba(74, 114, 110, 0.25);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 10px 24px rgba(0,0,0,0.25);
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    outline: none;
}

.album-card:hover,
.album-card:focus {
    transform: translateY(-3px);
    border-color: rgba(77, 163, 148, 0.55);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.04),
        0 14px 28px rgba(0,0,0,0.35);
}

.album-thumb-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(14, 20, 24, 0.7);
    border: 1px solid rgba(74, 114, 110, 0.2);
    padding: 6px;
}

.album-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
    background: rgba(14, 20, 24, 0.4);
}

.album-title {
    margin-top: 10px;
    text-align: center;
    color: #e5f3f0;
    font-weight: 700;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;
}

.album-lightbox.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 11, 0.92);
    backdrop-filter: blur(5px);
    cursor: zoom-out;
}

.album-lightbox-content {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.album-lightbox-content img {
    display: block;
    width: auto;
    height: auto;
    max-width: 92vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 10px;
    border: 2px solid rgba(77, 163, 148, 0.45);
    background: rgba(11, 15, 18, 0.98);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
}

.album-lightbox-title {
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(15, 22, 26, 0.9);
    border: 1px solid rgba(74, 114, 110, 0.35);
    color: #e5f3f0;
    font-weight: 700;
    text-align: center;
    max-width: 90vw;
    line-height: 1.4;
    cursor: zoom-out;
}

body.album-lightbox-open {
    overflow: hidden;
}

@media (max-width: 1280px) {
    .album-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .album-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .album-grid {
        grid-template-columns: 1fr;
    }
}

.album-image,
.album-card img {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.home-shortcut-bar {
    margin: 0 0 18px;
    display: flex;
    justify-content: center;
}

.home-shortcut-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 8px;
    border: 1px solid rgba(74, 114, 110, 0.45);
    background: rgba(77, 163, 148, 0.14);
    color: #e5f3f0;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    transition: .2s ease;
}

.home-shortcut-btn:hover {
    transform: translateY(-1px);
    background: rgba(77, 163, 148, 0.24);
    border-color: rgba(94, 196, 178, 0.65);
    box-shadow: 0 0 16px rgba(77, 163, 148, 0.35);
}

.monde-carnival-section {
    margin-bottom: 18px;
}

.mc-video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.mc-video-card h3,
.mc-text-card h3 {
    margin-bottom: 12px;
}

.mc-text-card h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.mc-text-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.mc-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(74, 114, 110, 0.22);
    background: rgba(0,0,0,.4);
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

.mc-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 1200px) {
    .mc-video-grid,
    .mc-text-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .mc-video-grid,
    .mc-text-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .mc-video-grid,
    .mc-text-list {
        grid-template-columns: 1fr;
    }
}

.mc-card-actions {
    margin: 14px 0 0;
}

.mc-action-btn,
.mc-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(74, 114, 110, 0.35);
    background: rgba(77, 163, 148, 0.12);
    color: #e5f3f0;
    font-weight: 700;
    transition: .2s ease;
}

.mc-action-btn:hover,
.mc-link-btn:hover {
    background: rgba(77, 163, 148, 0.22);
    border-color: rgba(94, 196, 178, 0.55);
}

.mc-links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mc-link-btn {
    text-align: center;
}

.mc-text-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.mc-text-toggle {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    cursor: pointer;
}

.mc-text-preview {
    white-space: pre-line;
    line-height: 1.65;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    flex: 1;
}

.mc-text-more {
    margin-top: 12px;
    color: #5dc3b1;
    font-size: .94rem;
    font-style: italic;
}

.mc-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.mc-modal.is-open {
    display: block;
}

.mc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.82);
    backdrop-filter: blur(6px);
}

.mc-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(900px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    padding: 28px 24px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(25, 34, 40, .98), rgba(16, 22, 26, .99));
    border: 1px solid rgba(74, 114, 110, 0.35);
    box-shadow: 0 18px 50px rgba(0,0,0,.6);
}

.mc-modal-dialog h3 {
    margin-top: 0;
    color: #e5f3f0;
}

.mc-modal-body {
    white-space: pre-line;
    line-height: 1.9;
    color: var(--text);
}

.mc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(74, 114, 110, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    background: rgba(77, 163, 148, 0.14);
    color: #e5f3f0;
}

body.mc-modal-open {
    overflow: hidden;
}

@media (max-width:700px) {
    .mc-links-wrap {
        flex-direction: column;
    }

    .mc-link-btn,
    .mc-action-btn {
        width: 100%;
    }
}

.mc-video-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border-radius: 10px;
    border: 1px solid rgba(74, 114, 110, 0.22);
    background: rgba(0,0,0,.25);
    text-align: center;
    padding: 18px;
    color: #b5c7c4;
}

/* =========================================================
   BANDEAU DEFILANT ACCUEIL
   ========================================================= */

.home-ticker {
    position: relative;
    width: 100%;
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid rgba(74, 114, 110, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(25, 34, 40, 0.96), rgba(15, 21, 24, 0.96));
    box-shadow: var(--shadow-soft);
}

.home-ticker-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-width: 0;
    padding: 0;
}

.home-ticker-marquee {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: max-content;
    white-space: nowrap;
    will-change: transform;
    animation: homeTickerScrollLeft 20s linear infinite;
}

.home-ticker:hover .home-ticker-marquee {
    animation-play-state: paused;
}

.home-ticker-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.home-ticker-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    color: #e2f4f0;
    font-size: 0.94rem;
    line-height: 54px;
    padding: 0 34px 0 0;
    margin: 0 34px 0 0;
    position: relative;
    letter-spacing: 0.03em;
}

.home-ticker-item::after {
    content: "◈";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #4da394;
    opacity: 0.9;
}

@keyframes homeTickerScrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-12.5%);
    }
}

@media (max-width: 820px) {
    .home-ticker-item {
        font-size: 0.90rem;
        line-height: 50px;
        padding: 0 24px 0 0;
        margin: 0 24px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-ticker-marquee {
        animation: none;
    }
}

/* =========================
   BOUTON MENU INSCRIPTION
========================= */
.main-nav a.nav-inscription {
    background: linear-gradient(135deg, #1b4d45, #2f7a6d);
    color: #f0faf8 !important;
    font-weight: 700;
    border: 1px solid rgba(110, 220, 200, 0.55);
    box-shadow: 0 0 14px rgba(47, 122, 109, 0.45);
    border-radius: 6px;
    padding: 10px 16px;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.main-nav a.nav-inscription:hover {
    background: linear-gradient(135deg, #286b60, #3fa08f);
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(63, 160, 143, 0.65);
    transform: translateY(-1px);
}

.main-nav a.nav-inscription.active {
    background: linear-gradient(135deg, #3fa08f, #5dc3b1);
    color: #0c1412 !important;
    box-shadow: 0 0 22px rgba(93, 195, 177, 0.70);
    border-color: rgba(180, 250, 240, 0.85);
}

.site-header {
    position: relative;
}

.header-inner {
    position: relative;
    z-index: 3;
}

.header-admin-link {
    position: absolute;
    top: 18px;
    right: 22px;
}

.header-gestion-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: rgba(16, 22, 26, 0.85);
    color: #d1ece6;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(77, 163, 148, 0.6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: all 0.18s ease;
}

.header-gestion-btn:hover {
    background: rgba(30, 48, 52, 0.95);
    color: #ffffff;
    border-color: #6ed0bf;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.header-gestion-btn.active {
    background: rgba(40, 75, 70, 0.95);
    color: #ffffff;
    border-color: #79ebd8;
}

@media (max-width: 768px) {
    .header-admin-link {
        top: 12px;
        right: 12px;
    }

    .header-gestion-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}