:root {
    --primary: #4B5320;
    --accent: #D4AF37;
    --accent-bright: #E5C04A;
    --danger: #A52A2A;
    --bg-dark: #0A0A0B;
    --surface: #1E1E20;
    --surface-light: #2A2A2D;
    --text-main: #F2F2F7;
    --text-muted: #88888E;
    --ok: #4ade80;
    --warn: #f59e0b;

    /* Typographie */
    --font-display: 'Bebas Neue', 'Impact', 'Arial Narrow Bold', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
}

/* ============ LOCK SCREEN (avant TOUT) ============ */
body.locked .tactical-header,
body.locked main#app-viewport,
body.locked .bottom-nav {
    display: none !important;
}

.lock-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(165, 42, 42, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #050506 0%, #0A0A0B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    animation: lockFadeIn 0.6s ease-out;
    overflow-y: auto;
}
.lock-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
.lock-screen.unlocking {
    animation: lockFadeOut 0.5s ease-in forwards;
    pointer-events: none;
}

.lock-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    text-align: center;
    padding: 30px 20px;
}

.lock-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    animation: fadeUp 0.7s 0.1s ease-out both;
}
.lock-brand .brand-name {
    font-family: var(--font-display);
    font-size: 2.4rem;
    letter-spacing: 8px;
    color: #FFF;
}
.lock-brand .brand-num {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: 3px;
    color: var(--accent);
}

.lock-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeUp 0.7s 0.2s ease-out both;
}
.lock-ornament .hero-ornament-line {
    height: 1px;
    width: 40px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.lock-ornament .hero-ornament-diamond {
    font-size: 0.65rem;
    color: var(--accent);
}

.lock-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 6px;
    color: var(--danger);
    margin-bottom: 8px;
    animation: fadeUp 0.7s 0.3s ease-out both;
}

.lock-subtitle {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    animation: fadeUp 0.7s 0.4s ease-out both;
}

.lock-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    animation: fadeUp 0.7s 0.5s ease-out both;
}
.lock-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.5);
    transition: all 0.15s;
}
.lock-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}
.lock-dots.error .lock-dot {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(165, 42, 42, 0.6);
}
.lock-dots.error {
    animation: shakeX 0.45s ease-in-out;
}
.lock-dots.success .lock-dot {
    background: var(--ok);
    border-color: var(--ok);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.7);
}

.lock-error {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: var(--danger);
    min-height: 18px;
    margin-bottom: 26px;
    opacity: 0;
    transition: opacity 0.2s;
}
.lock-error.show { opacity: 1; }

