* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Center every image/GIF in its container (except inline menu icons) */
img:not(.menu-icon),
video {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

:root {
    --ink: #f4f0ff;
    --ink-dim: #cabde3;
    --purple: #8b5cf6;
    --purple-deep: #6d28d9;
    --purple-soft: #a78bfa;
    --gold: #d4af37;
    --panel: rgba(20, 14, 34, 0.72);
    --panel-light: rgba(255, 255, 255, 0.06);
    --border-soft: rgba(167, 139, 250, 0.35);
    /* Theme-driven backgrounds (dark defaults) */
    --grad-1: rgba(12, 8, 24, 0.78);
    --grad-2: rgba(71, 41, 135, 0.72);
    --grad-3: rgba(10, 7, 20, 0.82);
    --sidebar-bg: linear-gradient(180deg, rgba(18, 12, 32, 0.92), rgba(12, 8, 22, 0.96));
    --ticker-bg: rgba(8, 5, 16, 0.88);
    --h1-grad-start: #f4f0ff;
    --kicker: var(--purple-soft);
    /* Boutons du menu : au repos, ils suivent le theme et sont en relief */
    --menu-btn-bg: linear-gradient(180deg, #241a42, #171029);
    --menu-btn-ink: var(--ink);
    --menu-btn-edge: rgba(167, 139, 250, 0.28);
    --menu-btn-hi: rgba(255, 255, 255, 0.10);
    --menu-btn-shadow: 0 5px 12px rgba(0, 0, 0, 0.45);
}

/* ===== Light theme ===== */
:root[data-theme="light"] {
    --ink: #241a3d;
    --ink-dim: #574a75;
    --panel: rgba(255, 255, 255, 0.90);
    --panel-light: rgba(124, 92, 196, 0.10);
    --border-soft: rgba(124, 92, 196, 0.30);
    --grad-1: rgba(245, 240, 255, 0.80);
    --grad-2: rgba(214, 197, 247, 0.68);
    --grad-3: rgba(250, 246, 255, 0.82);
    --sidebar-bg: linear-gradient(180deg, rgba(238, 230, 252, 0.96), rgba(224, 212, 248, 0.98));
    --ticker-bg: rgba(238, 231, 252, 0.94);
    --h1-grad-start: #6d28d9;
    --kicker: #6d28d9;
    --menu-btn-bg: linear-gradient(180deg, #ffffff, #efe9fb);
    --menu-btn-ink: #0f0a1c;
    --menu-btn-edge: rgba(15, 10, 28, 0.10);
    --menu-btn-hi: rgba(255, 255, 255, 0.95);
    --menu-btn-shadow: 0 5px 12px rgba(76, 29, 149, 0.18);
}
:root[data-theme="light"] .menu-button.domain { color: #7a5c12 !important; }
:root[data-theme="light"] .latest-news-label { color: #6d28d9; }

body {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--ink);
    text-shadow: none;
    transition: color 0.3s ease;
}

/* Parallax : couche image de fond qui derive au scroll (via --parallax-y) */
body::before {
    content: "";
    position: fixed;
    top: -12%;
    left: 0;
    width: 100%;
    height: 124%;
    background: url('pixelisee-seoul.jpg') no-repeat center center;
    background-size: cover;
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    z-index: -3;
    will-change: transform;
    pointer-events: none;
}

/* Voile degrade thematique : au-dessus de l'image, sous le contenu */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 45%, var(--grad-3) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Cherry Blossoms - Pixel Art */
.cherry-trees {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.tree {
    position: absolute;
    width: 0;
    height: 0;
}

/* Cherry tree trunk */
.tree::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 50px;
    background: #4a3b5c;
}

/* Flowers - pixel art with box-shadow */
.tree::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #d8c8f5;
    border-radius: 50%;
    box-shadow:
        -12px -15px 0 2px #d8c8f5,
        12px -15px 0 2px #d8c8f5,
        -18px -8px 0 2px #d8c8f5,
        18px -8px 0 2px #d8c8f5,
        -8px 0px 0 2px #d8c8f5,
        8px 0px 0 2px #d8c8f5,
        0px -20px 0 2px #d8c8f5,
        -15px -25px 0 2px #d8c8f5,
        15px -25px 0 2px #d8c8f5,
        -5px -10px 0 2px #d8c8f5,
        5px -10px 0 2px #d8c8f5;
}

/* Positions of 5 cherry trees */
.tree-1 { top: 8%; left: 10%; }
.tree-2 { top: 12%; right: 10%; }
.tree-3 { bottom: 15%; left: 15%; }
.tree-4 { bottom: 10%; right: 15%; }
.tree-5 { top: 45%; left: 50%; transform: translateX(-50%); }

/* Vertical menu on the left */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 14px;
    gap: 10px;
    border-right: 1px solid var(--border-soft);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

.menu-button {
    width: 160px;
    text-decoration: none;
    padding: 12px 14px;
    background: transparent;
    color: var(--ink-dim);
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    text-align: left;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.25s ease;
    text-shadow: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.menu-button:hover {
    background: var(--panel-light);
    border-left-color: var(--purple-soft);
    color: var(--ink);
    transform: translateX(3px);
    box-shadow: none;
}

.menu-button[aria-current="page"] {
    background: rgba(139, 92, 246, 0.22) !important;
    border-left-color: var(--gold) !important;
    color: var(--ink) !important;
}

.menu-button:active {
    transform: translateX(1px);
}

/* Boutons avec accent violet ARMY (sauf domain) */
.menu-button {
    background: var(--panel-light) !important;
    border: 1px solid rgba(167, 139, 250, 0.18) !important;
    border-left: 3px solid var(--purple) !important;
}
.menu-button:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    border-left-color: var(--gold) !important;
}
.menu-button.domain {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08)) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    border-left: 3px solid var(--gold) !important;
    color: #f3dfa0 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.15) !important;
}

/* Boutons du MENU uniquement (d'apres le modele Uiverse de gksckt, passe aux couleurs BTS).
   Repos : pastille blanche. Survol et page active : fond violet tres sombre du site et
   anneaux concentriques violet clair -> violet -> violet fonce -> or.
   Limite a .sidebar / .mobile-sidebar : la classe .menu-button sert AUSSI aux boutons
   "View on Amazon" des Goodies, qui ne doivent pas changer. */
.sidebar .menu-button,
.mobile-sidebar .menu-button {
    width: 172px;
    min-height: 52px;
    padding: 12px 18px !important;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    background: var(--menu-btn-bg) !important;
    color: var(--menu-btn-ink) !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow:
        inset 0 0 0 1px var(--menu-btn-edge),
        inset 0 1px 0 var(--menu-btn-hi),
        var(--menu-btn-shadow);
    cursor: pointer;
    transition: all 0.4s;
}

.sidebar .menu-button:hover,
.mobile-sidebar .menu-button:hover,
.sidebar .menu-button[aria-current="page"],
.mobile-sidebar .menu-button[aria-current="page"] {
    background: #0f0a1c !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    /* !important : sinon la lueur doree du bouton "Domain" (deja en !important) masque les anneaux */
    box-shadow:
        inset 0 0 0 3px var(--purple-soft),
        inset 0 0 0 6px var(--purple),
        inset 0 0 0 9px var(--purple-deep),
        inset 0 0 0 12px var(--gold),
        0 8px 18px rgba(0, 0, 0, 0.45) !important;
}

/* Page active : meme habillage que le survol, en plus affirme */
.sidebar .menu-button[aria-current="page"],
.mobile-sidebar .menu-button[aria-current="page"] {
    font-weight: 700 !important;
}

.sidebar .menu-button:active,
.mobile-sidebar .menu-button:active {
    transform: translateY(1px) scale(0.99);
    box-shadow:
        inset 0 0 0 1px var(--menu-btn-edge),
        0 2px 5px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .sidebar .menu-button,
    .mobile-sidebar .menu-button { transition: none; }
    .sidebar .menu-button:active,
    .mobile-sidebar .menu-button:active { transform: none; }
}

/* News Veracity Tags */
.news-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    color: white;
    margin-left: 8px;
    font-family: 'Helvetica', 'Arial', sans-serif;
    text-transform: uppercase;
}
.news-tag.official { background: #4caf50; }
.news-tag.confirmed { background: #2196f3; }
.news-tag.rumor { background: #ff9800; }
.news-tag.unconfirmed { background: #9e9e9e; }
.news-tag.denied { background: #f44336; }

/* Live News Ticker */
.news-ticker {
    position: fixed;
    top: 0;
    left: 200px;
    width: calc(100% - 200px);
    height: 36px;
    background: var(--ticker-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    z-index: 1001;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    /* le texte s'efface avant le bouton theme pose au bout de la barre */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent calc(100% - 48px));
    mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent calc(100% - 48px));
}

.ticker-content {
    display: inline-block;
    animation: ticker-scroll 160s linear infinite; /* defilement ralenti x4 (etait 40s) */
    padding-left: 100%;
}

.ticker-item {
    margin-right: 60px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.92em;
    font-weight: 500;
    color: var(--ink-dim);
    text-shadow: none;
}

.ticker-item .news-tag {
    margin-left: 0;
    margin-right: 8px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 65px 20px 20px;
    margin-left: 200px;
}

.kicker {
    display: inline-block;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--kicker);
    margin-bottom: 6px;
}

h1 {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-size: 4em;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 1px;
    background: linear-gradient(120deg, var(--h1-grad-start) 10%, var(--purple-soft) 55%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.hero-divider {
    width: 60px;
    height: 3px;
    margin: 0 auto 28px;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    border-radius: 2px;
}

.gif-container {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 14px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.02);
}

.gif-container img,
.gif-container video {
    max-width: 100%;
    max-height: 400px;
    border: none;
    border-radius: 12px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* La video n'a pas de taille intrinseque avant chargement des metadonnees :
   on reserve l'espace (ratio du visuel d'origine 480x266) pour eviter le layout shift. */
.gif-container video {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 480 / 266;
    height: auto;
}

/* Hero layout: latest news (left) + main GIF (right) */
.hero-layout {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    max-width: 1040px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-layout .gif-container {
    flex: 1 1 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-news-card {
    flex: 1 1 300px;
    max-width: 360px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 22px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.02);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-news-label {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--purple-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

.latest-news-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-soft), transparent);
}

.latest-news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.latest-news-date {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--ink-dim);
}

.latest-news-title {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.15em;
    line-height: 1.4;
    color: var(--ink);
    margin: 2px 0;
}

.latest-news-desc {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--ink-dim);
    margin: 0;
}

.latest-news-more {
    margin-top: auto;
    align-self: flex-start;
    background: linear-gradient(90deg, var(--purple), var(--purple-deep));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-news-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Vignette de la derniere news : volontairement reduite pour ne pas alourdir la carte */
.latest-news-thumb {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
    .latest-news-card {
        max-width: 100%;
        order: 2;
    }
    .hero-layout .gif-container {
        order: 1;
        flex-basis: 100%;
    }
}

/* Accueil : texte de bienvenue a gauche, carte Instagram a droite */
.welcome-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
    width: 100%;          /* aligne la rangee video + Instagram sur l'en-tete de l'accueil */
    max-width: 1040px;
    margin: 26px auto 30px;
}

.welcome-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-card .welcome-text {
    margin: 0;
    max-width: none;
    text-align: left;
}

/* Clip Super Tuna sous le texte de bienvenue : le lecteur .video-embed est
   dimensionne pour une page entiere (marges, ombre) — allege dans la carte. */
.welcome-card .video-embed {
    margin: 18px 0 0;
    max-width: none;
    box-shadow: none;
}

.welcome-card .video-caption {
    margin: 10px 0 0;
    text-align: left;
}

@media (max-width: 900px) {
    .welcome-card .video-caption { text-align: center; }
}

.instagram-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instagram-card-header {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    color: var(--ink);
    text-align: center;
}

.instagram-card iframe {
    width: 100%;
    height: 480px;
    border: 0;
    border-radius: 10px;
    display: block;
    background: #fff;
}

.instagram-card-link {
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--purple-soft);
    text-decoration: none;
}

.instagram-card-link:hover { text-decoration: underline; }

/* Accueil : la biographie utilise les cartes de contenu communes (.bio-container, plus bas).
   Seules sa largeur (alignee sur les autres cartes de l'accueil) et la disposition
   infos + photo lui sont propres. */
#home-page .bio-container {
    max-width: 1040px;
}

