/* === Modales bienvenue/code d'accès, slogan animé, header mobile === */
        /* --- WELCOME MODAL --- */
        .welcome-modal {
            max-width: 500px;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            text-align: center;
            overflow: hidden;
            padding: 2.5rem 2rem 2rem 2rem !important;
            gap: 1rem !important;
        }
        .welcome-content {
            overflow-y: auto;
            flex: 1 1 auto;
            padding-right: 6px;
            margin-bottom: 0.5rem;
            text-align: center;
        }
        .welcome-content::-webkit-scrollbar {
            width: 4px;
        }
        .welcome-content::-webkit-scrollbar-track {
            background: transparent;
        }
        .welcome-content::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 4px;
        }
        .welcome-icon {
            font-size: 3rem;
            margin-bottom: 0.75rem;
            display: inline-block;
            transform-origin: 70% 70%;
            animation: wave 1.2s ease-in-out infinite alternate;
        }

        /* Accueil : texte à fort contraste dans les deux thèmes + hiérarchie claire */
        .welcome-modal .modal-desc {
            color: var(--text-primary);
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .welcome-lead {
            display: block;
            font-size: 1.05rem;
            font-weight: 800;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            line-height: 1.4;
        }

        .welcome-sub {
            display: block;
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }

        [data-theme="dark"] .welcome-sub {
            color: #cbd5e1; /* plus clair que --text-secondary en sombre pour rester lisible */
        }

        .welcome-license {
            display: block;
            margin-top: 1rem;
            padding: 0.85rem 1rem;
            border-radius: 0.85rem;
            text-align: left;
            background: rgba(225, 29, 72, 0.08);
            border: 1px solid rgba(225, 29, 72, 0.22);
            color: var(--text-primary);
            font-size: 0.85rem;
            line-height: 1.55;
        }

        [data-theme="dark"] .welcome-license {
            background: rgba(251, 113, 133, 0.12);
            border-color: rgba(251, 113, 133, 0.3);
        }

        .welcome-license-title {
            display: block;
            font-weight: 800;
            color: var(--accent);
            margin-bottom: 0.3rem;
            font-size: 0.9rem;
            letter-spacing: 0.01em;
        }
        .welcome-btn {
            background: var(--accent);
            color: #ffffff;
            border: none;
            padding: 0.875rem 1.5rem;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
            transition: opacity 0.2s, transform 0.1s;
            flex-shrink: 0;
        }
        .welcome-btn:hover {
            opacity: 0.9;
        }
        .welcome-btn:active {
            transform: scale(0.98);
        }
        /* FERMETURE DES MODALES — délibérément contrastée.
           En gris tertiaire, la croix se confondait avec le fond de la carte :
           on cherchait la sortie. Elle porte donc la couleur d'accent, dans
           une pastille légère qui lui donne une vraie surface — et une cible
           de 44 px au doigt, seuil en dessous duquel on rate le bouton. */
        .modal-close-icon {
            position: absolute;
            top: 0.85rem;
            right: 0.85rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            padding: 0;
            background: var(--danger-soft, rgba(225, 29, 72, 0.10));
            border: 1px solid var(--danger-border, rgba(225, 29, 72, 0.28));
            color: var(--danger, #e11d48);
            cursor: pointer;
            font-size: 1.35rem;
            line-height: 1;
            border-radius: 50%;
            z-index: 10;
            transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
        }
        .modal-close-icon:hover {
            background: var(--danger, #e11d48);
            color: #fff;
            border-color: var(--danger, #e11d48);
        }
        .modal-close-icon:active {
            transform: scale(0.94);
        }
        .modal-close-icon:focus-visible {
            outline: 2px solid var(--danger, #e11d48);
            outline-offset: 2px;
        }

        @keyframes wave {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(15deg); }
        }

        @media (max-width: 480px) {
            .welcome-modal {
                padding: 2rem 1.25rem 1.25rem 1.25rem !important;
                border-radius: 1.25rem;
                gap: 0.75rem !important;
                max-height: 90vh;
            }
            .welcome-icon {
                font-size: 2.25rem;
            }
            .welcome-btn {
                padding: 0.75rem 1.25rem;
                font-size: 0.95rem;
                border-radius: 10px;
            }
            .welcome-modal .modal-title {
                font-size: 1.2rem;
            }
            .welcome-modal .modal-desc {
                font-size: 0.825rem;
            }
        }

        /* --- PASSWORD MODAL --- */
        .password-modal {
            max-width: 420px;
            text-align: center;
            gap: 1.25rem !important;
            padding: 2.5rem 2rem 2.25rem 2rem !important;
        }
        .password-input-wrapper {
            width: 100%;
        }
        .password-input {
            width: 100%;
            padding: 0.875rem;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 1.1rem;
            font-weight: 600;
            text-align: center;
            text-transform: uppercase;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
            letter-spacing: 0.1em;
        }
        .password-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }
        .password-error {
            color: #ef4444;
            font-size: 0.85rem;
            margin-top: 0.5rem;
            display: none;
            font-weight: 550;
        }
        .shake {
            animation: shake 0.4s ease-in-out;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-6px); }
            40%, 80% { transform: translateX(6px); }
        }

        @media (max-width: 480px) {
            .password-modal {
                padding: 2rem 1.5rem 1.75rem 1.5rem !important;
            }
            .password-input {
                padding: 0.75rem;
                font-size: 1rem;
            }
        }

        /* --- SLOGAN ANIMÉ --- */
        .animated-slogan-section {
            text-align: center;
            margin: 3.5rem 0 3.5rem; /* Augmenté pour éviter de coller à la Hero Section */
            padding: 0 1rem;
        }

        .slogan-title {
            font-size: 2.2rem;
            font-weight: 850;
            color: var(--text-primary);
            letter-spacing: -0.03em;
            line-height: 1.3;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
        }

        .animated-system-wrapper {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 4.4rem; /* Ajusté pour contenir le soulignement plus présent */
            min-width: 280px;
            overflow: hidden;
        }

        .system-slide {
            position: absolute;
            left: 50%;
            top: 0;
            height: 100%;
            transform: translate(-50%, 25px);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            opacity: 0;
            font-size: 1.25em; /* Agrandit un peu plus la taille des noms des systèmes */
            font-weight: 900;
            transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            white-space: nowrap;
            padding-bottom: 20px; /* Ajusté pour le soulignement plus présent */
        }

        .system-slide.active {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        /* Soulignement élégant : courbe calligraphique lisse et épurée */
        .system-slide::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 4px; /* Placé précisément sous le texte */
            height: 10px; /* Épaisseur ajustée pour être visible mais élégante */
            background-color: currentColor;
            -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1,2 C25,5 75,5 99,2 C75,11 25,11 1,2 Z' fill='black'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1,2 C25,5 75,5 99,2 C75,11 25,11 1,2 Z' fill='black'/%3E%3C/svg%3E");
            -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            clip-path: inset(0 100% 0 0);
            transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
        }

        .system-slide.active::after {
            clip-path: inset(0 0% 0 0);
        }

        .sys-svg {
            width: 1.15em;
            height: 1.15em;
            fill: currentColor;
            display: inline-block;
            vertical-align: middle;
        }

        /* Couleurs et icônes spécifiques */
        .system-slide[data-sys="win"] {
            color: #0078d7;
        }
        .system-slide[data-sys="mac"] {
            color: #ea580c;
        }
        [data-theme="dark"] .system-slide[data-sys="mac"] {
            color: #f97316;
        }
        .system-slide[data-sys="lin"] {
            color: #10b981;
        }

        @media (max-width: 768px) {
            .animated-slogan-section {
                margin: 2rem 0 2.5rem; /* Augmenté pour le mobile */
            }
            .slogan-title {
                font-size: 1.45rem;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 0.5rem;
            }
            .animated-system-wrapper {
                height: 3rem; /* Ajusté pour éviter la découpe sur mobile */
                min-width: 200px;
            }
            .system-slide {
                font-size: 1.2em;
                transform: translate(-50%, 15px);
                padding-bottom: 14px; /* Ajusté */
                gap: 0.35rem;
            }
            .system-slide.active {
                transform: translate(-50%, 0);
            }
            .sys-svg {
                width: 1.15em;
                height: 1.15em;
            }
            .system-slide::after {
                height: 8px; /* Plus visible sur mobile */
font-size: 0.95rem;
                border-radius: 10px;
            }
            .welcome-modal .modal-title {
                font-size: 1.2rem;
            }
            .welcome-modal .modal-desc {
                font-size: 0.825rem;
            }
        }

        /* --- PASSWORD MODAL --- */
        .password-modal {
            max-width: 420px;
            text-align: center;
            gap: 1.25rem !important;
            padding: 2.5rem 2rem 2.25rem 2rem !important;
        }
        .password-input-wrapper {
            width: 100%;
        }
        .password-input {
            width: 100%;
            padding: 0.875rem;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 1.1rem;
            font-weight: 600;
            text-align: center;
            text-transform: uppercase;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
            letter-spacing: 0.1em;
        }
        .password-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }
        .password-error {
            color: #ef4444;
            font-size: 0.85rem;
            margin-top: 0.5rem;
            display: none;
            font-weight: 550;
        }
        .shake {
            animation: shake 0.4s ease-in-out;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-6px); }
            40%, 80% { transform: translateX(6px); }
        }

        @media (max-width: 480px) {
            .password-modal {
                padding: 2rem 1.5rem 1.75rem 1.5rem !important;
            }
            .password-input {
                padding: 0.75rem;
                font-size: 1rem;
            }
        }

        /* --- SLOGAN ANIMÉ --- */
        .animated-slogan-section {
            text-align: center;
            margin: 3.5rem 0 3.5rem; /* Augmenté pour éviter de coller à la Hero Section */
            padding: 0 1rem;
        }

        .slogan-title {
            font-size: 2.2rem;
            font-weight: 850;
            color: var(--text-primary);
            letter-spacing: -0.03em;
            line-height: 1.3;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
        }

        .animated-system-wrapper {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 4.4rem; /* Ajusté pour contenir le soulignement plus présent */
            min-width: 280px;
            overflow: hidden;
        }

        .system-slide {
            position: absolute;
            left: 50%;
            top: 0;
            height: 100%;
            transform: translate(-50%, 25px);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            opacity: 0;
            font-size: 1.25em; /* Agrandit un peu plus la taille des noms des systèmes */
            font-weight: 900;
            transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            white-space: nowrap;
            padding-bottom: 20px; /* Ajusté pour le soulignement plus présent */
        }

        .system-slide.active {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        /* Soulignement élégant : courbe calligraphique lisse et épurée */
        .system-slide::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 4px; /* Placé précisément sous le texte */
            height: 10px; /* Épaisseur ajustée pour être visible mais élégante */
            background-color: currentColor;
            -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1,2 C25,5 75,5 99,2 C75,11 25,11 1,2 Z' fill='black'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1,2 C25,5 75,5 99,2 C75,11 25,11 1,2 Z' fill='black'/%3E%3C/svg%3E");
            -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            clip-path: inset(0 100% 0 0);
            transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
        }

        .system-slide.active::after {
            clip-path: inset(0 0% 0 0);
        }

        .sys-svg {
            width: 1.15em;
            height: 1.15em;
            fill: currentColor;
            display: inline-block;
            vertical-align: middle;
        }

        /* Couleurs et icônes spécifiques */
        .system-slide[data-sys="win"] {
            color: #0078d7;
        }
        .system-slide[data-sys="mac"] {
            color: #ea580c;
        }
        [data-theme="dark"] .system-slide[data-sys="mac"] {
            color: #f97316;
        }
        .system-slide[data-sys="lin"] {
            color: #10b981;
        }

        @media (max-width: 768px) {
            .animated-slogan-section {
                margin: 2rem 0 2.5rem; /* Augmenté pour le mobile */
            }
            .slogan-title {
                font-size: 1.45rem;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 0.5rem;
            }
            .animated-system-wrapper {
                height: 3rem; /* Ajusté pour éviter la découpe sur mobile */
                min-width: 200px;
            }
            .system-slide {
                font-size: 1.2em;
                transform: translate(-50%, 15px);
                padding-bottom: 14px; /* Ajusté */
                gap: 0.35rem;
            }
            .system-slide.active {
                transform: translate(-50%, 0);
            }
            .sys-svg {
                width: 1.15em;
                height: 1.15em;
            }
            .system-slide::after {
                height: 8px; /* Plus visible sur mobile */
                bottom: 2px; /* Ajusté */
            }
        }
    
        .suggested-nav-group {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .suggested-prev-btn,
        .suggested-next-btn {
            background: var(--bg-filter);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            border-radius: 0.5rem;
            padding: 0.4rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .suggested-prev-btn:hover:not(:disabled) {
            border-color: var(--accent);
            background: var(--accent-light);
            color: var(--accent);
            transform: translateX(-2px);
        }

        .suggested-next-btn:hover:not(:disabled) {
            border-color: var(--accent);
            background: var(--accent-light);
            color: var(--accent);
            transform: translateX(2px);
        }

        .suggested-prev-btn:disabled,
        .suggested-next-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .suggested-prev-btn svg,
        .suggested-next-btn svg {
            width: 12px;
            height: 12px;
            transition: transform 0.2s ease;
        }

        .suggested-prev-btn:hover:not(:disabled) svg {
            transform: translateX(-2px);
        }

        .suggested-next-btn:hover:not(:disabled) svg {
            transform: translateX(2px);
        }

        /* Lang switch pill */
        .lang-toggle-btn-header {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-weight: 700;
            font-size: 0.8rem;
            padding: 0.4rem 0.65rem;
            border-radius: 20px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
        }
        .lang-toggle-btn-header:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            transform: translateY(-1px);
        }
        .lang-pill-text {
            letter-spacing: 0.05em;
        }
        .lang-toggle-btn.active {
            border-color: var(--primary-color) !important;
            background: rgba(59, 130, 246, 0.1) !important;
            color: var(--primary-color) !important;
        }

        /* --- MOBILE HEADER BRAND BAR OPTIMIZATION --- */
        @media (max-width: 640px) {
            .brand-bar-inner {
                padding: 0.65rem 0.85rem;
                gap: 0.5rem;
                align-items: center;
            }

            .brand {
                gap: 0.5rem;
                align-items: center;
            }

            .brand-logo-full {
                width: 138px;
            }

            .brand-actions {
                gap: 0.35rem;
                align-items: center;
                flex-shrink: 0;
            }

            .lang-toggle-btn-header {
                height: 30px;
                padding: 0 0.5rem;
                font-size: 0.725rem;
                border-radius: 15px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            .settings-btn {
                width: 30px;
                height: 30px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            .settings-btn svg {
                width: 15px;
                height: 15px;
            }

            .theme-switch {
                width: 44px;
                height: 24px;
                border-radius: 14px;
                padding: 2px;
            }

            .switch-handle {
                width: 18px;
                height: 18px;
                font-size: 0.625rem;
                transform: translateX(0);
            }

            [data-theme="dark"] .switch-handle {
                transform: translateX(20px);
            }
        }

        /* Accessibilité : respecte le réglage système "réduire les animations" */
        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.001ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.001ms !important;
                scroll-behavior: auto !important;
            }
        }
