:root {
    --accent: #3F58A8;
    --accent-2: #227C8C;
    --glow: #A9B9E8;
    --selection-bg: #17264A;
    --on-accent: #FFFFFF;
    --accent-rgb: 63, 88, 168;
    --accent-2-rgb: 34, 124, 140;
    --action-gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
    --bg-color: #020617;
    --bg-image: url("../img/bg-night.avif");
    --bg-overlay: rgba(0, 0, 0, 0.45);
    --card-bg: rgba(10, 18, 32, 0.72);
    --accent-primary: var(--accent);
    --accent-secondary: var(--accent-2);
    --accent-tertiary: var(--glow);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --error-bg: rgba(255, 68, 68, 0.1);
    --error-text: #ff4d4d;
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-transition: 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radiant-primary: var(--accent);
    --radiant-secondary: var(--accent-2);
    --radiant-primary-rgb: var(--accent-rgb);
    --radiant-secondary-rgb: var(--accent-2-rgb);
    --scroll-bg-opacity: 0;
}


/* Time-of-day themes (auto via theme.js, manual via sun icon) */
html[data-theme="morning"] {
    --accent: #6483C6;
    --accent-mid: #B09BB6;
    --accent-2: #E4A67E;
    --glow: #F4D2B0;
    --selection-bg: #232C4A;
    --on-accent: #08101F;
    --accent-rgb: 100, 131, 198;
    --accent-2-rgb: 228, 166, 126;
    --action-gradient: linear-gradient(90deg, var(--accent), var(--accent-mid), var(--accent-2));
    --bg-color: #07121f;
    --bg-image: url("../img/bg-morning.avif");
    --bg-overlay: rgba(0, 0, 0, 0.35);
    --accent-primary: var(--accent);
    --accent-secondary: var(--accent-2);
    --accent-tertiary: var(--glow);
    --radiant-primary-rgb: var(--accent-rgb);
    --radiant-secondary-rgb: var(--accent-2-rgb);
}

html[data-theme="noon"] {
    --accent: #2369B1;
    --accent-2: #2B7BA8;
    --glow: #A8DDF1;
    --selection-bg: #0B3F63;
    --on-accent: #FFFFFF;
    --accent-rgb: 35, 105, 177;
    --accent-2-rgb: 43, 123, 168;
    --bg-color: #06121b;
    --bg-image: url("../img/bg-noon.avif");
    --bg-overlay: rgba(0, 0, 0, 0.28);
    --accent-primary: var(--accent);
    --accent-secondary: var(--accent-2);
    --accent-tertiary: var(--glow);
    --radiant-primary-rgb: var(--accent-rgb);
    --radiant-secondary-rgb: var(--accent-2-rgb);
}

html[data-theme="afternoon"] {
    --accent: #D98A2B;
    --accent-2: #E0764A;
    --glow: #F9D08A;
    --selection-bg: #2A3B52;
    --on-accent: #10243A;
    --accent-rgb: 217, 138, 43;
    --accent-2-rgb: 224, 118, 74;
    --bg-color: #12060e;
    --bg-image: url("../img/bg-afternoon.avif");
    --bg-overlay: rgba(0, 0, 0, 0.38);
    --accent-primary: var(--accent);
    --accent-secondary: var(--accent-2);
    --accent-tertiary: var(--glow);
    --radiant-primary-rgb: var(--accent-rgb);
    --radiant-secondary-rgb: var(--accent-2-rgb);
}

html[data-theme="night"] {
    --accent: #3F58A8;
    --accent-2: #227C8C;
    --glow: #A9B9E8;
    --selection-bg: #17264A;
    --on-accent: #FFFFFF;
    --accent-rgb: 63, 88, 168;
    --accent-2-rgb: 34, 124, 140;
    --bg-color: #020617;
    --bg-image: url("../img/bg-night.avif");
    --bg-overlay: rgba(0, 0, 0, 0.48);
    --accent-primary: var(--accent);
    --accent-secondary: var(--accent-2);
    --accent-tertiary: var(--glow);
    --radiant-primary-rgb: var(--accent-rgb);
    --radiant-secondary-rgb: var(--accent-2-rgb);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Stars canvas — sits below body::after (image, z-index:-2) and body::before (overlay, z-index:-1).
   Visible only when the /img background images are absent or fail to load. */
.stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    display: block;
}