.lock-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
    animation: fadeUp 0.7s 0.6s ease-out both;
}
.lock-key {
    aspect-ratio: 1;
    min-height: 62px;
    background: rgba(30, 30, 32, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: #FFF;
    font-family: var(--font-display);
    font-size: 1.6rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.12s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.lock-key:active {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--accent);
    transform: scale(0.94);
}
@media (hover: hover) {
    .lock-key:hover {
        background: rgba(212, 175, 55, 0.08);
        border-color: rgba(212, 175, 55, 0.4);
    }
}
.lock-key-empty {
    visibility: hidden;
    pointer-events: none;
}
.lock-key-erase {
    font-size: 1.3rem;
    color: var(--text-muted);
}

@keyframes lockFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes lockFadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* ============ NAME FORM (post-PIN testeur) ============ */
.name-welcome-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 6px;
    color: var(--accent);
    margin: 22px 0 12px;
    animation: fadeUp 0.6s ease-out both;
}
.name-welcome-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #CCC;
    line-height: 1.6;
    margin-bottom: 28px;
    animation: fadeUp 0.6s 0.1s ease-out both;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.name-input {
    width: 100%;
    max-width: 300px;
    padding: 14px 18px;
    background: rgba(30, 30, 32, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #FFF;
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    margin: 0 auto 16px;
    display: block;
    transition: border-color 0.2s, transform 0.15s;
}
.name-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.name-input::placeholder { color: #666; font-style: italic; }
.name-input.shake {
    border-color: var(--danger);
    animation: shakeX 0.4s ease-in-out;
}
.name-submit {
    background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 100%);
    color: #0A0A0B;
    border: none;
    padding: 14px 48px;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 6px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 50px;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.name-submit:active { transform: scale(0.97); }
.name-submit:disabled { opacity: 0.5; cursor: wait; }
.name-footer {
    margin-top: 30px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #555;
}

/* ============ ADMIN PANEL (journal d'accès) ============ */
.admin-panel {
    width: 100%;
    max-width: 520px;
    background: rgba(14, 14, 16, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    padding: 24px 20px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.5s ease-out;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    margin-bottom: 14px;
}
.admin-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: var(--accent);
}
.admin-close {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #888;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
}
.admin-close:active { transform: scale(0.92); }

.admin-source {
    font-family: var(--font-body);
    font-size: 0.72rem;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}
.source-ok { color: var(--ok); }
.source-warn { color: var(--warn); }

.admin-stats {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px dashed rgba(255,255,255,0.08);
    border-bottom: 1px dashed rgba(255,255,255,0.08);
    margin-bottom: 14px;
}
.admin-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.admin-stat .stat-n {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--accent);
    line-height: 1;
}
.admin-stat .stat-l {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.admin-logs {
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}
.admin-loading,
.admin-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
}
.admin-log-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.admin-log-entry:last-child { border-bottom: none; }
.admin-log-name {
    font-family: var(--font-body);
    font-weight: 500;
    color: #FFF;
    font-size: 0.92rem;
}
.admin-log-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.admin-log-meta .log-time { letter-spacing: 0.5px; }
.admin-log-meta .log-dev { opacity: 0.85; }
.admin-log-meta .log-src-local {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warn);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.admin-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.05);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #555;
    text-align: center;
}

/* ============ COPYRIGHT FOOTER (bas accueil) ============ */
.app-copyright {
    padding: 30px 20px 20px;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    margin-top: 20px;
}
.app-copyright-brand {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 6px;
    color: var(--accent);
    margin-bottom: 6px;
}
.app-copyright-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: #555;
    letter-spacing: 1px;
    line-height: 1.6;
}
.app-copyright-sig {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: #3a3a3d;
    letter-spacing: 2px;
    margin-top: 8px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding-top: 56px;
    padding-bottom: 90px;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* ============ HEADER MINIMAL ============ */
.tactical-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 11, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 2000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
}
.header-brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-display);
    color: var(--accent);
}
.brand-name {
    font-size: 1.15rem;
    letter-spacing: 4px;
    color: #FFF;
    font-weight: 400;
}
.brand-num {
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: var(--accent);
    opacity: 0.85;
}
.daylight-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--accent);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}
.daylight-toggle:active { transform: scale(0.92); }

/* ============ ACCUEIL HERO — CINÉMATIQUE ============ */
.accueil-hero {
    text-align: center;
    padding: 50px 24px 40px;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(165, 42, 42, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10,10,11,0.4) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
    animation: heroFadeIn 1.2s ease-out both;
}
.accueil-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}
.accueil-hero > * { position: relative; z-index: 1; }

.hero-year {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 10px;
    color: var(--accent);
    margin-bottom: 18px;
    opacity: 0;
    animation: fadeUp 0.8s 0.2s ease-out forwards;
}

.hero-title {
    margin: 0;
    line-height: 0.92;
    text-align: center;
}
.hero-line-1, .hero-line-2 {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    color: #FFF;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0;
    animation: fadeUp 0.9s ease-out forwards;
}
.hero-line-1 {
    font-size: clamp(3.2rem, 16vw, 5.5rem);
    animation-delay: 0.35s;
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.1);
}
.hero-line-2 {
    font-size: clamp(2.4rem, 11vw, 4rem);
    animation-delay: 0.5s;
    background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 4px;
}