/* Bloc Goodies de l'accueil : largeur definie, sinon la grille de produits se dimensionne
   sur son contenu et deborde de l'ecran sur mobile. */
.home-goodies {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.home-bio-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.home-bio-text {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
}

.home-bio-text .bio-facts { margin: 0; }

.home-bio-text p {
    margin: 0;
    max-width: 65ch;
    font-size: 0.98em;
    line-height: 1.7;
    color: var(--ink-dim);
}

@media (max-width: 900px) {
    .home-bio-intro { grid-template-columns: minmax(0, 1fr); }
    .home-bio-intro .bio-photo { width: 100%; max-width: 480px; margin: 0 auto; }
}

/* Page BTS Members : dernier post Instagram officiel de chaque membre.
   L'embed Instagram a besoin d'environ 326px de large pour s'afficher correctement :
   conteneur elargi + colonnes d'au moins 330px (min() evite tout debordement mobile). */
#other-members-page .bio-container {
    max-width: 1100px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
    gap: 20px;
    margin: 20px 0;
}

.member-insta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.member-insta iframe {
    width: 100%;
    height: 440px;
    border: 0;
    border-radius: 10px;
    display: block;
    background: #fff;
}

.member-insta-link {
    display: inline-block;
    margin-top: 8px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--purple-soft);
    text-decoration: none;
}