body {
    background:
        linear-gradient(
            135deg,
            #020617 0%,
            #071227 25%,
            #0b132b 55%,
            #111c44 100%
        );
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 50px;
}



body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Image stable : le voile de scroll est peint sur ::before séparément. */
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    transform: translateZ(0);
    z-index: -2;
    /* Pas de transition de background-image pendant le défilement. */
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, transparent 0%, rgba(250, 250, 250, calc(var(--scroll-bg-opacity) * 0.3)) 100%),
        linear-gradient(to bottom, var(--bg-overlay), rgba(0, 0, 0, 0.55)),
        radial-gradient(circle at 20% 30%, rgba(var(--radiant-primary-rgb), 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(var(--radiant-secondary-rgb), 0.12) 0%, transparent 40%);
    z-index: -1;
}

.login-card,
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 48px;
    width: calc(100% - 40px);
    max-width: 420px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    margin: 60px auto;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

table td:first-child {
    color: var(--text-secondary);
    text-align: left;
}

table td:last-child {
    color: var(--text-primary);
    text-align: right;
    font-weight: 600;
}

.info-text {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

/* --- BOUTON DE SECOURS (FALLBACK) --- */
.btn-old {
    position: fixed;
    top: 15px; /* Positionné en haut */
    right: 15px; /* Positionné à droite */
    padding: 8px 16px;
    
    /* Fond sombre semi-transparent pour parer au bug du fond blanc */
    background: rgba(0, 0, 0, 0.75); 
    color: #ffffff;
    
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 10000; /* Toujours au-dessus de tout */
    font-family: Arial, sans-serif;
    
    /* Transition pour l'apparition en douceur */
    display: none; 
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.btn-old:hover {
    background: #000;
    border-color: #fff;
}

.btn-link {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--accent-secondary);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-secondary);
    color: #fff;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, var(--glow) 72%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.header p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px 18px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-smooth);
    outline: none;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-submit {
    width: 100%;
    background: var(--action-gradient);
    border: none;
    border-radius: 14px;
    padding: 16px;
    color: var(--on-accent);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 10px 30px rgba(var(--radiant-primary-rgb), 0.35);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(var(--radiant-primary-rgb), 0.5);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-qr {
    width: 100%;
    background: rgba(var(--accent-2-rgb), 0.1);
    border: 1.5px solid var(--accent-secondary);
    border-radius: 14px;
    padding: 14px;
    color: var(--accent-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.btn-qr:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: var(--on-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--accent-2-rgb), 0.3);
}

.btn-qr:active {
    transform: translateY(0);
}

.qr-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

#reader {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid var(--glass-border);
    display: none;
}

#reader video {
    width: 100% !important;
    min-height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

.error-msg {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    border: 1.5px solid rgba(255, 68, 68, 0.3);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-section {
    margin-top: 40px;
    width: calc(100% - 40px);
    max-width: 400px;
    text-align: center;
}

.price-title {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.price-title-data {
    font-size: 14px;
    color: #c7ede9;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.price-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.price-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--accent-2-rgb), 0.2);
}

/* Offre hebdomadaire : lisible même sur la zone claire de l'image horaire. */
.price-card[data-prefix="S-"] {
    background: rgba(15, 27, 49, 0.96);
    background: linear-gradient(145deg, rgba(36, 54, 84, 0.96), rgba(17, 30, 54, 0.96));
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.price-card[data-prefix="S-"]:hover {
    background: rgba(20, 35, 62, 0.98);
    background: linear-gradient(145deg, rgba(43, 63, 98, 0.98), rgba(20, 35, 62, 0.98));
    border-color: var(--glow);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.price-card[data-prefix="S-"] .price-time { color: var(--glow); }

.price-card:active {
    transform: translateY(-1px);
}

.copy-container {
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.copy-info {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.btn-copy {
    width: 100%;
    background: rgba(var(--accent-2-rgb), 0.1);
    border: 1.5px solid var(--accent-secondary);
    border-radius: 12px;
    padding: 12px;
    color: var(--accent-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn-copy:hover {
    background: var(--accent-secondary);
    color: var(--on-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--accent-2-rgb), 0.3);
}

#fallback-url-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    display: none;
}

.price-time {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-secondary);
}

/* Gold Premium */

.price-timeX {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(
        90deg,
        #8f6a12,
        #f5c842,
        #fff2a6,
        #d9a92e
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(245, 200, 66, 0.22);
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
}

.price-amountX {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(
        90deg,
        #8f6a12,
        #f5c842,
        #fff2a6,
        #d9a92e
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(245, 200, 66, 0.22);
}

.price-DataX {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(
        90deg,
        #8f6a12,
        #f5c842,
        #fff2a6,
        #d9a92e
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(245, 200, 66, 0.22);
}

.price-amount-data {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff; /* blanc premium pour le montant */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
}

.footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-secondary);
}

.trial-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
}

#reader {
    width: 100%;
    max-width: 350px;
    margin: 20px auto;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
    display: none;
}

#reader video {
    width: 100% !important;
    height: auto !important;
    border-radius: 14px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .login-card,
    .main-card {
        width: calc(100% - 24px);
        padding: 30px 16px;
    }

    .login-card {
        margin: 54px auto 24px;
    }

    .main-card {
        margin: 30px auto 16px;
        overflow-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .price-section {
        width: calc(100% - 24px);
        margin-top: 16px;
    }

    .price-card {
        padding: 16px;
        gap: 10px;
    }

    .price-card > :last-child {
        white-space: nowrap;
    }

    .header {
        padding-top: 20px;
        margin-bottom: 24px;
    }

    .login-card .header {
        padding-top: 40px;
    }

    .header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .header p {
        font-size: 14px;
    }

    #reader {
        max-width: 100%;
    }
}


/* Language Selector */
.lang-selector {
    position: absolute;
    top: 16px;
    right: 72px;
    /* Next to theme toggle */
    z-index: 100;
}

.lang-current {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(15, 20, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all var(--transition-smooth);
}

.lang-selector:hover .lang-current {
    border-color: var(--accent-secondary);
    background: rgba(15, 20, 30, 0.6);
}

.lang-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(15, 20, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-smooth);
}

.lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile touch device state - active class replaces hover */
@media (hover: none) and (pointer: coarse) {
    .lang-selector:hover .lang-current,
    .lang-selector:hover .lang-dropdown {
        /* Disable hover effects on touch devices */
    }
    
    .lang-selector.active .lang-current {
        border-color: var(--accent-secondary);
        background: rgba(15, 20, 30, 0.6);
    }
    
    .lang-selector.active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.lang-option {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
    .lang-selector {
        right: 56px;
        top: 12px;
    }

    .lang-current {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .lang-dropdown {
        top: 42px;
    }

    .lang-option {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Theme toggle (sun icon) */
.theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(15, 20, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: grid;
    place-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all var(--transition-smooth);
}

.theme-toggle:hover {
    background: rgba(15, 20, 30, 0.6);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(var(--accent-2-rgb), 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2;
    opacity: 0.95;
    transition: transform var(--transition-smooth);
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}

.theme-toggle:active {
    transform: scale(0.96);
}

/* Password eye toggle */
.password-group {
    position: relative;
}

.password-group input {
    padding-right: 52px;
    /* espace pour l’icône œil */
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-secondary);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.98);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.9;
}

/* Par défaut: œil ouvert visible, œil barré caché */
.toggle-password .eye-closed {
    display: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Quand le mot de passe est visible */
.toggle-password.is-visible .eye-open {
    display: none;
}

.toggle-password.is-visible .eye-closed {
    display: inline;
}

/* Tutorial section - smooth gradient transition */
.tutorial-spacer {
    height: 220px;
    height: clamp(96px, 23vw, 360px);
    width: 100%;
    position: relative;
    z-index: 1;
    pointer-events: none;
    /* This ensures the transition always tends towards the tutorial section background color */
    --transition-color: #ffffff;
}

.tutorial-spacer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.02) 10%,
            rgba(0, 0, 0, 0.2) 35%,
            rgba(0, 0, 0, 0.7) 70%,
            black 100%);
    -webkit-mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.02) 10%,
            rgba(0, 0, 0, 0.2) 35%,
            rgba(0, 0, 0, 0.7) 70%,
            black 100%);
}

.tutorial-spacer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 255, 255, 0) 10%,
            rgba(255, 255, 255, 0.4) 40%,
            rgba(255, 255, 255, 0.8) 75%,
            var(--transition-color) 100%);
}

