/* Xi — Styles v3.0.0 (modulaire)
 * Extrait de Deploy/index.html le 23/03/2026
 * Couleur accent : #F5B027 (FNAC yellow)
 */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --bg-xi: #F5B027;
            --bg-user: #FFFFFF;
            --text-xi: #FFFFFF;
            --text-user: #141413;
            --text-muted: rgba(255,255,255,0.6);
        }

        html, body {
            height: 100%;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: #141413;
            overflow: hidden;
        }

        /* ====== AUTH SCREEN ====== */
        /* ====== AUTH SCREEN — Style Spotify ====== */
        .auth-screen {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: #ffffff;
            z-index: 1000;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            text-align: center;
            padding: 3rem 2rem 2rem;
            font-family: inherit;
            overflow-y: auto;
            box-sizing: border-box;
        }
        .auth-xi-logo {
            width: 52px;
            height: 52px;
            margin-bottom: 2rem;
        }
        .auth-title {
            font-size: 1.45rem;
            font-weight: 800;
            color: #141413;
            line-height: 1.2;
            letter-spacing: -0.02em;
            margin: 0 0 2.5rem;
            max-width: 340px;
        }
        .auth-email-block {
            width: 100%;
            max-width: 380px;
            text-align: left;
            margin-bottom: 0.9rem;
        }
        .auth-email-label {
            display: block;
            color: #141413;
            font-size: 0.78rem;
            font-weight: 700;
            margin-bottom: 0.45rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }
        .auth-email-input {
            width: 100%;
            padding: 14px 16px;
            background: #ffffff;
            border: 1px solid #b3b3b3;
            border-radius: 6px;
            color: #141413;
            font-size: 1rem;
            box-sizing: border-box;
            outline: none;
            font-family: inherit;
            transition: border-color 0.2s ease;
        }
        .auth-email-input:focus {
            border-color: #141413;
        }
        .auth-email-input::placeholder {
            color: #a7a7a7;
        }
        .auth-continuer-btn {
            width: 100%;
            max-width: 380px;
            padding: 14px;
            background: #D49A10;
            color: #141413;
            border: none;
            border-radius: 32px;
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
            letter-spacing: 0.04em;
            margin-bottom: 1.6rem;
            transition: background 0.2s ease, transform 0.1s ease;
        }
        .auth-continuer-btn:hover {
            background: #F5B027;
        }
        .auth-continuer-btn:active {
            transform: scale(0.97);
        }
        .auth-ou {
            color: #6a6a6a;
            font-size: 0.82rem;
            font-weight: 600;
            margin-bottom: 1rem;
            letter-spacing: 0.08em;
            position: relative;
            width: 100%;
            max-width: 380px;
            text-align: center;
        }
        .auth-ou::before, .auth-ou::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 44%;
            height: 1px;
            background: #e0e0e0;
        }
        .auth-ou::before { left: 0; }
        .auth-ou::after { right: 0; }
        .auth-oauth-list {
            width: 100%;
            max-width: 380px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 2rem;
        }
        .auth-oauth-btn {
            width: 100%;
            padding: 13px 20px;
            background: transparent;
            border: 1px solid #878787;
            border-radius: 32px;
            color: #141413;
            font-size: 0.92rem;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            font-family: inherit;
            transition: border-color 0.2s ease, background 0.15s ease;
        }
        .auth-oauth-btn:hover {
            border-color: #141413;
            background: rgba(0,0,0,0.04);
        }
        .auth-oauth-btn svg {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
        }
        .auth-disclaimer {
            max-width: 300px;
            color: #888;
            font-size: 0.82rem;
            line-height: 1.6;
            text-align: left;
            padding-bottom: 1rem;
        }
        .auth-charte-link {
            color: #c6613f;
            text-decoration: underline;
            font-weight: 500;
            cursor: pointer;
            display: block;
            margin-bottom: 0.5rem;
            font-size: 0.9rem;
            line-height: 1.4;
        }
        .auth-charte-link:hover {
            color: #a84e30;
        }
        /* ====== CHARTE DE TRANSPARENCE ====== */
        #charte-transparence {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: #ffffff;
            z-index: 1200;
            flex-direction: column;
            align-items: center;
            overflow-y: auto;
            padding: 3rem 2rem 4rem;
            box-sizing: border-box;
            font-family: inherit;
        }
        .charte-inner {
            width: 100%;
            max-width: 520px;
            text-align: left;
        }
        .charte-back {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #888;
            font-size: 0.82rem;
            cursor: pointer;
            margin-bottom: 2rem;
            background: none;
            border: none;
            font-family: inherit;
            padding: 0;
        }
        .charte-back:hover { color: #141413; }
        .charte-rgpd-icon {
            width: 64px;
            height: 64px;
            margin-bottom: 1.5rem;
            display: block;
        }
        .charte-title {
            font-size: 1.6rem;
            font-weight: 800;
            color: #141413;
            line-height: 1.2;
            margin-bottom: 0.6rem;
            letter-spacing: -0.02em;
        }
        .charte-subtitle {
            color: #b8861e;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 2.5rem;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
        .charte-section {
            margin-bottom: 2rem;
        }
        .charte-section-title {
            font-size: 1rem;
            font-weight: 700;
            color: #141413;
            margin-bottom: 0.7rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .charte-section p {
            color: #444;
            font-size: 0.88rem;
            line-height: 1.75;
            margin: 0 0 0.5rem;
        }
        .charte-section p strong {
            color: #141413;
        }
        .charte-divider {
            border: none;
            border-top: 1px solid #e0e0e0;
            margin: 2rem 0;
        }
        .charte-signature {
            background: #f5f5f3;
            border-radius: 12px;
            padding: 1.5rem;
            text-align: center;
        }
        .charte-signature p {
            color: #666;
            font-size: 0.82rem;
            line-height: 1.7;
            margin: 0 0 0.8rem;
        }
        .charte-signature .sig-name {
            color: #b8861e;
            font-size: 1rem;
            font-weight: 700;
        }
        /* Legacy (inutilisé, conservé pour rétrocompatibilité) */
        .auth-phrase { display: none; }
        .auth-logos { display: none; }
        .auth-logo-btn { display: none; }

        /* ====== LANDING PAGE ====== */
        #landing {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            z-index: 100;
            transition: opacity 0.8s ease, visibility 0.8s ease;
        }

        #landing.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        /* Image oreille plein écran */
        .landing-image {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-size: cover;
            background-position: center center;
        }

        /* Voile sombre subtil pour lisibilité */
        .landing-image::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(
                to bottom,
                rgba(0,0,0,0.15) 0%,
                rgba(0,0,0,0.05) 40%,
                rgba(0,0,0,0.05) 60%,
                rgba(0,0,0,0.35) 100%
            );
        }

        /* Logo Xi — grand, centré en haut */
        .landing-logo-top {
            position: absolute;
            top: 40px;
            left: 50%;
            transform: translateX(-50%);
            width: 96px;
            height: auto;
            z-index: 10;
            opacity: 0;
            filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
            transition: opacity 0.8s ease 0.3s;
        }
        .landing-logo-top.visible {
            opacity: 1;
        }

        /* Drapeau texte — part du centre vers la droite */
        .landing-flag {
            position: absolute;
            top: 25%;
            left: 0;
            width: 100%;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            opacity: 0;
            transform: translateX(-60%);
            transition: none;
        }
        .landing-flag.visible {
            opacity: 1;
            animation: flagSlideIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        @keyframes flagSlideIn {
            0% { opacity: 0; transform: translateX(-60%); }
            60% { opacity: 1; transform: translateX(3%); }
            100% { opacity: 1; transform: translateX(0); }
        }
        .landing-flag-text {
            background: none;
            padding: 0;
            font-size: 14px;
            font-weight: 400;
            color: #fff;
            letter-spacing: 0.5px;
            line-height: 1.4;
            white-space: nowrap;
            text-shadow: 0 1px 6px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.25);
        }
        .landing-welcome {
            margin-top: 10px;
            font-size: 48px;
            font-weight: 300;
            color: rgba(255,255,255,0.88);
            letter-spacing: -0.5px;
            line-height: 1.1;
            text-shadow: 0 2px 12px rgba(0,0,0,0.4);
            opacity: 0;
            animation: welcomeSlideIn 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 1.2s forwards;
        }
        @keyframes welcomeSlideIn {
            from { opacity: 0; transform: translateX(-28px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        /* === ONBOARD-WELCOME : flèches + transitions === */
        .welcome-arrow-btn {
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.5s ease;
        }
        .welcome-arrow-btn.visible {
            opacity: 1;
        }
        .welcome-arrow-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background: white;
            border-radius: 50%;
            border: 1.5px solid rgba(0,0,0,0.15);
            box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
            animation: welcomeArrowBounce 1.8s ease-in-out infinite;
        }
        .welcome-arrow-pill:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.18);
        }
        @keyframes welcomeArrowBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(7px); }
        }
        #welcome-phase1-photo.collapsed {
            flex: 0 !important;
            opacity: 0;
            overflow: hidden;
        }
        #welcome-text-zone.expanded {
            flex: 1;
        }

        .landing-qt-link {
            display: none;
            margin-top: 18px;
            font-size: 13px;
            font-weight: 300;
            color: rgba(255,255,255,0.42);
            letter-spacing: 0.3px;
            cursor: pointer;
            text-decoration: underline;
            text-underline-offset: 3px;
            opacity: 0;
            transition: opacity 0.4s ease, color 0.2s;
        }
        .landing-qt-link.visible { opacity: 1; }
        .landing-qt-link:hover   { color: rgba(255,255,255,0.72); }

        /* Zone basse — OrbiCube + texte + bouton + mentions */
        .landing-bottom-zone {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0 24px 28px;
        }

        .rubiks-container {
            width: 120px;
            height: 120px;
            margin-bottom: 0;
            opacity: 0;
            transform: scale(0.8);
            transition: all 0.5s ease 1.2s;
        }
        .rubiks-container.visible {
            opacity: 1;
            transform: scale(1);
        }
        .rubiks-container.ended {
            opacity: 0;
            height: 0;
            margin: 0;
            overflow: hidden;
            transition: all 0.4s ease;
        }
        .rubiks-container video {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Bouton "suivant" — grand, affirmé */
        .landing-cta {
            font-size: 17px;
            font-weight: 400;
            letter-spacing: 2.5px;
            text-transform: lowercase;
            color: rgba(255,255,255,0.9);
            background: transparent;
            border: 1.5px solid rgba(255,255,255,0.45);
            padding: 18px 64px;
            border-radius: 40px;
            cursor: pointer;
            margin-top: 24px;
            opacity: 0;
            transform: translateY(8px);
            transition: all 0.3s ease;
        }
        .landing-cta.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .landing-cta:hover {
            border-color: rgba(255,255,255,0.8);
            color: #fff;
            box-shadow: 0 0 24px rgba(255,255,255,0.18);
        }

        /* Mentions — Qui est Xi / About / CGU */
        .landing-footer {
            display: flex;
            justify-content: center;
            gap: 20px;
            font-size: 10px;
            letter-spacing: 0.5px;
            margin-top: 14px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .landing-footer.visible {
            opacity: 1;
        }
        .landing-footer a {
            color: rgba(255,255,255,0.45);
            text-decoration: none;
            transition: color 0.2s;
        }
        .landing-footer a:hover {
            color: rgba(255,255,255,0.85);
        }

        /* ====== CALENDRIER RDV ====== */
        .cal-card { background:#fff; border:0.5px solid rgba(0,0,0,0.1); border-radius:20px; width:100%; max-width:340px; overflow:visible; position:relative; box-shadow:0 2px 12px rgba(0,0,0,0.08); margin:0 auto; }
        .cal-header { padding:16px 20px 8px; display:flex; align-items:flex-start; justify-content:space-between; }
        .cal-label { font-size:11px; color:#888; letter-spacing:.05em; text-transform:uppercase; margin-bottom:2px; }
        .cal-selected { font-size:18px; font-weight:500; color:#141413; letter-spacing:-0.3px; min-height:24px; }
        .cal-nav { display:flex; align-items:center; justify-content:space-between; padding:2px 12px; }
        .cal-month { font-size:13px; font-weight:500; color:#141413; }
        .cal-arrow { width:30px; height:30px; border:none; background:none; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:50%; color:#141413; font-size:18px; font-family:inherit; }
        .cal-arrow:hover { background:rgba(0,0,0,0.06); }
        .cal-grid { padding:0 10px 4px; }
        .cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:2px; }
        .cal-wd { font-size:11px; color:#888; text-align:center; padding:4px 0; font-weight:500; }
        .cal-days { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; }
        .cal-day { width:36px; height:36px; border:none; background:none; cursor:default; border-radius:50%; font-size:12px; display:flex; align-items:center; justify-content:center; margin:0 auto; color:#141413; position:relative; font-family:inherit; }
        .cal-day.past { color:#ccc; }
        .cal-day.avail { cursor:pointer; color:#1E6B4A; font-weight:500; }
        .cal-day.avail::after { content:''; position:absolute; width:28px; height:28px; border-radius:50%; background:#1E6B4A; opacity:0.14; }
        .cal-day.avail:hover::after { opacity:0.28; }
        .cal-day.today::before { content:''; position:absolute; width:32px; height:32px; border-radius:50%; border:1.5px solid #1E6B4A; z-index:1; }
        .cal-day.sel::after { content:''; position:absolute; background:#1E6B4A; opacity:1; width:32px; height:32px; border-radius:50%; z-index:-1; }
        .cal-day.sel { color:#fff; position:relative; z-index:2; font-weight:500; }
        .cal-footer { display:flex; justify-content:flex-end; gap:6px; padding:0 14px 12px; }
        .cal-btn { border:none; background:none; cursor:pointer; font-size:13px; font-weight:500; color:#1E6B4A; padding:6px 10px; border-radius:8px; font-family:inherit; }
        .cal-btn:hover { background:rgba(30,107,74,0.08); }
        .cal-btn:disabled { color:#ccc; cursor:default; }
        .cal-btn.primary { background:#1E6B4A; color:#fff; padding:8px 16px; border-radius:10px; }
        .cal-btn.primary:hover { background:#165638; }
        .cal-btn.primary:disabled { background:#ccc; }
        .cal-legend { display:flex; gap:12px; justify-content:center; padding:0 12px 8px; flex-wrap:wrap; }
        .cal-leg-item { display:flex; align-items:center; gap:5px; font-size:11px; color:#888; }
        .cal-leg-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
        .cal-leg-avail { background:#1E6B4A; }
        .cal-leg-past { background:#ccc; }
        /* Popup heure */
        .cal-time-popup { position:absolute; bottom:calc(100% + 10px); left:50%; transform:translateX(-50%) translateY(6px); width:calc(100% - 16px); background:#fff; border:0.5px solid rgba(0,0,0,0.1); border-radius:20px; box-shadow:0 8px 32px rgba(0,0,0,0.14); z-index:100; opacity:0; pointer-events:none; transition:opacity 0.18s ease, transform 0.18s ease; }
        .cal-time-popup.visible { opacity:1; pointer-events:all; transform:translateX(-50%) translateY(0); }
        .cal-time-popup-header { padding:14px 20px 8px; font-size:11px; color:#888; letter-spacing:.05em; text-transform:uppercase; border-bottom:0.5px solid rgba(0,0,0,0.08); }
        .cal-time-list { max-height:200px; overflow-y:auto; padding:6px 0; }
        .cal-time-list::-webkit-scrollbar { width:3px; }
        .cal-time-list::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.15); border-radius:2px; }
        .cal-time-slot { display:flex; align-items:center; padding:9px 20px; font-size:14px; cursor:default; color:#ccc; gap:10px; }
        .cal-time-slot.avail { color:#141413; cursor:pointer; font-weight:500; }
        .cal-time-slot.avail:hover { background:rgba(0,0,0,0.03); }
        .cal-time-slot.sel { color:#1E6B4A; font-weight:500; background:rgba(30,107,74,0.08); }
        .cal-time-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
        .cal-time-slot.avail .cal-time-dot { background:#1E6B4A; }
        .cal-time-slot:not(.avail) .cal-time-dot { background:#ddd; }
        .cal-time-slot.sel .cal-time-dot { background:#1E6B4A; }
        .cal-confirm-zone { padding:0 20px 12px; border-top:0.5px solid rgba(0,0,0,0.08); margin-top:4px; display:none; }
        .cal-confirm-zone.visible { display:block; }
        .cal-confirm-msg { font-size:13px; color:#141413; padding:10px 0 6px; line-height:1.55; }
        .cal-confirm-msg span { color:#1E6B4A; font-weight:500; }
        /* Legacy inline (inutilisé mais ne pas supprimer) */
        .cal-time { display:none; }
        .cal-confirm { display:none; }

        /* ====== SÉANCE MANQUÉE ====== */
        #missed-appointment {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            z-index: 1600;
            background: #141413;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #missed-appointment.visible {
            display: flex;
        }
        .missed-content {
            width: calc(100% - 48px);
            max-width: 400px;
            text-align: center;
        }
        .missed-name {
            font-size: 13px;
            color: rgba(245,240,232,0.35);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 16px;
        }
        .missed-title {
            font-size: 26px;
            font-weight: 600;
            color: #f5f0e8;
            letter-spacing: -0.02em;
            margin-bottom: 16px;
            line-height: 1.2;
        }
        .missed-msg {
            font-size: 15px;
            color: rgba(245,240,232,0.5);
            line-height: 1.65;
            margin-bottom: 36px;
        }
        .missed-cta {
            width: 100%;
            padding: 16px;
            background: #F5B027;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-family: inherit;
            font-weight: 600;
            color: #141413;
            cursor: pointer;
            margin-bottom: 12px;
            letter-spacing: -0.01em;
        }
        .missed-skip {
            background: none;
            border: none;
            color: rgba(245,240,232,0.25);
            font-size: 13px;
            font-family: inherit;
            cursor: pointer;
            padding: 8px;
            display: block;
            margin: 0 auto;
        }
        .missed-skip:hover { color: rgba(245,240,232,0.45); }

        /* ====== SALLE D'ATTENTE ====== */
        #waiting-room {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            z-index: 1500;
            background: #000;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-family: inherit;
        }
        #waiting-room.visible {
            display: flex;
        }
        .waiting-bg {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            object-fit: cover;
            object-position: center center;
            opacity: 1;
            pointer-events: none;
        }
        .waiting-content {
            position: absolute;
            bottom: 12%;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 2rem;
            width: 100%;
            max-width: 400px;
        }
        .waiting-clock {
            width: 140px;
            height: 140px;
            border-radius: 50%;
            border: 1.5px solid rgba(255,255,255,0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 2rem;
            position: relative;
            background: rgba(0,0,0,0.35);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        .waiting-clock-time {
            font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
            font-size: 2.2rem;
            font-weight: 300;
            color: #fff;
            letter-spacing: 2px;
            text-shadow: 0 1px 6px rgba(0,0,0,0.5);
        }
        .waiting-clock-ring {
            position: absolute;
            top: -2px; left: -2px;
            width: calc(100% + 4px);
            height: calc(100% + 4px);
        }
        .waiting-clock-ring circle {
            fill: none;
            stroke: rgba(255,255,255,0.5);
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-dasharray: 440;
            stroke-dashoffset: 0;
            transform: rotate(-90deg);
            transform-origin: center;
            transition: stroke-dashoffset 1s linear;
        }
        .waiting-message {
            color: rgba(255,255,255,0.9);
            font-size: 0.95rem;
            line-height: 1.6;
            max-width: 300px;
            font-weight: 400;
            letter-spacing: 0.2px;
            text-shadow: 0 1px 8px rgba(0,0,0,0.6), 0 0 20px rgba(0,0,0,0.3);
        }
        .waiting-message .prenom {
            color: #fff;
            font-weight: 600;
        }
        /* Bloc musique salle d'attente */
        .waiting-music {
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 10;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .waiting-music-row {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(0,0,0,0.4);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-radius: 12px;
            padding: 10px 14px;
        }
        .waiting-spotify-logo {
            width: 28px;
            height: 28px;
            flex-shrink: 0;
        }
        .waiting-music-info {
            flex: 1;
            min-width: 0;
        }
        .waiting-music-title {
            font-size: 14px;
            font-weight: 500;
            color: #fff;
            line-height: 1.3;
        }
        .waiting-music-artist {
            font-size: 11px;
            color: rgba(255,255,255,0.6);
        }
        .waiting-music-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: rgba(255,255,255,0.15);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.2s;
        }
        .waiting-music-btn:hover {
            background: rgba(255,255,255,0.25);
        }
        .waiting-music-add {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            padding-left: 4px;
            transition: color 0.2s;
        }
        .waiting-music-add:hover {
            color: #F5B027;
        }

        /* ====== PAGE QUI EST XI ====== */
        #about-screen {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: white;
            z-index: 105;
            flex-direction: column;
            overflow-y: auto;
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        #about-screen.visible {
            display: flex;
            opacity: 1;
        }

        .page-header {
            padding: 48px 24px 32px;
            text-align: center;
            border-bottom: 1px solid #faf9f5;
        }

        .page-header img {
            width: 88px;
            height: 88px;
            border-radius: 22px;
            margin-bottom: 8px;
        }

        .page-back {
            position: absolute;
            top: 16px;
            left: 16px;
            font-size: 14px;
            color: #666;
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px;
        }

        .page-back:hover {
            color: #141413;
        }

        .page-back svg {
            width: 18px;
            height: 18px;
        }

        .page-title {
            font-size: 28px;
            font-weight: 600;
            color: #141413;
            margin-top: 16px;
        }

        .page-content {
            padding: 40px 28px 60px;
            max-width: 600px;
            margin: 0 auto;
        }

        .about-text {
            font-size: 17px;
            line-height: 1.85;
            color: #333;
        }

        .about-text p {
            margin-bottom: 28px;
        }

        .about-text p:last-child {
            margin-bottom: 0;
        }

        .about-signature {
            margin-top: 48px;
            padding-top: 32px;
            border-top: 1px solid #EEE;
            text-align: center;
            font-size: 15px;
            color: #666;
            font-style: italic;
        }

        /* ====== PAGE CGU ====== */
        #cgu-screen {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: white;
            z-index: 105;
            flex-direction: column;
            overflow-y: auto;
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        #cgu-screen.visible {
            display: flex;
            opacity: 1;
        }

        .cgu-text {
            font-size: 15px;
            line-height: 1.75;
            color: #444;
        }

        .cgu-text h3 {
            font-size: 16px;
            font-weight: 600;
            margin: 32px 0 12px;
            color: #141413;
        }

        .cgu-text h3:first-child {
            margin-top: 0;
        }

        .cgu-text p {
            margin-bottom: 16px;
        }

        /* ====== PAGE PRIX ====== */
        #pricing-screen {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: white;
            z-index: 105;
            flex-direction: column;
            overflow-y: auto;
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        #pricing-screen.visible {
            display: flex;
            opacity: 1;
        }

        .pricing-cards {
            display: flex;
            flex-direction: column;
            gap: 24px;
            margin-top: 8px;
        }

        .pricing-card {
            border: 1px solid #e8e8e4;
            border-radius: 16px;
            padding: 28px 24px;
            position: relative;
            background: #faf9f5;
        }

        .pricing-card-featured {
            border-color: #F5B027;
            border-width: 2px;
            background: #fffdf5;
        }

        .pricing-card-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            color: #888;
            background: #f0efea;
            padding: 4px 10px;
            border-radius: 20px;
            margin-bottom: 16px;
        }

        .pricing-badge-featured {
            color: #D49A10;
            background: #fef3d6;
        }

        .pricing-card-name {
            font-size: 24px;
            font-weight: 600;
            color: #141413;
            margin-bottom: 8px;
        }

        .pricing-reg {
            font-size: 12px;
            vertical-align: super;
            font-weight: 400;
            color: #999;
        }

        .pricing-card-price {
            font-size: 42px;
            font-weight: 700;
            color: #141413;
            line-height: 1;
            margin-bottom: 2px;
        }

        .pricing-currency {
            font-size: 24px;
            font-weight: 400;
        }

        .pricing-card-per {
            font-size: 14px;
            color: #888;
            margin-bottom: 20px;
        }

        .pricing-card-features {
            list-style: none;
            padding: 0;
            margin: 0 0 16px 0;
        }

        .pricing-card-features li {
            font-size: 15px;
            color: #444;
            line-height: 1.6;
            padding-left: 22px;
            position: relative;
            margin-bottom: 6px;
        }

        .pricing-card-features li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #F5B027;
            font-weight: 600;
        }

        .pricing-card-featured .pricing-card-features li::before {
            color: #D49A10;
        }

        .pricing-card-note {
            font-size: 13px;
            color: #999;
            line-height: 1.5;
            margin-top: 8px;
            padding-top: 12px;
            border-top: 1px solid #eeede8;
        }

        .pricing-footer-note {
            margin-top: 40px;
            text-align: center;
            font-size: 13px;
            color: #aaa;
            font-style: italic;
        }

        /* ====== INTRO SCREEN ====== */
        #intro-screen {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: var(--bg-user);
            z-index: 90;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            text-align: center;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        #intro-screen.visible {
            display: flex;
            opacity: 1;
        }

        .intro-logo {
            width: 72px;
            height: 72px;
            margin-bottom: 32px;
            border-radius: 18px;
        }

        .intro-text {
            font-size: 20px;
            line-height: 1.65;
            color: var(--text-user);
            max-width: 400px;
            margin-bottom: 40px;
        }

        .intro-btn {
            font-size: 16px;
            color: white;
            background: var(--bg-xi);
            border: none;
            padding: 16px 44px;
            border-radius: 30px;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .intro-btn:hover {
            transform: scale(1.03);
        }

        /* ====== SESSION SCREEN ====== */
        #session {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            flex-direction: column;
            background: #faf9f5;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        #session.visible {
            display: flex;
            opacity: 1;
        }

        .session-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 18px 6px;
            flex-shrink: 0;
        }
        .session-logo-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .session-logo {
            height: 28px;
            width: auto;
            opacity: 0.72;
        }
        /* Bouton ? à droite du logo */
        .session-info-trigger {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 1.5px solid rgba(0,0,0,0.28);
            background: none;
            color: rgba(0,0,0,0.45);
            font-size: 9px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
            transition: border-color 0.2s, color 0.2s;
        }
        .session-info-trigger:hover { border-color: rgba(0,0,0,0.6); color: rgba(0,0,0,0.7); }
        /* Popup info Quickie / Maxi */
        .session-info-popup {
            position: fixed;
            top: 0; left: 0; right: 0;
            z-index: 200;
            transform: translateY(-100%);
            transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
            background: #fff;
            border-bottom: 1px solid rgba(0,0,0,0.08);
            box-shadow: 0 4px 24px rgba(0,0,0,0.10);
        }
        .session-info-popup.open {
            transform: translateY(0);
        }
        .session-info-inner {
            padding: 28px 24px 24px;
            max-width: 420px;
            margin: 0 auto;
            position: relative;
        }
        .session-info-close {
            position: absolute;
            top: 16px; right: 18px;
            background: none; border: none;
            font-size: 16px; cursor: pointer;
            color: #aaa; line-height: 1;
            padding: 4px;
        }
        .session-info-row {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            margin-bottom: 16px;
        }
        .session-info-logo {
            height: 32px;
            width: auto;
            flex-shrink: 0;
            margin-top: 2px;
        }
        .session-info-row div {
            font-size: 14px;
            color: #444;
            line-height: 1.5;
        }
        .session-info-cta-text {
            font-size: 14px;
            color: #333;
            line-height: 1.6;
            margin: 18px 0 16px;
            border-top: 1px solid rgba(0,0,0,0.07);
            padding-top: 16px;
        }
        .session-info-btn-maxi {
            display: block;
            background: #F5B027;
            color: #fff;
            text-align: center;
            padding: 13px 0;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 600;
            text-decoration: none;
            font-family: inherit;
            transition: opacity 0.2s;
        }
        .session-info-btn-maxi:hover { opacity: 0.88; }
        .timer-block {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .timer {
            font-size: 26px;
            color: #aaa;
            font-weight: 300;
            letter-spacing: 0.02em;
            line-height: 1;
        }

        .timer.warning {
            color: #FFB74D;
        }

        .session-boxes {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 0 20px 20px;
            gap: 12px;
            min-height: 0;
        }
        /* Quand l'utilisateur tape : blanc en haut, vert en bas */
        .session-boxes.typing .box-user {
            order: -1;
        }
        .session-boxes.typing .box-xi {
            order: 1;
        }

        .box-xi {
            flex: 1;
            background: #f5f4ed;
            border-radius: 24px;
            padding: 24px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            transform: translateY(-110%);
            transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }

        /* nonor_blanc.webp en fond de la zone Xi, cadré (cover), 50% opacité */
        .box-xi::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: url('../../assets/nonor_blanc.webp') center center / cover no-repeat;
            opacity: 0.50;
            border-radius: 24px;
            pointer-events: none;
            z-index: 0;
        }
        .box-xi::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(217, 119, 87, 0.08);
            border-radius: 24px;
            pointer-events: none;
            z-index: 0;
        }
        .box-xi > * {
            position: relative;
            z-index: 1;
        }

        .box-xi.visible {
            transform: translateY(0);
        }

        .box-user {
            flex: 1;
            background: #FFFFFF;
            border-radius: 24px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            transform: translateY(-110%);
            opacity: 0;
            transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s, opacity 0.4s ease 0.25s;
        }

        .box-user.visible {
            transform: translateY(0);
            opacity: 1;
        }

        /* ====== PHOTO XI INTRO ====== */
        .xi-intro-photo {
            flex-shrink: 0;
            height: 44vh;
            overflow: hidden;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            background: #faf9f5;
            transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }
        .xi-intro-photo.hidden {
            height: 0;
        }
        .xi-intro-photo img {
            height: 100%;
            width: auto;
            max-width: 85%;
            object-fit: contain;
            object-position: bottom center;
            display: block;
        }

        /* ====== CHAT WHATSAPP STYLE ====== */
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px 16px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-height: 0;
            -webkit-overflow-scrolling: touch;
            /* Watermark : image nonor sous couche semi-transparente */
            background:
                linear-gradient(rgba(229,221,213,0.82), rgba(229,221,213,0.82)),
                url('../../assets/nonor_blanc.webp') center center / 70% auto no-repeat,
                #E5DDD5;
            background-attachment: scroll, scroll, scroll;
            position: relative;
            margin: 0 8px;
            border-radius: 20px;
        }

        .chat-bubble {
            max-width: 82%;
            padding: 10px 14px;
            border-radius: 16px;
            font-size: 15px;
            line-height: 1.45;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity 0.25s ease, transform 0.25s ease;
            word-wrap: break-word;
            box-shadow: 0 1px 1px rgba(0,0,0,0.08);
            position: relative;
        }
        .chat-bubble.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .chat-bubble.xi {
            align-self: flex-start;
            background: #f5f4ed;
            color: #141413;
            border-radius: 16px;
            border-bottom-left-radius: 4px;
            padding: 10px 36px 10px 14px; /* right extra for tapé juste btn */
        }
        .chat-bubble.user {
            align-self: flex-end;
            background: #D49A10;
            color: #FFFFFF;
            border-radius: 16px;
            border-bottom-right-radius: 4px;
            padding: 10px 14px;
        }
        .chat-bubble.user a { color: #FDE8A0; }

        /* Bouton "Tapé juste" — logotype en haut à droite des bulles Xi */
        .tape-juste-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 20px;
            height: 20px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            opacity: 0.20;
            transition: opacity 0.3s ease, transform 0.15s ease;
        }
        .tape-juste-btn:active {
            transform: scale(1.2);
        }
        .tape-juste-btn.activated {
            opacity: 1;
        }
        .tape-juste-btn svg {
            width: 100%;
            height: 100%;
        }

        /* Flèche "suivant" — fin de séance */
        .chat-next-arrow {
            align-self: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(217,119,87,0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            margin: 8px 0;
            transition: background 0.2s ease;
            animation: arrow-pulse 2s infinite;
        }
        .chat-next-arrow:active {
            background: rgba(217,119,87,0.2);
        }
        @keyframes arrow-pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }

        /* Bulle résumé — tons khaki/jaune doux */
        .chat-bubble.summary {
            background: #F5F0E1;
            border: 1px solid rgba(180,160,120,0.2);
            align-self: flex-start;
            max-width: 90%;
            padding: 14px 16px;
        }

        /* Bloc partage sous le résumé */
        .summary-share-block {
            align-self: flex-start;
            max-width: 90%;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 4px 0 8px;
        }
        .summary-share-block button {
            border: none;
            border-radius: 18px;
            padding: 8px 16px;
            font-size: 12px;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* Bouton Next — pastille flottante */
        .chat-next-btn {
            position: fixed;
            bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px));
            left: 50%;
            transform: translateX(-50%);
            z-index: 50;

            background: #F5B027;
            border: none;
            border-radius: 999px;
            color: #fff;
            padding: 14px 28px 14px 24px;
            font-size: 15px;
            font-family: inherit;
            font-weight: 600;
            letter-spacing: 0.01em;
            cursor: pointer;
            white-space: nowrap;

            box-shadow: 0 4px 18px rgba(245,176,39,0.45), 0 1px 4px rgba(0,0,0,0.10);
            animation: pill-enter 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
            transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
        }
        .chat-next-btn::after {
            content: ' →';
            opacity: 0.85;
        }
        .chat-next-btn:hover {
            background: #e5a520;
            box-shadow: 0 6px 22px rgba(245,176,39,0.55), 0 1px 4px rgba(0,0,0,0.10);
            transform: translateX(-50%) translateY(-2px);
        }
        .chat-next-btn:active {
            background: #D49A10;
            transform: translateX(-50%) scale(0.96);
            box-shadow: 0 2px 8px rgba(245,176,39,0.3);
        }
        @keyframes pill-enter {
            from { opacity: 0; transform: translateX(-50%) translateY(14px); }
            to   { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        /* Typing indicator (3 dots) */
        .typing-indicator {
            display: flex;
            gap: 5px;
            padding: 6px 4px;
            align-items: center;
        }
        .typing-indicator span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #90A4AE;
            animation: typing-dot 1.4s infinite;
        }
        .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
        .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes typing-dot {
            0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
            30% { opacity: 1; transform: scale(1); }
        }

        /* Chat input bar — fixed at bottom */
        .chat-input-bar {
            background: #faf9f5;
            border-top: 1px solid #E0E0E0;
            padding: 6px 8px;
            padding-bottom: max(6px, env(safe-area-inset-bottom));
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .chat-input-row {
            display: flex;
            align-items: flex-end;
            gap: 6px;
        }
        .chat-input-row textarea {
            flex: 1;
            border: none;
            background: #FFFFFF;
            font-family: inherit;
            font-size: 16px;
            line-height: 1.4;
            resize: none;
            outline: none;
            max-height: 100px;
            min-height: 20px;
            height: 36px;
            color: #141413;
            padding: 8px 14px;
            border-radius: 21px;
        }
        .chat-input-row textarea::placeholder { color: #999; }
        .chat-input-row .send-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: #D49A10;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: opacity 0.2s;
        }
        .chat-input-row .send-btn:disabled {
            opacity: 0.3;
            cursor: default;
        }
        .chat-input-row .send-btn svg {
            width: 18px;
            height: 18px;
            fill: white;
        }

        /* Buttons appended in chat (end choices, share, etc.) */
        .chat-buttons-row {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-self: flex-start;
            max-width: 88%;
            padding: 4px 0;
        }

        /* Hide old session-boxes layout */
        .session-boxes { display: none !important; }

        /* Ancien styles zone-xi gardés pour compat mais cachés */
        .zone-xi { display: none; }
        .zone-xi-header { display: none; }
        .xi-logo-small { display: none; }

        .zone-xi-content {
            flex: 1;
            overflow-y: auto;
            padding: 0 24px 24px;
            display: flex;
            flex-direction: column;
        }

        .xi-message-container {
            display: flex;
            align-items: flex-start;
            gap: 14px;
        }

        .xi-avatar {
            display: none;
        }

        .xi-message {
            font-size: 16px;
            line-height: 1.55;
            color: #141413;
            background: transparent;
            padding: 0;
            border-radius: 0;
            max-width: 100%;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s ease;
        }

        .xi-message.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .xi-message .xi-bold {
            font-weight: 800;
            color: #111;
            display: inline;
            border-top: 1px solid rgba(217,119,87,0.3);
            padding-top: 2px;
        }
        .xi-message .xi-caps {
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 0.08em;
            font-size: 0.92em;
            color: #222;
        }
        .xi-message .xi-headline {
            font-weight: 800;
            font-size: 1.15em;
            color: #000;
            margin: 14px 0 6px 0;
            padding-bottom: 4px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
            line-height: 1.3;
        }
        .xi-message .xi-separator {
            width: 40%;
            height: 1px;
            background: rgba(0,0,0,0.12);
            margin: 16px auto;
            border: none;
        }
        .xi-message .xi-paragraph-break {
            height: 10px;
        }
        .xi-message .xi-color-warm {
            color: #c0392b;
            font-weight: 600;
        }
        .xi-message .xi-color-cool {
            color: #2980b9;
            font-weight: 600;
        }
        .xi-message .xi-color-alert {
            color: #d35400;
            font-weight: 700;
        }
        .xi-message .xi-color-soft {
            color: #7f8c8d;
            font-style: italic;
        }
        /* Typo dynamique — alternances visuelles */
        .xi-message .xi-large {
            font-size: 1.45em;
            font-weight: 700;
            line-height: 1.25;
            display: block;
            margin: 2px 0;
            color: #111;
        }
        .xi-message .xi-light {
            font-weight: 300;
            color: #444;
        }
        .xi-message .xi-underline {
            text-decoration: underline;
            text-decoration-thickness: 1.5px;
            text-underline-offset: 3px;
        }
        .xi-message .xi-emoji {
            font-size: 1.15em;
            vertical-align: middle;
            margin: 0 2px;
        }

        .loading-dots {
            display: none;
            justify-content: center;
            align-items: center;
            padding: 20px 0;
        }

        .loading-dots.visible {
            display: flex;
        }

        .loading-cube-container {
            width: 48px;
            height: 48px;
            opacity: 0.85;
        }
        .loading-cube-video {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Zone User — Input toujours visible */
        .zone-user-input {
            background: #FFFFFF;
            border-top: 1px solid #E0E0E0;
            padding: 10px 16px;
            padding-bottom: max(10px, env(safe-area-inset-bottom));
            flex-shrink: 0;
        }

        .input-bar {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            background: #F5F5F5;
            border-radius: 24px;
            padding: 8px 12px;
        }

        .input-bar textarea {
            flex: 1;
            border: none;
            background: transparent;
            font-family: inherit;
            font-size: 15px;
            line-height: 1.4;
            resize: none;
            outline: none;
            max-height: 120px;
            color: #141413;
        }

        .input-bar .send-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: #D49A10;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: opacity 0.2s;
        }

        .input-bar .send-btn:disabled {
            opacity: 0.3;
            cursor: default;
        }

        .input-bar .send-btn svg {
            width: 18px;
            height: 18px;
            fill: white;
        }

        /* Legacy zone-user classes kept for JS compat */
        .zone-user {
            background: var(--bg-user);
            border-radius: 24px 24px 0 0;
            box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
            display: flex;
            flex-direction: column;
            transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            flex-shrink: 0;
        }

        .zone-user.collapsed { height: 72px; }
        .zone-user.expanded { height: 45%; }

        .user-handle {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 24px 8px;
            cursor: grab;
            flex-shrink: 0;
        }

        .handle-bar {
            width: 48px;
            height: 5px;
            background: #DDD;
            border-radius: 3px;
        }

        .handle-hint {
            font-size: 13px;
            color: #999;
            margin-top: 8px;
        }

        .zone-user.expanded .handle-hint { display: none; }

        .user-header {
            display: none;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px 12px;
            flex-shrink: 0;
        }

        .zone-user.expanded .user-header { display: flex; }

        .char-counter { font-size: 13px; color: #999; }
        .char-counter.warning { color: #E65100; }
        .char-counter.error { color: #C62828; }

        .send-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--bg-xi);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
        .send-btn:not(:disabled):hover { transform: scale(1.05); }
        .send-btn svg { width: 20px; height: 20px; fill: white; }

        /* Bouton micro — dictée vocale */
        .mic-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 14px;
            padding: 10px 0 6px;
            min-height: 52px;
        }
        .mic-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid #141413;
            background: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }
        .mic-btn svg { width: 20px; height: 20px; fill: none; stroke: #141413; stroke-width: 2; }
        .mic-btn.listening {
            background: #F5B027;
            border-color: #F5B027;
        }
        .mic-btn.listening svg { stroke: #fff; }
        .mic-btn.unsupported { opacity: 0.2; cursor: not-allowed; }

        /* Wave bars — animation dictée */
        .voice-wave {
            display: none;
            align-items: center;
            gap: 3px;
            height: 32px;
        }
        .voice-wave.active { display: flex; }
        .voice-wave span {
            width: 3px;
            height: 100%;
            border-radius: 2px;
            background: #F5B027;
            animation: wave-bar 1.2s ease-in-out infinite;
        }
        .voice-wave span:nth-child(1) { animation-delay: 0s; }
        .voice-wave span:nth-child(2) { animation-delay: 0.15s; }
        .voice-wave span:nth-child(3) { animation-delay: 0.3s; }
        .voice-wave span:nth-child(4) { animation-delay: 0.45s; }
        .voice-wave span:nth-child(5) { animation-delay: 0.6s; }
        .voice-wave span:nth-child(6) { animation-delay: 0.45s; }
        .voice-wave span:nth-child(7) { animation-delay: 0.3s; }
        .voice-wave span:nth-child(8) { animation-delay: 0.15s; }
        .voice-wave span:nth-child(9) { animation-delay: 0s; }
        @keyframes wave-bar {
            0%, 100% { transform: scaleY(0.15); opacity: 0.4; }
            50% { transform: scaleY(1); opacity: 1; }
        }

        .user-input-area {
            flex: 1;
            display: none;
            padding: 0 20px 20px;
            overflow: hidden;
        }

        .zone-user.expanded .user-input-area { display: block; }

        .user-input-area textarea {
            width: 100%;
            height: 100%;
            border: none;
            outline: none;
            font-family: inherit;
            font-size: 18px;
            line-height: 1.5;
            resize: none;
            background: transparent;
            color: var(--text-user);
        }

        .user-input-area textarea::placeholder { color: #AAA; }

        /* ====== RAPPORT ====== */
        #report {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: var(--bg-user);
            z-index: 80;
            flex-direction: column;
            padding: 40px 24px;
            overflow-y: auto;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        #report.visible { display: flex; opacity: 1; }

        .report-header { text-align: center; margin-bottom: 32px; }
        .report-header h2 { font-size: 24px; font-weight: 600; color: var(--text-user); margin-bottom: 8px; }
        .report-header p { font-size: 15px; color: #666; }

        .report-content {
            flex: 1;
            background: #F8F8F8;
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .report-content h3 {
            font-size: 12px;
            font-weight: 600;
            color: var(--bg-xi);
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin: 20px 0 12px;
        }

        .report-content h3:first-child { margin-top: 0; }
        .report-content p { font-size: 15px; line-height: 1.6; color: var(--text-user); }

        .report-actions { display: flex; flex-direction: column; gap: 12px; }

        .btn-primary {
            background: var(--bg-xi);
            color: white;
            border: none;
            border-radius: 14px;
            padding: 16px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
        }

        .btn-secondary {
            background: transparent;
            color: #666;
            border: 1px solid #ddd;
            border-radius: 14px;
            padding: 16px;
            font-size: 15px;
            cursor: pointer;
        }

        /* Panneau Version (Easter egg) */
        #version-panel {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 40px 24px;
            z-index: 200;
            text-align: center;
            transform: translateY(-100%);
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 0 0 24px 24px;
            box-shadow: 0 4px 30px rgba(0,0,0,0.1);
        }

        #version-panel.visible {
            display: block;
            transform: translateY(0);
        }

        .version-title {
            font-size: 32px;
            font-weight: 300;
            color: #141413;
            margin-bottom: 24px;
            letter-spacing: 2px;
        }

        .version-number {
            font-size: 48px;
            font-weight: 600;
            color: var(--bg-xi);
            margin-bottom: 16px;
            font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
        }

        .version-copyright {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
        }

        .version-changelog {
            font-size: 12px;
            color: #999;
            font-style: italic;
        }

        .version-close {
            margin-top: 24px;
            font-size: 13px;
            color: #999;
            background: none;
            border: none;
            cursor: pointer;
        }

        .version-close:hover {
            color: #141413;
        }

        /* Boîte dialogue Email */
        #email-dialog {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 150;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #email-dialog.visible {
            display: flex;
            opacity: 1;
        }

        .email-dialog-box {
            background: white;
            border-radius: 24px;
            padding: 40px 32px;
            max-width: 400px;
            width: 90%;
            text-align: center;
            transform: translateY(20px);
            transition: transform 0.3s ease;
        }

        #email-dialog.visible .email-dialog-box {
            transform: translateY(0);
        }

        .email-dialog-title {
            font-size: 18px;
            line-height: 1.6;
            color: #141413;
            margin-bottom: 24px;
        }

        .email-dialog-input {
            width: 100%;
            padding: 16px 20px;
            border: 2px solid #E0E0E0;
            border-radius: 12px;
            font-size: 16px;
            font-family: inherit;
            text-align: center;
            outline: none;
            transition: border-color 0.2s;
        }

        .email-dialog-input:focus {
            border-color: var(--bg-xi);
        }

        .email-dialog-privacy {
            font-size: 12px;
            color: #888;
            margin-top: 12px;
            line-height: 1.5;
        }

        .email-dialog-btn {
            margin-top: 24px;
            width: 100%;
            padding: 16px;
            background: var(--bg-xi);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .email-dialog-btn:hover {
            transform: scale(1.02);
        }

        .email-dialog-skip {
            margin-top: 16px;
            background: none;
            border: none;
            color: #999;
            font-size: 14px;
            cursor: pointer;
        }

        .email-dialog-skip:hover {
            color: #666;
        }

        /* ====== CHOIX MISTER/MADAME XI ====== */
        .xi-choice-btn:hover {
            opacity: 0.9;
        }
        .xi-choice-btn:active,
        .xi-choice-btn.selected {
            opacity: 0.85;
        }
        /* Bulle de salutation — toujours visible au-dessus de l'image */
        .xi-hover-bubble {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255,255,255,0.93);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            color: #D49A10;
            font-size: 11px;
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 10px;
            white-space: nowrap;
            opacity: 1;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            z-index: 2;
        }

        /* ====== THEME SELECTOR (INST-004 + INST-005) ====== */
        #theme-selector {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: #D49A10 url('../../assets/kraft.webp') center center / cover no-repeat;
            z-index: 1000;
            flex-direction: column;
            align-items: center;
            padding: 0;
            font-family: inherit;
            overflow: hidden;
        }
        #theme-selector.visible {
            display: flex;
        }
        .theme-header {
            padding: 48px 24px 16px;
            text-align: center;
            width: 100%;
            position: relative;
            z-index: 1;
        }
        .theme-header-text {
            font-size: 1.32rem;
            color: rgba(255,255,255,0.9);
            font-weight: 400;
            line-height: 1.55;
        }
        .theme-list {
            position: relative;
            z-index: 1;
            flex: 1;
            overflow-y: auto;
            width: 100%;
            padding: 8px 24px 64px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            -webkit-overflow-scrolling: touch;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.35) transparent;
        }
        .theme-list::-webkit-scrollbar { width: 6px; }
        .theme-list::-webkit-scrollbar-track { background: transparent; }
        .theme-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); border-radius: 3px; }
        .theme-item {
            width: 100%;
            padding: 16px 20px;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            background: rgba(245, 176, 39, 0.50);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 16px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.22);
            cursor: pointer;
            text-align: center;
            transition: all 0.25s ease;
            opacity: 0;
            transform: translateY(-20px);
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
        }
        .theme-icon {
            flex-shrink: 0;
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .theme-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            opacity: 0.9;
        }
        #theme-categories {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        /* Animation catégories slide-up */
        .theme-cat {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.35s ease, transform 0.35s ease;
        }
        .theme-cat.visible {
            opacity: 1;
            transform: translateY(0);
        }
        /* Phylactère exemple — au-dessus du bouton survolé */
        .theme-example-card {
            position: absolute;
            left: 50%;
            transform: translateX(-50%) scale(0.92);
            background: rgba(255,255,255,0.95);
            border: 1px solid rgba(255,255,255,0.95);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            color: rgba(0,0,0,0.80);
            font-size: 1.15rem;
            font-style: italic;
            line-height: 1.5;
            padding: 20px 32px;
            text-align: center;
            width: calc(100% - 64px);
            max-width: 340px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.25s ease, transform 0.25s ease;
            z-index: 30;
            font-family: inherit;
        }
        /* Triangle phylactère — pointe vers le bas, côté gauche */
        .theme-example-card::after {
            content: "";
            position: absolute;
            bottom: -12px;
            left: 32px;
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 12px solid rgba(255,255,255,0.95);
        }
        .theme-example-card.show {
            opacity: 1;
            transform: translateX(-50%) scale(1);
        }
        /* Zone chevrons scroll en bas */
        .theme-scroll-zone {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(to top, rgba(45,74,62,0.95) 0%, rgba(45,74,62,0) 100%);
            z-index: 25;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .theme-scroll-chevrons {
            color: rgba(255,255,255,0.5);
            font-size: 18px;
            line-height: 1;
            letter-spacing: -2px;
            transition: color 0.15s ease;
        }
        .theme-scroll-zone:active .theme-scroll-chevrons {
            color: rgba(255,255,255,0.85);
        }
        .theme-item {
            position: relative;
        }
        .theme-text {
            flex: 1;
            text-align: center;
            min-width: 0;
        }
        .theme-play {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: rgba(255,255,255,0.5);
            border-left: 1px solid rgba(255,255,255,0.15);
            margin-left: 4px;
            cursor: pointer;
            border-radius: 0 12px 12px 0;
            transition: color 0.15s ease, background 0.15s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .theme-play:active {
            color: #fff;
            background: rgba(255,255,255,0.12);
        }
        /* Variante noire pour le bouton blanc (tartines) */
        .theme-play-dark {
            color: rgba(0,0,0,0.35);
            border-left: 1px solid rgba(0,0,0,0.12);
        }
        .theme-play-dark:active {
            color: #000;
            background: rgba(0,0,0,0.08);
        }
        .theme-item.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .theme-item.selected {
            background: linear-gradient(160deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.15) 100%);
            border: 1px solid rgba(255,255,255,0.35);
        }
        .theme-item.touched {
            background: rgba(0,0,0,0.25);
            border-color: rgba(255,255,255,0.08);
            box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
        }
        .theme-item:hover {
            transform: scale(1.025);
            background: rgba(245, 176, 39, 0.65);
            box-shadow: 0 6px 18px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.28);
        }
        .theme-item:active {
            transform: scale(0.97);
        }
        /* Bouton pause session */
        .session-pause-btn {
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2px 8px;
            border-radius: 4px;
            opacity: 0.4;
            transition: opacity 0.2s;
            -webkit-tap-highlight-color: transparent;
        }
        .session-pause-btn:hover { opacity: 0.75; }
        .session-pause-btn svg { width: 30px; height: 30px; fill: #aaa; }
        .session-pause-btn.paused { opacity: 0.6; }
        .session-pause-btn.paused svg { fill: #F5B027; }
        .theme-item .theme-main {
            font-size: 24px;
            font-weight: 700;
            color: #fff;
            letter-spacing: 0.3px;
            margin-bottom: 5px;
        }
        .theme-item .theme-sub {
            font-size: 14px;
            font-weight: 300;
            color: rgba(255,255,255,0.4);
            font-style: italic;
        }
        .theme-item.theme-libre {
            border: 2px solid rgba(255,255,255,0.75);
            background: linear-gradient(160deg, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.30) 100%);
            box-shadow: 0 6px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
            margin-bottom: 8px;
        }
        .theme-item.theme-libre .theme-main {
            font-size: 22px;
            font-weight: 800;
            font-style: normal;
            color: #ffffff;
            letter-spacing: 0.2px;
        }
        .theme-item.theme-libre .theme-sub {
            color: rgba(255,255,255,0.65);
            font-style: normal;
            font-weight: 400;
        }
        .theme-item.theme-libre.selected {
            background: linear-gradient(160deg, rgba(255,220,100,0.4) 0%, rgba(255,180,50,0.25) 100%);
            border-color: rgba(255,220,100,0.8);
            box-shadow: 0 8px 24px rgba(200,130,0,0.4), inset 0 1px 0 rgba(255,240,150,0.5);
        }
        .theme-item.theme-libre.selected .theme-main {
            color: #ffffff;
        }
        /* Bouton "J'ai amené mes tartines" — fond blanc, typo noire */
        .theme-item.theme-tartines {
            background: #ffffff;
            border: 2px solid rgba(255,255,255,0.6);
            box-shadow: 0 4px 16px rgba(0,0,0,0.18);
            margin-bottom: 8px;
        }
        .theme-item.theme-tartines .theme-main {
            font-size: 20px;
            font-weight: 700;
            font-style: normal;
            color: #141413;
            letter-spacing: 0.1px;
        }
        .theme-item.theme-tartines .theme-sub {
            color: rgba(0,0,0,0.5);
            font-style: normal;
            font-weight: 400;
        }
        .theme-item.theme-tartines.selected {
            background: linear-gradient(160deg, rgba(255,220,100,0.35) 0%, rgba(255,200,60,0.2) 100%);
            border-color: rgba(200,150,0,0.6);
        }
        .theme-item.theme-tartines.selected .theme-main {
            color: #141413;
        }
        #theme-confirm-btn {
            position: fixed;
            bottom: 24px;
            left: 24px;
            right: 24px;
            padding: 16px;
            background: #fff;
            color: #F5B027;
            font-size: 17px;
            font-weight: 700;
            border: none;
            border-radius: 16px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.2);
            cursor: pointer;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.35s ease, transform 0.35s ease;
            z-index: 1001;
            pointer-events: none;
        }
        #theme-confirm-btn.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 4px; }
        .zone-xi-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
        #about-screen::-webkit-scrollbar-thumb,
        #cgu-screen::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

        /* ====== MODE SIMULATION MOBILE ====== */
        @media (min-width: 500px) {
            html {
                background: #141413 !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
                height: 100vh !important;
                overflow: hidden !important;
            }
            body {
                width: 375px !important;
                min-width: 375px !important;
                max-width: 375px !important;
                height: 812px !important;
                min-height: 812px !important;
                max-height: 812px !important;
                overflow: hidden !important;
                border-radius: 40px !important;
                box-shadow: 0 0 0 6px #333, 0 0 0 8px #555, 0 16px 48px rgba(0,0,0,0.5);
                position: relative !important;
                /* transform: translateZ(0) crée un containing block pour position:fixed */
                /* scale(0.85) réduit pour tenir dans la fenêtre */
                transform: translateZ(0) scale(0.85);
                transform-origin: center center;
            }
            /* Simule l'encoche iPhone */
            body::before {
                content: '';
                position: absolute;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 100px;
                height: 24px;
                background: #000;
                border-radius: 0 0 14px 14px;
                z-index: 99999;
                pointer-events: none;
            }
        }