.member-insta-link:hover { text-decoration: underline; }

.member-insta-none {
    margin: 0;
    font-size: 0.85em;
    font-style: italic;
    color: var(--ink-dim);
}

/* Page ARMY : liens vers les espaces officiels et les communautes de fans.
   Selecteurs a 2 classes pour passer devant d'eventuelles regles "conteneur a". */
.army-links {
    container: army-links / inline-size; /* colonnes selon la largeur de la section, pas de l'ecran */
    display: grid;
    gap: 26px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.army-links .army-links-group h4 {
    margin: 0 0 12px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: left;
    color: var(--kicker);
}

.army-links .army-links-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

/* Jamais une carte seule sur sa ligne :
   - 2 colonnes : avec un nombre impair de cartes, la derniere prend toute la ligne ;
   - section large : 3 colonnes pour les groupes de 3 cartes, 2 x 2 pour ceux de 4. */
@container army-links (min-width: 420px) {
    .army-links .army-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .army-links .army-link-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@container army-links (min-width: 700px) {
    .army-links .army-links-grid:not(:has(> :nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .army-links .army-links-grid:not(:has(> :nth-child(4))) .army-link-card:last-child { grid-column: auto; }
}

.army-links .army-link-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.army-links .army-link-card:hover,
.army-links .army-link-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.army-links .army-link-card:focus-visible {
    outline: 2px solid var(--purple-soft);
    outline-offset: 2px;
}

.army-links .army-link-name {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: var(--ink);
}

.army-links .army-link-domain {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.78em;
    color: var(--kicker);
    overflow-wrap: anywhere; /* doolsetbangtan.wordpress.com ne deborde pas d'une carte etroite */
}

.army-links .army-link-desc {
    margin: 4px 0 0;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.88em;
    line-height: 1.5;
    color: var(--ink-dim);
}

.army-links .army-links-note {
    margin: 0;
    font-size: 0.8em;
    font-style: italic;
    text-align: center;
    color: var(--ink-dim);
}

@media (prefers-reduced-motion: reduce) {
    .army-links .army-link-card { transition: none; }
    .army-links .army-link-card:hover,
    .army-links .army-link-card:focus-visible { transform: none; }
}

/* Accueil : en-tete (message + deux actions a gauche, derniere news a droite).
   Aligne a gauche, sur le bord des cartes (revue design 2026-09-21). */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    align-items: center;
    width: 100%;
    max-width: 1040px;
    margin: 10px auto 34px;
    text-align: left;
}

.home-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.home-hero-text .kicker { margin: 0; }

.home-hero-text h1 {
    margin: 0;
    font-size: 5.5em;
    line-height: 0.95;
}

/* Nom coreen a cote du titre. Le h1 est rempli par un degrade (color: transparent +
   background-clip: text) : il faut forcer -webkit-text-fill-color, sinon le hangul
   reste invisible dans les navigateurs WebKit/Blink. */
.hero-hangul {
    font-size: 0.3em;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--purple-soft);
    -webkit-text-fill-color: var(--purple-soft);
    margin-left: 0.18em;
    vertical-align: 0.9em;
}

.home-hero-tagline {
    margin: 0;
    max-width: 34em;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 1.12em;
    line-height: 1.65;
    color: var(--ink-dim);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.home-hero-actions .bio-cta { margin: 0; }
.home-hero .latest-news-card { max-width: none; }
.welcome-card .video-embed:first-child { margin-top: 0; }

@media (max-width: 900px) {
    .home-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
    .home-hero-text h1 { font-size: 3.4em; }
}

/* Bouton d'action secondaire (Amazon, accueil) : meme pastille que le menu,
   avec les memes anneaux violet et or au survol. */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    box-sizing: border-box;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background: var(--menu-btn-bg);
    color: var(--menu-btn-ink);
    box-shadow:
        inset 0 0 0 1px var(--menu-btn-edge),
        inset 0 1px 0 var(--menu-btn-hi),
        var(--menu-btn-shadow);
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s;
}

.btn-pill:hover,
.btn-pill:focus-visible {
    background: #0f0a1c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 3px var(--purple-soft),
        inset 0 0 0 6px var(--purple),
        inset 0 0 0 9px var(--purple-deep),
        inset 0 0 0 12px var(--gold),
        0 8px 18px rgba(0, 0, 0, 0.45);
}

.btn-pill:active { transform: translateY(1px) scale(0.99); }
.product-card .btn-pill { margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
    .btn-pill { transition: none; }
    .btn-pill:hover,
    .btn-pill:focus-visible,
    .btn-pill:active { transform: none; }
}

/* Pied de page : lien vers la vente du nom de domaine (sorti du menu) */
.footer .footer-links {
    margin: 10px 0 0;
    font-size: 0.95em;
}

.footer .footer-links a { color: var(--kicker); }

/* Mini Jin pixelise qui se balade en bas de l'ecran (anime par app.js) */
.pixel-jin {
    position: fixed;
    left: 0;
    bottom: 6px;
    width: 48px;           /* 16 colonnes x 3 : doit suivre W et SCALE dans app.js */
    height: 66px;          /* 22 lignes x 3 : doit suivre H et SCALE dans app.js */
    z-index: 998;          /* sous le bouton theme (1001) et le retour-en-haut (1000) */
    pointer-events: none;  /* ne bloque jamais un clic ni le scroll */
    will-change: transform;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.pixel-jin canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated; /* pixels nets a l'agrandissement x3 */
}

@media print {
    .pixel-jin { display: none; }
}

/* Mini thon (Super Tuna) : nage librement dans toute la fenetre, en X et en Y.
   Position de depart en haut a gauche, le deplacement se fait en transform (app.js). */
.pixel-tuna {
    position: fixed;
    left: 0;
    top: 0;
    width: 54px;           /* 18 colonnes x 3 : doit suivre W et SCALE dans app.js */
    height: 36px;          /* 12 lignes x 3 : doit suivre H et SCALE dans app.js */
    z-index: -1;           /* arriere-plan : derriere les cartes et le texte, au-dessus du fond de page */
    pointer-events: none;  /* ne bloque jamais un clic ni le scroll */
    opacity: 1;
    will-change: transform;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.pixel-tuna canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated; /* pixels nets a l'agrandissement x3 */
}

@media print {
    .pixel-tuna { display: none; }
}

/* Bulle facon manga au-dessus du mini Jin : ovale blanc, contour noir epais,
   lettrage BD (Bangers), pointe vers la tete. Meme rendu dans les deux themes. */
.pixel-jin-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    padding: 6px 13px 5px;
    background: #ffffff;
    color: #111111;
    border: 2.5px solid #111111;
    border-radius: 50% / 46%;
    font-family: 'Bangers', 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-size: 16px;
    letter-spacing: 0.8px;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
    transform-origin: 50% 100%;
    animation: jin-bubble-pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

/* Pointe : un triangle noir (contour) et un blanc (fond) superposes */
.pixel-jin-bubble::before,
.pixel-jin-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% + var(--tail-x, 0px));
    transform: translateX(-50%);
    border-style: solid;
}