.tutorial-section {
    width: 100%;
    background: #ffffff;
    padding: 60px 20px;
    padding: clamp(40px, 7vw, 100px) 20px;
    position: relative;
    z-index: 0;
    background-attachment: scroll;
    overflow: hidden;
}

/* Les rubans se fondent dans les bords avant la jonction avec le bandeau. */
.tutorial-ribbon {
    position: absolute;
    top: 0;
    width: 22vw;
    max-width: 300px;
    height: 100%;
    pointer-events: none;
}

.tutorial-ribbon-left { left: 0; }
.tutorial-ribbon-right { right: 0; }

@media (max-width: 760px) {
    .tutorial-ribbon {
        width: 11vw;
        max-width: 68px;
        opacity: 0.65;
    }
}

.tutorial-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.tutorial-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tutorial-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 0;
    color: #1a2332;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mute-toggle {
    flex: 0 0 36px;
    background: #f0f2f5;
    border: 1px solid #d1d9e6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5a7a;
    transition: all 0.2s ease;
    padding: 0;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mute-toggle:hover {
    background: #e4e7eb;
    color: #1a2332;
    transform: scale(1.05);
}

.mute-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.mute-toggle .volume-on {
    display: none;
}

.mute-toggle.is-unmuted .volume-off {
    display: none;
}