.hero-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 28px auto 18px;
    opacity: 0;
    animation: fadeUp 0.8s 0.7s ease-out forwards;
}
.hero-ornament-line {
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.hero-ornament-diamond {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0;
}

.hero-dates {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 6px;
    color: var(--accent);
    margin-bottom: 22px;
    opacity: 0;
    animation: fadeUp 0.8s 0.85s ease-out forwards;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 2.5px;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeUp 0.8s 1s ease-out forwards;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 10px;
    line-height: 1.6;
}
.hero-stats .stat-num { color: #BBB; }
.hero-stats .sep { color: var(--accent); opacity: 0.5; }

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ============ MODULES — ROADMAP CHRONOLOGIQUE ============ */
.module-grid { padding: 20px; }

.roadmap-month {
    margin-bottom: 30px;
}
.roadmap-month-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}
.roadmap-month-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 2px;
    background: var(--accent);
}
.roadmap-month-number {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 4px;
    color: var(--accent);
}
.roadmap-month-subtitle {
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-style: italic;
}

.module-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    gap: 14px;
}
.module-card:active { transform: scale(0.98); }

.module-card.active-op {
    border-left: 4px solid var(--accent);
    background: linear-gradient(90deg, rgba(75, 83, 32, 0.35) 0%, rgba(30, 30, 32, 1) 60%);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
}

.module-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-left: 4px solid #3a3a3d;
}
.module-card.locked:active { transform: none; }

.module-icon {
    width: 48px;
    height: 34px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 4px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.module-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.module-card.active-op .module-icon {
    color: var(--accent-bright);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
}
.module-card.locked .module-icon {
    color: #555;
}

.module-info {
    flex: 1;
    min-width: 0;
}
.module-info .module-period {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 2px;
}
.module-info h3 {
    margin: 0 0 4px 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: #FFF;
    letter-spacing: 2px;
    font-weight: 400;
}
.module-info p {
    margin: 0 0 6px 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
    font-family: var(--font-body);
}
.module-teaser {
    font-size: 0.82rem;
    color: #CCC;
    line-height: 1.5;
    font-family: var(--font-body);
    margin-top: 6px;
}

.module-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    min-height: 50px;
    padding-top: 2px;
}
.module-arrow {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.3rem;
}
.module-progress-mini {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 1px;
}
.module-badge {
    font-family: var(--font-display);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: #888;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============ QUICK STATS ============ */
.quick-stats { padding: 0 20px 20px; }
.quick-stats h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px dashed #333;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 20px;
}
.quick-stats ul { list-style: none; padding: 0; font-size: 0.85rem; }
.quick-stats li {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.quick-stats strong {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ============ MANIFESTO (teasing accueil) ============ */
.manifesto-block {
    margin: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(165, 42, 42, 0.08) 0%, rgba(30, 30, 32, 0.6) 100%);
    border-left: 3px solid var(--danger);
    border-radius: 10px;
}
.manifesto-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--danger);
    letter-spacing: 6px;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.manifesto-block p {
    font-size: 0.9rem;
    color: #DDD;
    line-height: 1.65;
    margin: 0 0 10px 0;
}
.manifesto-block p:last-child { margin-bottom: 0; }
.manifesto-block strong { color: var(--accent); font-weight: 700; }
.manifesto-line {
    font-size: 1.05rem !important;
    color: #FFF !important;
    margin-bottom: 14px !important;
    line-height: 1.4 !important;
}
.manifesto-pourquoi {
    border-top: 1px dashed rgba(255,255,255,0.1);
    padding-top: 14px;
    margin-top: 14px !important;
    font-size: 0.88rem !important;
}