.pixel-jin-bubble::before {
    border-width: 12px 7px 0 7px;
    border-color: #111111 transparent transparent transparent;
}

.pixel-jin-bubble::after {
    margin-top: -1px;
    border-width: 8px 4.5px 0 4.5px;
    border-color: #ffffff transparent transparent transparent;
}

@keyframes jin-bubble-pop {
    from { scale: 0.3; opacity: 0; }
    to { scale: 1; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pixel-jin-bubble { animation: none; }
}

@media (max-width: 900px) {
    .welcome-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .welcome-layout .welcome-text { text-align: center; }
    .instagram-card { max-width: 400px; margin: 0 auto; width: 100%; }
}

.welcome-text {
    max-width: 700px;
    margin: 26px auto 30px;
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    color: var(--ink-dim);
    text-shadow: none;
    line-height: 1.7;
}

.gif-gallery-title {
    text-align: center;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.3em;
    letter-spacing: 0.5px;
    color: var(--ink);
    margin: 44px 0 22px;
    text-shadow: none;
}

.gif-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.gif-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 8px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gif-card:hover {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.gif-card img,
.gif-card video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border: none;
    border-radius: 9px;
    display: block;
}

.gif-card p {
    margin: 10px 0 2px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.85em;
    color: var(--ink-dim);
}

/* Outfit page : conteneur élargi pour laisser respirer les grandes photos */
#outfit-page .bio-container {
    max-width: 1100px;
}