.mute-toggle.is-unmuted .volume-on {
    display: block;
}

.tutorial-subtitle {
    color: #4a5a7a;
    font-size: 16px;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

/* Smartphone frame */
.phone-frame {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    height: 560px; /* dimension explicite pour anciens navigateurs */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 40px;
    border: 8px solid #0f0f1e;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    overflow: visible;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* Primary decorative accent behind phone frame */
.phone-frame::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(40px);
}

/* Secondary decorative accent with different theme color */
.phone-frame::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(var(--accent-2-rgb), 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(35px);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #0f0f1e;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

@supports (aspect-ratio: 1 / 2) {
    .phone-frame { height: auto; aspect-ratio: 1 / 2; }
    .phone-screen { position: absolute; top: 0; left: 0; }
}

.phone-screen {
    width: 100%;
    height: 100%;
    padding: 32px 0 32px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 36px;
}

.phone-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 32px;
    display: block;
}

.phone-video.video-playing {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.phone-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 20px;
    background: #0f0f1e;
    border-radius: 20px 20px 0 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .phone-frame {
        max-width: 240px;
        height: 480px;
    }

    @supports (aspect-ratio: 1 / 2) {
        .phone-frame {
            max-width: min(240px, 42vh);
            height: auto;
        }
    }

    .tutorial-title {
        font-size: 24px;
    }

    .tutorial-subtitle {
        font-size: 14px;
    }
}


/* ============================================================
   CARTE DATA RESTANT — intégrée depuis Status-Total-Bytes
   ============================================================ */
:root {
    --data-good: #10b981;
    --data-warn: #f59e0b;
    --data-crit: #ef4444;
}

.data-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 22px 26px 18px;
    width: calc(100% - 40px);
    max-width: 420px;
    margin-top: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    box-shadow:
        0 12px 30px -8px rgba(0, 0, 0, 0.4),
        0 0 18px rgba(6, 182, 212, 0.07);
}

.data-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.data-card-header svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: 0.65;
}

.data-card-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.data-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 18px;
    line-height: 1;
}

.data-value {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.data-unit {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 4px;
}

.data-used {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    min-height: 16px;
}

.data-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 9px;
}

.data-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--accent-secondary);
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}