/* ============ ABOUT (présentation) ============ */
.about-block {
    margin: 20px;
    padding: 20px;
    background: rgba(75, 83, 32, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
}
.about-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 6px;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.about-block p {
    font-size: 0.88rem;
    color: #CCC;
    line-height: 1.65;
    margin: 0 0 10px 0;
}
.about-block p:last-child { margin-bottom: 0; }
.about-block strong { color: var(--accent); font-weight: 700; }
.about-block em { color: #FFF; font-style: italic; }
.about-feedback {
    margin-top: 14px !important;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.82rem !important;
    color: #AAA !important;
}

/* ============ GPS PANEL ============ */
.gps-panel {
    margin: 12px 16px 0;
    padding: 14px;
    background: linear-gradient(135deg, #151516 0%, #0d0d0e 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    font-family: 'SF Mono', Menlo, monospace;
}
.gps-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.gps-label { color: var(--text-muted); font-weight: bold; }
.gps-coords {
    font-size: 1.15rem;
    color: #FFF;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 4px 0;
}
.gps-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.gps-status { padding: 3px 10px; border-radius: 4px; font-weight: bold; font-size: 0.65rem; letter-spacing: 1px; }
.gps-status.pending { background: rgba(212,175,55,0.15); color: var(--accent); animation: pulse-green 2s infinite; }
.gps-status.ok { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.gps-status.error { background: rgba(165, 42, 42, 0.2); color: #ff6b6b; }

.mini-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    min-height: 36px;
    letter-spacing: 1px;
}
.mini-btn:active { background: var(--accent); color: black; }

/* ============ OPERATION HERO ============ */
.op-hero {
    padding: 20px;
    border-bottom: 1px solid #222;
    background: linear-gradient(180deg, rgba(75,83,32,0.08) 0%, transparent 100%);
}
.op-hero-period {
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 3px;
    font-weight: bold;
    margin-bottom: 4px;
}
.op-hero h2 {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
    color: #FFF;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.op-hero-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 14px;
}
.op-hero-intel {
    font-size: 0.9rem;
    color: #CCC;
    line-height: 1.6;
    background: rgba(0,0,0,0.3);
    padding: 14px;
    border-radius: 8px;
    border-left: 2px solid var(--accent);
}
.op-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    gap: 12px;
}
.op-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.op-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.op-progress-text {
    font-size: 0.75rem;
    color: var(--accent);
    font-family: 'SF Mono', Menlo, monospace;
    font-weight: bold;
    white-space: nowrap;
}

/* ============ PHASE (groupement narratif) ============ */
.phase {
    padding: 24px 20px 10px;
    border-bottom: 1px solid #1a1a1c;
}
.phase-title-block {
    margin-bottom: 16px;
}
.phase-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.phase-meta .phase-date { color: var(--accent); font-weight: bold; }
.phase-title {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: 0.5px;
}
.phase-narrative {
    font-size: 0.85rem;
    color: #BBB;
    line-height: 1.55;
    font-style: italic;
    margin: 0 0 16px 0;
}
.phase.danger .phase-title { color: #ff6b6b; }

/* ============ MILESTONE CARD (premium) ============ */
.milestones { position: relative; }
.milestone {
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
}
.milestone.danger { border: 2px solid var(--danger); }
.milestone.visited { border-color: var(--ok); }

.milestone-header {
    padding: 14px 14px 10px;
}
.milestone-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 10px;
}
.unit-badge {
    font-size: 0.55rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.ca { background: #CC0000; color: white; }
.fr { background: #002366; color: white; }
.pl { background: #FFFFFF; color: black; border: 1px solid red; }
.de { background: #000; color: white; border: 1px solid #CCC; }
.us { background: #FFFFFF; color: #002366; border: 1px solid #CC0000; }

.visited-stamp {
    display: none;
    font-size: 0.55rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(74, 222, 128, 0.15);
    color: var(--ok);
    font-weight: bold;
    letter-spacing: 1px;
    border: 1px solid var(--ok);
}
.milestone.visited .visited-stamp { display: inline-block; }

.milestone h4 {
    margin: 0 0 2px 0;
    font-size: 1.05rem;
    color: #FFF;
    line-height: 1.25;
}
.milestone-subtitle {
    font-size: 0.75rem;
    color: var(--accent);
    font-style: italic;
    margin-bottom: 10px;
}

/* ============ LEAFLET MAP ============ */
.milestone-map {
    height: 140px;
    background: #0a0a0a;
    position: relative;
}
.milestone-map .leaflet-container {
    background: #0a0a0a;
    height: 100%;
    width: 100%;
}
/* Dark theme pour Leaflet attribution */
.leaflet-control-attribution {
    background: rgba(0,0,0,0.6) !important;
    color: #888 !important;
    font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }
.leaflet-bar a {
    background: var(--surface) !important;
    color: var(--accent) !important;
    border-bottom-color: #333 !important;
}
.leaflet-bar a:hover { background: var(--surface-light) !important; }

/* Markers customs */
.marker-target {
    background: var(--accent);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 0 0 0 2px var(--accent);
}
.marker-user {
    background: var(--ok);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 12px var(--ok);
    animation: pulse-user 2s infinite;
}
@keyframes pulse-user {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* ============ MILESTONE BODY ============ */
.milestone-body {
    padding: 14px;
    padding-top: 12px;
}

.distance-bar {
    background: rgba(0,0,0,0.35);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    border: 1px solid rgba(212,175,55,0.1);
    min-height: 40px;
}
.distance-bar .dist-val { color: var(--accent); font-weight: bold; font-size: 1.05rem; letter-spacing: 0.5px; }
.distance-bar .dist-bearing { color: #FFF; font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px; }
.distance-bar .dist-waiting { font-size: 0.75rem; color: var(--text-muted); font-style: italic; letter-spacing: 1px; }

/* ============ AUDIO PLAYER ============ */
.audio-slot {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}
.audio-slot-phase {
    margin-top: 14px;
    margin-bottom: 0;
    border-color: rgba(212,175,55,0.30);
    background: rgba(0,0,0,0.45);
}
.audio-slot.empty {
    border-style: dashed;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
    justify-content: center;
    letter-spacing: 0.5px;
}
.audio-play-btn {
    background: var(--accent);
    border: none;
    color: black;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.audio-play-btn:active { transform: scale(0.92); }
.audio-play-btn.playing { background: var(--ok); }

.audio-progress-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.audio-label {
    font-size: 0.75rem;
    color: #CCC;
    letter-spacing: 0.3px;
    line-height: 1;
}
.audio-progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}
.audio-progress-bar:hover { background: rgba(255,255,255,0.18); }
.audio-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.1s linear;
}
.audio-time {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1;
}
.audio-skip-btn {
    background: transparent;
    border: 1px solid rgba(212,175,55,0.25);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.audio-skip-btn:active { transform: scale(0.90); background: rgba(212,175,55,0.10); }

@media (max-width: 520px) {
    .audio-slot { gap: 6px; padding: 8px 10px; }
    .audio-skip-btn { width: 28px; height: 28px; font-size: 0.65rem; }
    .audio-play-btn { width: 32px; height: 32px; }
}


/* ============ PHOTOS AVANT / APRÈS ============ */
.photos-ba {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.photo-cell {
    aspect-ratio: 4/3;
    background: rgba(0,0,0,0.4);
    border: 1px dashed rgba(212,175,55,0.2);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-cell .photo-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.75);
    color: var(--accent);
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 1px;
}
.photo-cell.empty {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-style: italic;
    padding: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ============ INTEL + SOURCES ============ */
.intel-box {
    font-size: 0.88rem;
    color: #CCC;
    line-height: 1.55;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.intel-box strong { color: var(--accent); }
.intel-sources {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.08);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}
.intel-sources strong { color: #999; font-style: normal; letter-spacing: 1px; font-size: 0.6rem; text-transform: uppercase; }

/* ============ GEO BUTTONS ============ */
.geo-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.15s;
    min-height: 48px;
    letter-spacing: 0.5px;
}
.geo-btn:active { background: var(--accent); color: black; transform: scale(0.98); }
.geo-btn.danger { border-color: var(--danger); color: #ff6b6b; background: rgba(165, 42, 42, 0.1); }
.geo-btn.danger:active { background: var(--danger); color: white; }

/* ============ PHOTO MODAL (lightbox) ============ */
.photo-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 4000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    flex-direction: column;
    cursor: zoom-out;
}
.photo-modal.active { display: flex; }
.photo-modal img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    cursor: default;
}
.photo-modal-caption {
    color: #FFF;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-top: 16px;
    text-align: center;
    cursor: default;
}

/* Hint fermeture en haut à droite (mobile + desktop) */
.photo-modal::before {
    content: "✕";
    position: absolute;
    top: 16px;
    right: 20px;
    color: #FFF;
    font-size: 1.6rem;
    opacity: 0.6;
    pointer-events: none;
}

/* Lock du scroll body quand modal ouvert (évite scroll fantôme derrière) */
body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* ============ RELEVÉS ============ */
.archive-ui { padding: 20px; }
.archive-ui h3 { color: var(--accent); letter-spacing: 1px; margin-top: 0; }
.archive-ui input, .archive-ui textarea, .archive-ui select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    background: var(--surface);
    color: white;
    border: 1px solid #333;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    min-height: 48px;
}
.archive-ui textarea { height: 120px; resize: none; }
.meta-inputs { display: flex; gap: 10px; }
.meta-inputs input, .meta-inputs select { flex: 1; }

.geo-stamp {
    background: rgba(0,0,0,0.35);
    border: 1px dashed #333;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.geo-stamp-label { display: block; letter-spacing: 1px; margin-bottom: 4px; text-transform: uppercase; font-weight: bold; }
.geo-stamp-val { color: var(--accent); font-family: 'SF Mono', Menlo, monospace; font-size: 0.85rem; }

.btn-primaryrugged {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    font-size: 1.05rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 1px;
    min-height: 52px;
    transition: 0.15s;
}
.btn-primaryrugged:active { transform: scale(0.98); background: #5a6428; }
.btn-primaryrugged:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: rgba(28,28,30,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #333;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 33%;
    min-height: 64px;
    cursor: pointer;
    padding: 8px 0;
    transition: 0.15s;
}
.nav-item:active { transform: scale(0.95); }
.nav-item.active { color: var(--accent); }
.nav-item .icon { font-size: 1.5rem; margin-bottom: 4px; }
.nav-item .label { font-size: 0.6rem; font-weight: bold; letter-spacing: 1px; }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface);
    color: #FFF;
    padding: 14px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    max-width: calc(100% - 40px);
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { border-left-color: var(--ok); }
.toast-warn { border-left-color: var(--warn); }
.toast-error { border-left-color: var(--danger); }

/* ============ DAYLIGHT BOOST ============ */
body.daylight-boost {
    --text-muted: #C8C8CE;
    --surface: #2A2A2D;
    --surface-light: #3A3A3D;
}
body.daylight-boost .intel-box { color: #FFF; font-weight: 500; font-size: 0.95rem; }
body.daylight-boost .milestone { border: 1px solid rgba(212,175,55,0.35); }
body.daylight-boost .geo-btn { font-size: 0.95rem; border-width: 2px; font-weight: 800; background: rgba(212, 175, 55, 0.2); }
body.daylight-boost .geo-btn.danger { background: rgba(165, 42, 42, 0.25); color: #ff9999; }
body.daylight-boost .gps-coords { font-size: 1.3rem; }
body.daylight-boost .distance-bar { background: rgba(0,0,0,0.55); border-color: rgba(212,175,55,0.3); }
body.daylight-boost .distance-bar .dist-val { font-size: 1.15rem; }
body.daylight-boost .nav-item { color: #BBB; }
body.daylight-boost .nav-item .label { font-size: 0.7rem; }
body.daylight-boost .op-hero-intel { color: #FFF; font-weight: 500; }
body.daylight-boost .phase-narrative { color: #CCC; }
body.daylight-boost .milestone-subtitle { color: #f5c84a; }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============ SCRIPT BLOCK (narration lisible) ============ */
.script-block {
    margin-bottom: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
}
.script-toggle {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--accent);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    min-height: 48px;
    transition: background 0.15s;
}
.script-toggle:active,
.script-toggle:hover {
    background: rgba(212, 175, 55, 0.08);
}
.script-toggle-icon { font-size: 1.1rem; }
.script-toggle-label { flex: 1; text-align: left; }
.script-toggle-duration {
    color: var(--text-muted);
    font-weight: normal;
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-style: italic;
}
.script-toggle-chevron {
    font-size: 0.85rem;
    transition: transform 0.25s;
    color: var(--text-muted);
}
.script-block.expanded .script-toggle-chevron { transform: rotate(180deg); }

.script-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
}
.script-block.expanded .script-content {
    max-height: 5000px;
    padding: 4px 16px 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}
.script-content p {
    font-size: 0.9rem;
    color: #DDD;
    line-height: 1.7;
    margin: 12px 0;
    font-family: Georgia, 'Times New Roman', serif;
}
.script-content p:first-child {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: bold;
    font-family: inherit;
    margin-top: 14px;
}

/* Daylight boost : script plus lisible au soleil */
body.daylight-boost .script-content p { color: #FFF; font-size: 1rem; }

/* ============ RESPONSIVE — DESKTOP (≥ 768px) ============ */
@media (min-width: 768px) {
    body {
        background:
            radial-gradient(ellipse at top, rgba(75, 83, 32, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
            linear-gradient(180deg, #050506 0%, #0A0A0B 100%);
        min-height: 100vh;
        position: relative;
    }

    /* Grille tactical discrète en fond, visible uniquement en dehors de l'app */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image:
            linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
            linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
        background-size: 40px 40px;
        pointer-events: none;
        z-index: 0;
    }

    /* L'app reste en colonne mobile-like mais centrée avec bordures subtiles */
    .tactical-header,
    .bottom-nav {
        max-width: 560px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        border-left: 1px solid rgba(212, 175, 55, 0.12);
        border-right: 1px solid rgba(212, 175, 55, 0.12);
    }

    main#app-viewport {
        max-width: 560px;
        margin: 0 auto;
        min-height: calc(100vh - 130px);
        background: linear-gradient(180deg, rgba(14, 14, 16, 0.92) 0%, rgba(10, 10, 11, 0.88) 100%);
        border-left: 1px solid rgba(212, 175, 55, 0.12);
        border-right: 1px solid rgba(212, 175, 55, 0.12);
        position: relative;
        z-index: 1;
    }

    /* Texte tactical décoratif dans les marges vides (très grands écrans) */
    body::after {
        content: "OPERATION TACTICAL · BATAILLE DE NORMANDIE · 6 JUIN → 25 AOÛT 1944";
        position: fixed;
        top: 50%;
        right: 20px;
        transform: rotate(90deg);
        transform-origin: right center;
        font-size: 0.65rem;
        letter-spacing: 8px;
        color: rgba(212, 175, 55, 0.12);
        font-weight: bold;
        pointer-events: none;
        white-space: nowrap;
        z-index: 0;
    }
}

/* Très grands écrans : flourish supplémentaire */
@media (min-width: 1200px) {
    body::after {
        right: 5%;
        font-size: 0.7rem;
    }
}

/* Hover states desktop (pas de :active qui est pour le touch) */
@media (hover: hover) and (min-width: 768px) {
    .module-card:hover { background: var(--surface-light); transform: translateX(2px); transition: all 0.2s; }
    .geo-btn:hover { background: rgba(212, 175, 55, 0.2); }
    .nav-item:hover { color: var(--accent); opacity: 0.8; }
    .audio-play-btn:hover { transform: scale(1.05); }
    .script-toggle:hover { background: rgba(212, 175, 55, 0.1); }
}

/* ============ APP SIGNATURE (watermark anti-vol) ============ */
.app-signature {
    margin: 40px 20px 20px;
    padding: 20px 16px;
    text-align: center;
    border-top: 1px dashed rgba(212, 175, 55, 0.15);
}
.sig-copyright {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 6px;
}
.sig-mention {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.sig-warning {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: #555;
    font-style: italic;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
}

/* ============ FILIGRANE ANTI-COPIE ============ */
.watermark-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    display: none;
}
body.watermarked .watermark-layer { display: block; }

.watermark-layer .wm-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: 13px;
    color: rgba(212, 175, 55, 0.055);
    transform: rotate(-28deg);
    white-space: nowrap;
    letter-spacing: 4px;
    user-select: none;
    text-transform: uppercase;
    font-weight: 400;
}

/* Mode jour (daylight-boost) : le fond reste sombre, donc on garde
   le filigrane doré mais avec opacité plus marquée pour la meilleure
   visibilité sous forte luminosité extérieure. */
body.daylight-boost .watermark-layer .wm-text {
    color: rgba(212, 175, 55, 0.13);
    font-weight: 500;
}

/* ============ ADMIN LOG : type + durée ============ */
.admin-log-entry.log-login { border-left: 2px solid var(--ok); }
.admin-log-entry.log-logout { border-left: 2px solid var(--text-muted); }

.admin-log-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 3px;
    margin-bottom: 3px;
    font-family: var(--font-body);
}
.admin-log-type .log-duration {
    display: inline-block;
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent);
    padding: 1px 8px;
    border-radius: 4px;
    margin-left: 6px;
    font-size: 0.72rem;
    font-family: var(--font-display);
    letter-spacing: 1.5px;
}

/* ============ BIO PIERRE — LOCK SCREEN ============ */
.lock-author {
    text-align: center;
    max-width: 340px;
    margin: 0 auto 18px;
    animation: fadeUp 0.7s 0.35s ease-out both;
}
.lock-author-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: 5px;
    margin-bottom: 4px;
}
.lock-author-title {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #CCC;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.lock-author-body {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============ BIO PIERRE — ACCUEIL ============ */
.about-signature {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: 3px;
    border-left: 3px solid var(--accent);
    padding-left: 14px;
    margin: 0 0 20px 0 !important;
    line-height: 1.5;
}
.about-pitch {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: #E5C04A;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 16px 0;
    margin: 24px 0 !important;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ============ HEADER ACTIONS (daylight + logout) ============ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logout-btn {
    background: transparent;
    border: 1px solid rgba(165, 42, 42, 0.25);
    color: var(--danger);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.logout-btn:active {
    background: rgba(165, 42, 42, 0.15);
    transform: scale(0.94);
}
@media (hover: hover) {
    .logout-btn:hover {
        background: rgba(165, 42, 42, 0.12);
        border-color: var(--danger);
    }
}

/* ============ SCROLL-TO-TOP FAB ============ */
.scroll-top-btn {
    position: fixed;
    bottom: 80px; /* au-dessus de la bottom-nav */
    right: 18px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(30, 30, 32, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    transform: translateY(10px);
    z-index: 500;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-btn:active {
    background: rgba(212, 175, 55, 0.18);
    transform: scale(0.92);
}
@media (hover: hover) {
    .scroll-top-btn:hover {
        background: rgba(212, 175, 55, 0.12);
        border-color: var(--accent);
    }
}

/* Mode jour : adapte l'apparence */
body.daylight-boost .scroll-top-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.3);
    color: #333;
}