/* Outfit gallery (photoshoots) */
/* Lecteur video integre (ratio 16:9, responsive) */
.video-embed {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 25px auto 10px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: var(--panel);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-caption {
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85em;
    color: var(--ink-dim);
    margin: 0 auto 25px;
}

/* Page Media : grille de clips YouTube (2 colonnes, 1 sur mobile).
   .video-embed garde son ratio 16/9 ; on neutralise juste sa largeur max et ses marges. */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 1100px;
    margin: 0 auto 30px;
}

.video-gallery .video-embed {
    max-width: none;
    margin: 0;
}

.video-gallery .video-caption {
    margin: 10px 0 2px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.outfit-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.outfit-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 8px;
    background: var(--panel);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.outfit-card:hover {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.outfit-card img,
.outfit-card video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center top;
    border: none;
    border-radius: 9px;
    display: block;
}

.outfit-card .outfit-title {
    margin: 10px 0 2px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.92em;
    color: var(--ink);
}

.outfit-card .outfit-credit {
    margin: 2px 0 4px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.72em;
    color: var(--ink-dim);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .outfit-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .outfit-card img,
.outfit-card video {
        height: 440px;
    }
}

.controls {
    margin-top: 20px;
    background: var(--panel);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px dashed #ff69b4;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

/* Responsive images */
.responsive-img,
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive videos and iframes */
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* Prevent text selection on buttons and interactive elements */
button,
.menu-button,
.hamburger-menu,
a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly link styles */
a {
    cursor: pointer;
}

a[href] {
    touch-action: manipulation;
}

/* Prevent zoom on input focus for mobile */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input:not([type]) {
    font-size: 16px;
}

/* Focus styles for accessibility */
button:focus,
.menu-button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--purple-soft);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
button:focus:not(:focus-visible),
.menu-button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

.controls input {
    padding: 8px;
    border: 2px solid #ff1493;
    border-radius: 5px;
    background: var(--panel);
    font-family: 'Helvetica', 'Arial', sans-serif;
    width: 300px;
}

.controls button {
    padding: 8px 15px;
    background: linear-gradient(to bottom, #ff1493, #ff69b4);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: bold;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.controls button:hover {
    background: linear-gradient(to bottom, #ff69b4, #ff1493);
}

/* SPA Content Sections */
.page {
    display: none;
}
.page.active {
    display: block;
}

/* Cartes de contenu des pages (.bio-container) : meme style que les cartes de l'accueil
   (fond panneau, bordure fine violette, coins de 16px, ombre douce).
   En-tete : h2 = etiquette violette en majuscules, p = accroche en grand. */
.bio-container {
    box-sizing: border-box;
    width: 100%;           /* sinon la carte se cale sur son contenu (Goodies, Domain plus etroits) */
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 24px 28px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--ink);
    text-align: left;
}

.bio-header {
    margin: 0 0 22px;
    text-align: left;
    color: var(--ink);
}

.bio-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--kicker);
    text-shadow: none;
}