.data-bar-fill.good {
    background: linear-gradient(90deg, #059669, #06b6d4);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

.data-bar-fill.warn {
    background: linear-gradient(90deg, #d97706, #fbbf24);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.data-bar-fill.crit {
    background: linear-gradient(90deg, #dc2626, #f97316);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.data-status {
    font-size: 11px;
    font-weight: 500;
    text-align: right;
    letter-spacing: 0.3px;
    min-height: 16px;
}

.data-status.good { color: var(--data-good); }
.data-status.warn { color: var(--data-warn); }
.data-status.crit { color: var(--data-crit); }


/* ============================================================
   CARTE INSTALLATION PWA — intégrée depuis Status-Install-PWA
   ============================================================ */
.wdt-install-card {
    max-width: 420px;
    width: calc(100% - 40px);
    margin: 16px auto 0;
    padding: 22px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 0%, rgba(var(--accent-2-rgb), 0.22), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(var(--accent-rgb), 0.28), transparent 60%),
        linear-gradient(160deg, rgba(20, 12, 40, 0.92), rgba(8, 14, 28, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 12px 36px rgba(var(--accent-rgb), 0.25),
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f5f7fa;
    z-index: 1;
}

.wdt-install-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb),.6), rgba(var(--accent-2-rgb),.6), rgba(var(--accent-rgb),.6));
    background-size: 200% 200%;
    animation: wdt-border-shine 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@keyframes wdt-border-shine {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.wdt-install-card__top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wdt-install-card__phone {
    flex: 0 0 64px;
    width: 64px;
    height: 110px;
    border-radius: 14px;
    background: linear-gradient(160deg, #1a1f2c, #0a0d14);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wdt-install-card__phone::before {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
}

.wdt-install-card__phone img {
    width: 42px; height: 42px;
    border-radius: 10px;
    object-fit: contain;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    padding: 4px;
    box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.55);
    animation: wdt-phone-float 3.6s ease-in-out infinite;
}

@keyframes wdt-phone-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-3px); }
}

.wdt-install-card__title-block {
    flex: 1;
    min-width: 0;
}

.wdt-install-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 6px;
}

.wdt-install-card__eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 8px var(--accent-2);
    animation: wdt-pulse 1.6s ease-in-out infinite;
}

@keyframes wdt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.wdt-install-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 4px;
    line-height: 1.2;
    color: #fff;
}

.wdt-install-card__sub {
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.4;
    color: rgba(245, 247, 250, 0.72);
}

.wdt-install-card__perks {
    display: flex;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.wdt-install-card__perks li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(245, 247, 250, 0.85);
}

.wdt-install-card__perks svg {
    width: 12px; height: 12px;
    color: var(--accent-2);
    flex: 0 0 12px;
}

.wdt-install-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 13px 18px;
    border-radius: 12px;
    background: var(--action-gradient);
    color: var(--on-accent) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    box-shadow:
        0 8px 22px rgba(var(--accent-rgb), 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wdt-install-card__cta:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(var(--accent-2-rgb), 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.05);
}

.wdt-install-card__cta:active { transform: scale(0.98); }
.wdt-install-card__cta svg { width: 16px; height: 16px; }

@media (max-width: 360px) {
    .wdt-install-card { padding: 18px; }
    .wdt-install-card__phone { width: 56px; height: 96px; flex-basis: 56px; }
    .wdt-install-card__phone img { width: 36px; height: 36px; }
}

body.low-performance .wdt-install-card::before,
body.low-performance .wdt-install-card__phone img,
body.low-performance .wdt-install-card__eyebrow::before {
    animation: none !important;
}