.bio-header h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-soft), transparent);
}

.bio-header > p {
    margin: 0;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.35em;
    line-height: 1.35;
    color: var(--ink);
    text-wrap: balance;
}

.bio-content {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 1em;
    line-height: 1.7;
    color: var(--ink);
}

.bio-content a:not([class]),
.video-caption a {
    color: var(--kicker);
}

/* Blocs internes : poses sur la carte, sans cadre colore */
.bio-lead {
    max-width: 65ch;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--ink-dim);
}

.bio-note {
    max-width: 700px;
    margin: 12px auto 0;
    font-size: 0.8em;
    font-style: italic;
    text-align: center;
    color: var(--ink-dim);
}

.bio-section-title {
    margin: 28px 0 12px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kicker);
    text-shadow: none;
}

.bio-section-title.center { text-align: center; }

.bio-callout {
    margin: 24px 0;
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--panel-light);
}

.bio-callout.center { text-align: center; }

.bio-callout-title {
    margin: 0 0 10px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.15em;
    line-height: 1.35;
    color: var(--ink);
    text-shadow: none;
}

.bio-callout-title.is-large {
    font-size: clamp(1.05em, 5vw, 1.8em); /* worldwidehandsome.com tient sur une ligne des 375px */
    overflow-wrap: break-word;
}

.bio-callout p {
    margin: 0 0 12px;
    color: var(--ink-dim);
}

.bio-callout > :last-child { margin-bottom: 0; }

.bio-cta {
    display: inline-block;
    margin: 4px 0 12px;
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--purple), var(--purple-deep));
    color: #fff;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bio-cta:hover,
.bio-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.bio-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.bio-chips span {
    padding: 6px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--panel-light);
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    color: var(--ink);
}

.bio-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
    color: var(--ink);
}

.bio-media {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 12px;
}

/* Fiches "libelle / valeur" (biographie, Super Tuna, ARMY, nom de domaine) */
.bio-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
}

.bio-facts.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.bio-facts > div {
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--panel-light);
}

/* nombre impair de fiches sur 2 colonnes : la derniere prend toute la ligne */
.bio-facts:not(.cols-3) > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

.bio-facts dt {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.72em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.bio-facts dd {
    margin: 2px 0 0;
    font-size: 0.95em;
    line-height: 1.45;
    color: var(--ink);
}

.bio-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 28px;
}

.bio-stats > div {
    padding: 14px 10px;
    border-radius: 12px;
    background: var(--panel-light);
    text-align: center;
}

.bio-stats strong {
    display: block;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.5em;
    line-height: 1.25;
    color: var(--kicker);
}

.bio-stats small {
    font-size: 0.85em;
    color: var(--ink-dim);
}

.bio-photo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

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

.bio-photo figcaption {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    font-style: italic;
    text-align: center;
    color: var(--ink-dim);
}

/* Petites cartes dans la carte : produits (Goodies) et membres (BTS Members) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 16px;
    margin: 14px 0;
}

.product-grid.on-page {
    max-width: 900px;
    margin: 0 auto 10px;
    gap: 20px;
}

.product-card,
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--panel-light);
    color: var(--ink);
    text-align: center;
}

.product-grid.on-page .product-card {
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-card img {
    width: 100%;
    max-width: 200px;
    height: 200px;
    margin: 0 auto 6px;
    object-fit: contain;
}

.product-card h4,
.member-card .member-name {
    margin: 4px 0 0;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1em;
    line-height: 1.35;
    color: var(--ink);
}

.product-card p { margin: 0; }

.product-card .product-price {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    color: var(--kicker);
}

.product-card .product-desc {
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--ink-dim);
}

.product-card .menu-button { margin-top: auto; }

.member-card { gap: 4px; }
.member-card p { margin: 0; }
.member-card .member-name { margin-bottom: 4px; font-size: 1.05em; color: var(--member-color, var(--ink)); }
.member-card .member-desc { margin-top: 4px; font-size: 0.9em; line-height: 1.5; color: var(--ink-dim); }
.member-card .member-insta { width: 100%; }

.member-avatar {
    width: 150px;
    max-width: 100%;
    height: 150px;
    margin: 0 auto 8px;
    object-fit: cover;
    border: 3px solid var(--member-color, var(--purple-soft));
    border-radius: 50%;
}

/* Page News : legende des etiquettes de fiabilite */
.news-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 18px;
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--panel-light);
    font-size: 0.85em;
    color: var(--ink-dim);
}