body.low-performance .wdt-install-card__cta { transition: none; }
/* Le dernier bandeau est purement décoratif et ne recouvre pas la vidéo. */
.login-page { padding-bottom: 0; }
.portal-ending { position:relative; z-index:0; width:100%; height:250px; height:clamp(120px, 31vw, 420px); flex:none; background:var(--selection-bg); overflow:hidden; margin-top:-1px; }
.portal-ending svg { display:block; width:100%; height:100%; }
.tutorial-video-message { max-width:360px; margin:22px auto 0; padding:12px 16px; color:#51416d; background:#f2eff9; border-radius:12px; font-size:13px; line-height:1.5; }
.tutorial-video-message[hidden] { display:none; }

.login-page {
    --decor-1: #eef2fc;
    --decor-2: #d4def5;
    --decor-3: #a9b9e8;
    --decor-4: #718ac8;
    --decor-5: #e8f2f6;
    --decor-6: #b8d8e0;
    --decor-7: #83b7c8;
    --decor-8: #227c8c;
    --decor-9: #17264a;
    --decor-10: #23406e;
    --decor-11: #1c325d;
    --decor-12: #243b67;
    --decor-13: #3f58a8;
    --decor-14: #7398ba;
    --decor-15: #e2eaf8;
}

html[data-theme="morning"] .login-page {
    --decor-1: #fff2e7;
    --decor-2: #f4d2b0;
    --decor-3: #e4a67e;
    --decor-4: #b09bb6;
    --decor-5: #f5f1fa;
    --decor-6: #e1d9ef;
    --decor-7: #b7c8e9;
    --decor-8: #6483c6;
    --decor-9: #232c4a;
    --decor-10: #354061;
    --decor-11: #2d3657;
    --decor-12: #404a70;
    --decor-13: #728cc1;
    --decor-14: #c4a5aa;
    --decor-15: #f7e9df;
}

html[data-theme="noon"] .login-page {
    --decor-1: #ebf7fc;
    --decor-2: #ccebf6;
    --decor-3: #a8ddf1;
    --decor-4: #67b8d4;
    --decor-5: #eaf2fa;
    --decor-6: #c5def1;
    --decor-7: #8dbad9;
    --decor-8: #2b7ba8;
    --decor-9: #0b3f63;
    --decor-10: #17557d;
    --decor-11: #124a70;
    --decor-12: #1d5882;
    --decor-13: #2369b1;
    --decor-14: #73c2d9;
    --decor-15: #e6f4fa;
}

html[data-theme="afternoon"] .login-page {
    --decor-1: #fff5e7;
    --decor-2: #f9d08a;
    --decor-3: #eab36f;
    --decor-4: #d98a2b;
    --decor-5: #f9f2e8;
    --decor-6: #f1d9bf;
    --decor-7: #e9ae91;
    --decor-8: #e0764a;
    --decor-9: #2a3b52;
    --decor-10: #3b4d63;
    --decor-11: #33435b;
    --decor-12: #465870;
    --decor-13: #ad7540;
    --decor-14: #e6a26c;
    --decor-15: #f8e9d6;
}

.tutorial-ribbon path,
.portal-ending path,
.portal-ending rect { transition: fill .28s ease; }
.portal-ending { background-color: var(--decor-9, #17264a); }

.decor-layer-1 { fill: var(--decor-1); }

.decor-layer-2 { fill: var(--decor-2); }

.decor-layer-3 { fill: var(--decor-3); }

.decor-layer-4 { fill: var(--decor-4); }

.decor-layer-5 { fill: var(--decor-5); }

.decor-layer-6 { fill: var(--decor-6); }

.decor-layer-7 { fill: var(--decor-7); }

.decor-layer-8 { fill: var(--decor-8); }

.decor-layer-9 { fill: var(--decor-9); }

.decor-layer-10 { fill: var(--decor-10); }

.decor-layer-11 { fill: var(--decor-11); }

.decor-layer-12 { fill: var(--decor-12); }

.decor-layer-13 { fill: var(--decor-13); }

.decor-layer-14 { fill: var(--decor-14); }

.decor-layer-15 { fill: var(--decor-15); }

/* Carte des tarifs Wi-Fi */
.wifi-rates {
    --rates-accent: var(--glow);
    --rates-muted: #9fb0c4;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 380px;
    padding: 22px 20px 20px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(160deg,#182234,#0a0f1a);
    color: #f2f6fb;
    box-shadow: 0 24px 60px -12px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
    font: 400 16px/1.25 Inter, system-ui, sans-serif;
    text-align: left;
    letter-spacing: normal;
}
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    .wifi-rates {
        background: linear-gradient(160deg,rgba(24,34,52,.80),rgba(10,15,26,.90));
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        backdrop-filter: blur(20px) saturate(150%);
    }
}
.wifi-rates::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg,transparent,var(--rates-accent),transparent);
    pointer-events: none;
}
.wifi-rates *, .wifi-rates *::before { box-sizing: border-box; font-family: inherit; }
.wifi-rates-header { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; }
.wifi-rates-mark, .wifi-rate-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--rates-accent);
    background: rgba(var(--accent-rgb),.10);
    border: 1px solid rgba(var(--accent-rgb),.22);
}
.wifi-rates-mark { width: 46px; height: 46px; border-radius: 14px; }
.wifi-rate-icon { width: 38px; height: 38px; border-radius: 11px; }
.wifi-rates svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.wifi-rates-mark svg { width: 24px; height: 24px; }
.wifi-rates-brand {
    display: block;
    margin-bottom: 3px;
    color: var(--rates-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.wifi-rates h2 {
    margin: 0;
    color: inherit;
    font: 600 30px/1.06 Fraunces, Georgia, serif;
}
.wifi-rates-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wifi-rate {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: rgba(255,255,255,.06);
}
.wifi-rate-featured {
    background: rgba(var(--accent-rgb),.13);
    border-color: rgba(var(--accent-rgb),.38);
}
.wifi-rate-name { font-size: 18px; font-weight: 700; }
.wifi-rate-name small {
    display: block;
    margin-top: 3px;
    color: var(--rates-muted);
    font-size: 13px;
    font-weight: 400;
}
.wifi-rate-price {
    align-self: stretch;
    display: grid;
    place-content: center end;
    min-width: 94px;
    padding-left: 10px;
    border-left: 1.5px dashed rgba(255,255,255,.22);
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wifi-rate-price small { color: var(--rates-muted); font-size: 11px; font-weight: 500; }
.wifi-rate-badge {
    position: absolute;
    top: 0;
    right: 11px;
    transform: translateY(-50%);
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--rates-accent);
    color: #102624;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.wifi-rates-location { margin: 15px 0 0; color: var(--rates-muted); font-size: 13px; }
.wifi-rates-location strong { color: #f2f6fb; }
@media (max-width: 380px) {
    .wifi-rates { padding-right: 13px; padding-left: 13px; }
    .wifi-rate { gap: 7px; padding-right: 9px; padding-left: 9px; }
    .wifi-rate-price { min-width: 78px; padding-left: 7px; font-size: 20px; }
    .wifi-rate-name { font-size: 16px; }
    .wifi-rate-name small { font-size: 12px; }
}
/* L'affiche garde ses marges dans la page publicitaire. */
.wrap > .wifi-rates { width: calc(100% - 28px); margin: 28px auto 55px; }
.login-feedback { font-size:13px; line-height:1.5; margin-top:12px; color:var(--text-secondary); }
.login-feedback:empty { display:none; }
.btn-submit:disabled { opacity:.7; cursor:wait; }
.price-card[role="button"]:focus { outline:3px solid var(--glow); outline-offset:4px; }
@media(max-width:600px) {
 .login-card,.main-card { backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); box-shadow:0 8px 22px rgba(0,0,0,.2); }
 .phone-frame::before,.phone-frame::after { display:none; }
}
html[data-effects="reduced"] *,html[data-effects="reduced"] *::before,html[data-effects="reduced"] *::after { animation:none!important; transition:none!important; backdrop-filter:none!important; -webkit-backdrop-filter:none!important; }
html[data-effects="reduced"] .login-card,html[data-effects="reduced"] .main-card { background:#10192b; }
html[data-effects="reduced"] body::before {
    --scroll-bg-opacity: 0;
}

html[data-effects="reduced"] .phone-frame::before,html[data-effects="reduced"] .phone-frame::after { display:none; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }

/* Tutoriel : zone de lecture et commandes discrètes. */
.phone-frame { --tutorial-inset: clamp(18px, 5.5vh, 32px); }
.phone-screen { position: relative; padding-block: var(--tutorial-inset); }
@supports (aspect-ratio: 1 / 2) {
    .phone-screen { position: absolute; }
}
.phone-notch {
    width: min(120px, 46%);
    height: calc(var(--tutorial-inset) - 4px);
    pointer-events: none;
}
.phone-bottom {
    width: min(130px, 50%);
    height: calc(var(--tutorial-inset) * .6);
    pointer-events: none;
}
.tutorial-video-surface {
    position: absolute;
    inset: var(--tutorial-inset) 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 22px;
    background: radial-gradient(ellipse at center, #243856, #0b1323 75%);
    cursor: pointer;
}
.tutorial-video-surface[hidden], .tutorial-video-controls[hidden], .tutorial-video-action[hidden] { display: none; }
.has-video-frame .tutorial-video-surface { background: rgba(10, 18, 32, .28); }
.is-video-playing .tutorial-video-surface { background: transparent; }
.tutorial-video-action {
    border: 1px solid #a1b9cc;
    border-radius: 18px;
    background: #102035;
    color: #fff;
    padding: 8px 10px;
    font-size: 13px;
}

.tutorial-video-controls {
    position: absolute;
    inset: auto 8px var(--tutorial-inset);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 12px;
    background: rgba(10, 18, 32, .9);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}
.show-video-controls .tutorial-video-controls {
    opacity: 1;
    pointer-events: auto;
}
.tutorial-video-controls:has(:focus-visible) { opacity: 1; pointer-events: auto; }
.tutorial-video-progress { min-width: 0; width: 100%; accent-color: var(--accent); }

.lang-dropdown[hidden]{display:none!important}.lang-selector.active .lang-dropdown{display:block;opacity:1;visibility:visible;pointer-events:auto;transform:none}.lang-current,.lang-option{appearance:none;-webkit-appearance:none;padding:0;color:inherit;font-family:inherit;line-height:1}.lang-option{border:0;background:transparent}.lang-selector button:focus-visible{outline:2px solid currentColor}

/* Repli photo du scanner : feuille légère, assortie au thème horaire. */
.qr-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.qr-photo-dialog[hidden], .qr-photo-actions[hidden], .qr-photo-loading[hidden] { display: none !important; }
#qr-photo-reader {
    position: fixed;
    left: -9999px;
    top: 0;
    width: min(100vw, 400px);
    height: 1px;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}
.qr-photo-dialog {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background: rgba(5, 14, 29, .76);
}
.qr-photo-dialog.is-opening { animation: qr-photo-shade-in 220ms ease-out both; }
.qr-photo-dialog.is-opening .qr-photo-panel { animation: qr-photo-panel-in 240ms cubic-bezier(.18,.7,.28,1) both; }
.qr-photo-dialog.is-closing { pointer-events: none; animation: qr-photo-shade-out 190ms ease-in both; }
.qr-photo-dialog.is-closing .qr-photo-panel { animation: qr-photo-panel-out 190ms ease-in both; }
@keyframes qr-photo-shade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes qr-photo-shade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes qr-photo-panel-in {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes qr-photo-panel-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(5px) scale(.985); }
}
.qr-photo-panel {
    width: min(100%, 390px);
    box-sizing: border-box;
    padding: 26px 22px 22px;
    border: 1px solid var(--accent);
    border-radius: 24px;
    background: var(--selection-bg, #17264a);
    color: #f5f9ff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .4);
    text-align: center;
}
.qr-photo-emblem {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--accent);
    border-radius: 16px;
    color: var(--glow, #a8ddf1);
}
.qr-photo-emblem svg { display: block; width: 32px; height: 32px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.qr-no-camera-body { stroke: var(--glow, #a8ddf1); stroke-width: 2.4; }
.qr-no-camera-slash { stroke: #f08c7d; stroke-width: 3.6; }
.qr-photo-panel p { margin: 18px 0 24px; line-height: 1.5; font-size: 16px; }
.qr-photo-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 24px; margin: -8px 0 12px; }
.qr-photo-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--glow, #a8ddf1); animation: qr-photo-pulse 1s ease-in-out infinite; }
.qr-photo-loading span:nth-child(2) { animation-delay: .15s; }
.qr-photo-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes qr-photo-pulse { 0%, 65%, 100% { opacity: .35; transform: translateY(0) scale(.85); } 30% { opacity: 1; transform: translateY(-5px) scale(1); } }
.qr-photo-actions { display: flex; gap: 10px; }
.qr-photo-actions button {
    min-width: 0;
    flex: 1;
    min-height: 46px;
    border-radius: 13px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.qr-photo-yes { border: 1px solid var(--accent); background: linear-gradient(110deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.qr-photo-no { border: 1px solid rgba(220, 235, 255, .4); background: transparent; color: #f5f9ff; }
.qr-photo-actions button:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .qr-photo-dialog.is-opening, .qr-photo-dialog.is-closing,
    .qr-photo-dialog.is-opening .qr-photo-panel, .qr-photo-dialog.is-closing .qr-photo-panel { animation: none; }
    .qr-photo-loading span { animation: none; opacity: 1; transform: none; }
}
html[data-effects="reduced"] .qr-photo-dialog,
html[data-effects="reduced"] .qr-photo-panel,
.low-performance .qr-photo-dialog,
.low-performance .qr-photo-panel,
html[data-effects="reduced"] .qr-photo-loading span,
.low-performance .qr-photo-loading span { animation: none !important; }