.news-legend .news-tag { margin: 0 4px 0 0; }

/* Frise chronologique (biographie, News) : esprit pixel, dans les violets du site */
.timeline {
    position: relative;
    margin-top: 24px;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 1px;
    background: linear-gradient(180deg, var(--purple-soft), var(--border-soft));
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
    padding-left: 14px;
}

/* Point de la frise : un "pixel" carre centre sur la ligne */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.timeline-date {
    margin-bottom: 2px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: 0.5px;
    color: var(--kicker);
}

.timeline-title {
    margin-bottom: 6px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.02em;
    line-height: 1.4;
    color: var(--ink);
}

.timeline-description {
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--panel-light);
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.92em;
    line-height: 1.6;
    color: var(--ink-dim);
}

/* Galerie de 1 a 3 photos par news : une seule photo garde son format naturel,
   2 ou 3 photos s'alignent en vignettes de meme hauteur (empilees sur petit ecran) */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.news-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-gallery img:only-child {
    aspect-ratio: auto;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
}

.bio-timeline-head {
    margin: 32px 0 8px;
    text-align: center;
}

.bio-timeline-head h3 {
    margin: 0 0 14px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kicker);
    text-shadow: none;
}

/* Rangee de pixels decoratifs */
.pixel-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    margin: 30px 0;
}

.bio-timeline-head .pixel-timeline { margin: 0; }

.pixel {
    width: 12px;
    height: 12px;
    background: var(--purple);
}

.pixel.empty {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--border-soft);
}

.pixel.active {
    background: var(--purple-soft);
    animation: pixelPulse 1.5s infinite;
}

@keyframes pixelPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@media (max-width: 900px) {
    .bio-facts.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .bio-container { padding: 18px 16px; }
    .bio-facts,
    .bio-facts.cols-3 { grid-template-columns: minmax(0, 1fr); }
    .bio-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .pixel.active { animation: none; }
    .bio-cta { transition: none; }
    .bio-cta:hover,
    .bio-cta:focus-visible { transform: none; }
}

/* "Back" : a droite du menu lateral et sous la barre de news, jamais par-dessus un
   bouton du menu (revue design 2026-09-21). Il defile avec la page. */
.back-button {
    position: absolute;
    text-decoration: none;
    display: inline-block;
    top: 50px;
    left: 220px;
    padding: 10px 20px;
    background: var(--panel-light);
    color: var(--ink);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(139, 92, 246, 0.22);
    border-color: var(--purple-soft);
    transform: translateX(-3px);
}

/* Les pages avec "Back" laissent la place au bouton au-dessus du contenu */
.back-button ~ .page .container {
    padding-top: 110px;
}

.footer {
    margin-top: auto !important;
    color: var(--ink-dim);
    font-size: 0.85em;
    width: 100%;
    text-align: center;
    padding: 24px 0;
}

.footer p.contact {
    background: var(--panel-light);
    border: 1px solid var(--border-soft);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    color: var(--ink);
    font-weight: 500;
    margin-top: 12px;
    box-shadow: none;
    animation: none;
}

.header-contact {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.header-contact .contact {
    background: var(--panel-light);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    color: var(--ink);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.9em;
    border: 1px solid var(--border-soft);
}

@keyframes blink {
    50% { opacity: 0.5; }
}

/* Internet Explorer 10-11 gradient hack */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    h1 { text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5); }
}

/* ==================== MOBILE RESPONSIVE DESIGN ==================== */

/* Hamburger Menu - Hidden by default */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background: var(--purple);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Sidebar - Overlay */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid var(--border-soft);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    -webkit-overflow-scrolling: touch;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.mobile-sidebar .menu-button {
    width: calc(100% - 20px);
    margin: 8px 10px;
    font-size: 1em;
    padding: 12px;
}

/* Mobile overlay for closing sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile News Ticker */
.mobile-news-ticker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: var(--ticker-bg);
    color: var(--ink);
    z-index: 1002;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-soft);
    padding: 5px 10px;
}

.mobile-news-ticker .ticker-content {
    display: inline-block;
    animation: ticker-scroll 120s linear infinite; /* version mobile, ralentie x4 (etait 30s) */
    padding-left: 100%;
    font-size: 0.9em;
}

.mobile-news-ticker .ticker-item {
    margin-right: 40px;
}

/* Back to top button for mobile */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple));
    color: white;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.5);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Theme toggle : pose au bout de la barre de news, en haut a droite (revue design 2026-09-21).
   Il ne flotte plus en bas de l'ecran, par-dessus le texte. */
.theme-toggle {
    position: fixed;
    top: 3px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple));
    color: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    font-size: 0.95em;
    line-height: 1;
    cursor: pointer;
    z-index: 1003;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.6);
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .menu-button {
        min-height: 48px;
        padding: 12px 16px !important;
    }
    
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .controls input {
        padding: 12px 16px;
        font-size: 1.1em;
    }
    
    .controls button {
        padding: 12px 20px;
        font-size: 1.1em;
    }
}

/* Tablet view */
@media (max-width: 1024px) {
    .sidebar {
        width: 150px;
    }
    
    .container {
        margin-left: 150px;
    }
    
    .news-ticker {
        left: 150px;
        width: calc(100% - 150px);
    }
    
    .back-button {
        left: 170px;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .container {
        margin-left: 0;
        padding: 55px 15px 20px;
    }
    
    .news-ticker {
        display: none;
    }
    
    .mobile-news-ticker {
        display: block;
        /* le texte s'efface avant le bouton menu (a gauche) et le bouton theme (a droite) */
        -webkit-mask-image: linear-gradient(90deg, transparent 66px, #000 90px, #000 calc(100% - 64px), transparent calc(100% - 46px));
        mask-image: linear-gradient(90deg, transparent 66px, #000 90px, #000 calc(100% - 64px), transparent calc(100% - 46px));
    }

    .theme-toggle {
        top: 7px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .mobile-sidebar {
        display: block;
    }

    /* .mobile-overlay reste display:none tant qu'il n'est pas .active
       (sinon ce calque plein écran capte scroll + clics — cf. bug mobile) */

    .back-to-top {
        display: block;
    }
    
    /* "Back" n'est plus sous le bouton menu : il descend sous la barre de news
       et defile avec la page ; le contenu laisse la place */
    .back-button {
        position: absolute;
        left: 15px;
        top: 56px;
        z-index: 5;
        padding: 6px 14px;
        font-size: 0.9em;
    }

    .back-button ~ .page .container {
        padding-top: 100px;
    }
    
    .header-contact {
        top: 60px;
        right: 10px;
        z-index: 1002;
    }
    
    .header-contact .contact {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    h1 {
        font-size: 2.5em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    .gif-container img,
.gif-container video {
        max-width: 100%;
        height: auto;
    }

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

    .gif-card img,
.gif-card video {
        height: 120px;
    }

    /* Product grid */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Member grid */
    div[style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats grid */
    div[style*="display: flex; justify-content: space-around"] {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-button {
        width: 100%;
        margin: 6px 0;
    }
}

/* Mobile Portrait - Very small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .header-contact {
        display: none;
    }
    
    h1 {
        font-size: 2em;
    }

    .gif-container {
        padding: 10px;
    }

    .gif-container img,
.gif-container video {
        border-radius: 8px;
    }
    
    .controls input {
        width: 100%;
        max-width: 100%;
    }
    
    .footer {
        font-size: 0.85em;
    }
    
    /* Make buttons more touch-friendly */
    .menu-button {
        min-height: 44px;
        padding: 10px 8px !important;
        font-size: 1em;
    }
    
    .back-button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

/* iPhone SE and similar small devices */
@media (max-width: 360px) {
    h1 {
        font-size: 1.7em;
    }
    
    .mobile-news-ticker {
        height: 40px;
        font-size: 0.85em;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* Samsung Galaxy Fold and very narrow screens */
@media (max-width: 280px) {
    body {
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .hamburger-menu {
        padding: 5px 8px;
    }
    
    .hamburger-menu .bar {
        width: 20px;
    }
    
    .mobile-sidebar {
        width: 90%;
    }
}

/* Landscape mobile view */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-news-ticker {
        height: 35px;
        font-size: 0.8em;
    }
    
    .hamburger-menu {
        top: 5px;
        left: 5px;
        padding: 5px 8px;
    }
    
    .back-button {
        top: 5px;
        left: 5px;
    }
}

/* Custom scrollbar for WebKit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--panel);
}

::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff1493;
}

/* Hide scrollbar for mobile sidebar on iOS */
.mobile-sidebar::-webkit-scrollbar {
    display: none;
}

/* Print styles */
@media print {
    .sidebar,
    .news-ticker,
    .hamburger-menu,
    .mobile-sidebar,
    .mobile-overlay,
    .back-to-top,
    .header-contact,
    .gif-container {
        display: none !important;
    }
    
    .container {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    h1, h2, h3, h4 {
        color: black !important;
        text-shadow: none !important;
        -webkit-text-stroke: 0 !important;
    }
}
