/* Édition 19 · corrections ciblées. Les commandes existantes gardent leur identité. */
#home>.mode-grid{gap:20px;align-items:stretch}
#home .mode-card{min-width:0;min-height:112px}
#home .mode-card>span:nth-child(2){min-width:0}
#home .mode-card strong{line-height:1.3;overflow-wrap:break-word}
#home .mode-card small{line-height:1.55}
.special-mode{margin-top:38px;padding-top:25px;border-top:1px solid var(--line)}
.special-mode-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 15px}
.special-mode-heading h2{margin:0;font-size:11px;line-height:1.5;font-weight:800;letter-spacing:1.5px;text-transform:uppercase}
.special-mode-heading>span{font-size:10px;color:var(--muted);text-align:right;line-height:1.5}
#home #mode-6{min-height:126px;padding:25px 24px;gap:20px}
#mode-6 .mode-number{opacity:1}
#mode-6 .special-mode-copy{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding-right:12px}
#mode-6 strong{font-size:21px}
#mode-6 small{margin:0;font-size:12px}
#home .home-tools{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;max-width:none;margin:34px auto 0}
#home .home-tools button{width:100%;min-height:54px;padding:14px 16px;font-size:12px;line-height:1.45}
:is(#two-choice,#three-choice,#four-choice) .mode-card{margin:22px 0;min-width:0}
:is(#two-choice,#three-choice,#four-choice) .mode-card>span:nth-child(2){min-width:0}
#three-choice .mode-card{gap:17px;min-height:108px}
#three-choice .mode-card strong{line-height:1.35}
#three-choice .mode-card small{line-height:1.55}
/* Vrais composants de la préparation Time’s Up : aucun bouton natif gris. */
#timesup .tu-level-grid,#timesup .tu-category-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;margin:20px 0 26px}
#timesup :is(.tu-level-choice,.tu-category-choice){appearance:none;-webkit-appearance:none;position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;width:100%;min-width:0;min-height:64px;margin:0;padding:17px 44px 17px 18px;border:1px solid #cbd7c5;border-radius:15px;background:#fffdf7;color:#193b31;box-shadow:0 3px 10px rgba(25,59,49,.045);font:inherit;font-size:14px;line-height:1.45;text-align:left;overflow-wrap:break-word;transition:background .16s,border-color .16s,transform .16s}
#timesup :is(.tu-level-choice,.tu-category-choice)::after{content:'›';position:absolute;right:18px;top:50%;transform:translateY(-50%);font:24px/1 system-ui,sans-serif;color:#6a816b}
#timesup .tu-level-choice strong{display:block;font-size:15px;font-weight:750;line-height:1.35}
#timesup .tu-level-choice>span{display:block;max-width:100%;font-size:12px;font-weight:400;line-height:1.55;color:#52675c}
#timesup :is(.tu-level-choice,.tu-category-choice):hover{border-color:#6c956c;background:#edf2e5}
#timesup :is(.tu-level-choice,.tu-category-choice):active{transform:translateY(1px)}
#timesup :is(.tu-level-choice,.tu-category-choice):focus-visible{outline:3px solid #925d1b;outline-offset:4px}
#timesup .tu-category-choice:first-child,#timesup .tu-level-choice:first-child{border-style:dashed;background:#edf2e5}
/* Les six tuiles partagent un pictogramme lisible et une description espacée. */
:where(#timesup,#universe-public) .universe-tile{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;align-content:center;column-gap:15px;row-gap:6px;min-height:104px;padding:18px 34px 18px 17px;text-align:left}
:where(#timesup,#universe-public) .universe-symbol{display:grid;grid-column:1;grid-row:1 / span 2;place-items:center;width:46px;height:46px;min-width:46px;border-radius:14px}
:where(#timesup,#universe-public) .universe-symbol svg{display:block;flex:none;width:32px;height:32px}
:where(#timesup,#universe-public) .universe-tile>strong{grid-column:2;grid-row:1;min-width:0;line-height:1.3}
:where(#timesup,#universe-public) .universe-tile>small{grid-column:2;grid-row:2;min-width:0;line-height:1.5}
:where(#timesup,#universe-public) .universe-tile>.universe-arrow{position:absolute;top:13px;right:13px;font-size:16px;line-height:1}
/* Les autres écrans restent contenus, y compris noms longs et petits téléphones. */
.panel,.settings-dialog,.tu-round-announcement{max-width:100%;overflow-wrap:break-word}
.panel{max-width:540px}
.panel :is(input,select,textarea){min-width:0;max-width:100%}
.step-actions{flex-wrap:wrap}
.step-actions>.primary{margin-top:0}
.step-actions>button{min-width:min(135px,100%)}
#timesup .setup-progress{gap:10px;padding:13px 15px}
#timesup .panel>h2{line-height:1.3;margin-bottom:12px}
#timesup .panel>h2+p{margin-top:0;margin-bottom:20px;line-height:1.6}
#timesup .step-actions{margin-top:24px}
/* Crème douce : relief discret, sans toucher aux boutons sculptés du thème sombre. */
html:not([data-appearance]) #timesup :is(.tu-level-choice,.tu-category-choice),html[data-appearance="cream"] #timesup :is(.tu-level-choice,.tu-category-choice){box-shadow:-2px -2px 5px rgba(255,255,255,.9),3px 4px 10px rgba(25,59,49,.065)}
/* Sombre sculpté : les nouveaux choix reprennent les surfaces et contrastes du thème. */
html[data-appearance="dark"] #timesup :is(.tu-level-choice,.tu-category-choice){border:1px solid #303a32;background:#151515;color:rgba(255,255,255,.9);box-shadow:-3px -3px 7px #252525,4px 4px 8px rgba(0,0,0,.34);border-radius:20px}
html[data-appearance="dark"] #timesup .tu-level-choice>span{color:rgba(255,255,255,.65)}
html[data-appearance="dark"] #timesup :is(.tu-level-choice,.tu-category-choice)::after{color:#81c784}
html[data-appearance="dark"] #timesup :is(.tu-level-choice,.tu-category-choice):hover{background:#1c251f;border-color:#81c784}
html[data-appearance="dark"] #timesup :is(.tu-level-choice,.tu-category-choice):focus-visible{outline-color:#81c784}
html[data-appearance="dark"] #timesup :is(.tu-level-choice,.tu-category-choice):first-child{border-style:dashed;background:#18291f}
html[data-appearance="dark"] #home .special-mode{border-color:#303a32}
html[data-appearance="dark"] #home #mode-6{background:#004d40;box-shadow:-4px -4px 9px #155d51,6px 6px 12px rgba(0,0,0,.45)}
/* Verre : transparences bleues et menthe, jamais appliquées au thème crème. */
html[data-appearance="glass"] .special-mode-heading h2{color:#c4ffe5}
html[data-appearance="glass"] #home #mode-6{border-color:#bcffe5;background:linear-gradient(125deg,rgba(183,255,224,.25),rgba(100,174,255,.22));box-shadow:0 12px 25px rgba(4,24,83,.24),inset 0 1px rgba(255,255,255,.4)}
html[data-appearance="glass"] #timesup :is(.tu-level-choice,.tu-category-choice),html[data-appearance="glass"] :is(#timesup,#universe-public) .universe-tile{border:1px solid rgba(255,255,255,.46);border-radius:18px;background:linear-gradient(135deg,rgba(255,255,255,.17),rgba(255,255,255,.08));color:#fff;box-shadow:0 5px 14px rgba(4,24,83,.16)}
html[data-appearance="glass"] #timesup .tu-level-choice>span,html[data-appearance="glass"] :is(#timesup,#universe-public) .universe-tile>small{color:rgba(255,255,255,.8)}
html[data-appearance="glass"] :is(#timesup,#universe-public) .universe-tile>strong{color:#fff}
html[data-appearance="glass"] #timesup :is(.tu-level-choice,.tu-category-choice)::after{color:#c4ffe5}
html[data-appearance="glass"] #timesup :is(.tu-level-choice,.tu-category-choice):hover{background:rgba(190,255,226,.2);border-color:#c4ffe5}
html[data-appearance="glass"] #timesup :is(.tu-level-choice,.tu-category-choice):first-child{border-style:dashed;background:rgba(190,255,226,.14)}
html[data-appearance="glass"] :is(#timesup,#universe-public) .universe-symbol{color:#c4ffe5;border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.12)}
html[data-appearance="glass"] #timesup :is(.tu-level-choice,.tu-category-choice):focus-visible{outline-color:#e1fff2}
/* Jaune solaire : les contours francs restent un choix séparé. */
html[data-appearance="brutal"] .special-mode{border-top:2px solid #111}
html[data-appearance="brutal"] #home #mode-6{background:#ffd000;border:3px solid #111;color:#111;box-shadow:6px 6px 0 #111}
html[data-appearance="brutal"] #timesup :is(.tu-level-choice,.tu-category-choice),html[data-appearance="brutal"] :is(#timesup,#universe-public) .universe-tile{border:2px solid #111;border-radius:8px;background:#fff;color:#111;box-shadow:4px 4px 0 #111}
html[data-appearance="brutal"] #timesup .tu-level-choice>span,html[data-appearance="brutal"] :is(#timesup,#universe-public) .universe-tile>small,html[data-appearance="brutal"] :is(#timesup,#universe-public) .universe-tile>strong{color:#111}
html[data-appearance="brutal"] :is(#timesup,#universe-public) .universe-symbol{background:#39ff14;color:#111;border:2px solid #111;border-radius:8px}
html[data-appearance="brutal"] #timesup :is(.tu-level-choice,.tu-category-choice)::after{color:#111}
html[data-appearance="brutal"] #timesup :is(.tu-level-choice,.tu-category-choice):hover,html[data-appearance="brutal"] #timesup :is(.tu-level-choice,.tu-category-choice):first-child{background:#fff3b0;border-style:solid}
html[data-appearance="brutal"] #timesup :is(.tu-level-choice,.tu-category-choice):focus-visible{outline-color:#111}
@media(min-width:900px){#home>.mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#home>.mode-grid .mode-card{gap:14px;padding:23px 17px;min-height:132px}#home>.mode-grid .mode-card strong{font-size:17px}}
@media(max-width:700px){#home>.mode-grid{grid-template-columns:minmax(0,1fr);gap:20px}}
@media(max-width:600px){.special-mode{margin-top:34px;padding-top:23px}#home #mode-6{padding:23px 20px;gap:17px}#mode-6 strong{font-size:19px}#home .home-tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:32px}#home #join-qr{grid-column:1 / -1}#home .home-tools button{font-size:11px;padding:13px 10px}#three-choice .mode-card{padding:19px 15px;gap:14px}:where(#timesup,#universe-public) .universe-tile{padding:17px 30px 17px 14px;column-gap:12px}#timesup :is(.tu-level-choice,.tu-category-choice){padding:17px 37px 17px 16px}#timesup .tu-level-choice strong{font-size:14px}}
@media(max-width:350px){.special-mode-heading{gap:8px}.special-mode-heading>span{font-size:9px}#home #mode-6{gap:13px;padding:20px 15px}#mode-6 strong{font-size:17px}:where(#timesup,#universe-public) .universe-tile{grid-template-columns:42px minmax(0,1fr);column-gap:10px;padding-left:12px}:where(#timesup,#universe-public) .universe-symbol{width:40px;height:40px;min-width:40px}:where(#timesup,#universe-public) .universe-symbol svg{width:29px;height:29px}#timesup .tu-level-choice>span{font-size:11px}}
@media(prefers-reduced-motion:reduce){#timesup :is(.tu-level-choice,.tu-category-choice){transition:none}}

/* Revue de tous les parcours : les liens de retour restent légers et les champs lisibles. */
html[data-appearance="glass"] :is(#home,#two-choice,#three-choice,#four-choice,#game,#timesup) .text-button{min-height:44px;padding:12px 8px;border:0;border-radius:8px;background:transparent;color:#e1fff2;box-shadow:none}
html[data-appearance="brutal"] :is(#home,#two-choice,#three-choice,#four-choice,#game,#timesup) .text-button{min-height:44px;padding:12px 8px;border:0;border-radius:0;background:transparent;color:#111;box-shadow:none}
html[data-appearance="glass"] :is(.panel,.settings-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:#174c81;color:#fff;border:1px solid rgba(255,255,255,.45);box-shadow:inset 0 2px 6px rgba(0,20,60,.15)}
html[data-appearance="glass"] :is(.panel,.settings-dialog) input::placeholder,html[data-appearance="glass"] :is(.panel,.settings-dialog) textarea::placeholder{color:rgba(255,255,255,.65)}
html[data-appearance="glass"] :is(.panel,.settings-dialog) :is(input,select,textarea):focus{border-color:#c4ffe5;outline:2px solid #c4ffe5;outline-offset:2px}
html[data-appearance="brutal"] :is(.panel,.settings-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){border:2px solid #111;border-radius:6px;background:#fff;color:#111;box-shadow:none}
html[data-appearance="glass"] :is(.hero h1,.hero h1 em,.brand,footer,.version,.special-mode-heading h2){color:#fff}
html[data-appearance="brutal"] :is(.hero h1,.hero h1 em,.brand,footer,.version){color:#111}
html[data-appearance="glass"] .tu-round-announcement{box-shadow:0 18px 40px rgba(4,24,83,.2)}
html:not([data-appearance]) .tu-round-announcement,html[data-appearance="cream"] .tu-round-announcement{box-shadow:0 12px 32px rgba(25,59,49,.09)}
html[data-appearance="glass"] .settings-done{background:#c4ffe5;color:#103e46}
html[data-appearance="brutal"] .settings-done{background:#ffd000;color:#111}
html[data-appearance="glass"] .settings-trigger{color:#fff;border-color:rgba(255,255,255,.4);background:rgba(255,255,255,.13);box-shadow:0 4px 12px rgba(0,20,60,.2)}
html[data-appearance="brutal"] .settings-trigger{color:#111;border:2px solid #111;background:#fff;box-shadow:3px 3px 0 #111}
html[data-appearance="glass"] .setup-progress{color:rgba(255,255,255,.8);border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.1)}
html[data-appearance="glass"] .setup-progress [aria-current="step"]{color:#c4ffe5}
html[data-appearance="brutal"] .setup-progress{color:#111;background:#fff3b0;border:2px solid #111}
html[data-appearance="brutal"] .setup-progress [aria-current="step"]{color:#111}
/* Les modales de règles, listes et confirmations suivent aussi l’apparence choisie. */
html[data-appearance="glass"]{--ux-paper:#154c80;--ux-ink:#fff;--ux-muted:#d1e5f1;--ux-accent:#c4ffe5;--ux-line:rgba(255,255,255,.3);--ux-raised:0 8px 22px rgba(0,20,60,.25);--ux-inset:inset 0 2px 6px rgba(0,20,60,.18);--ux-danger:#ffd0c8}
html[data-appearance="brutal"]{--ux-paper:#fff;--ux-ink:#111;--ux-muted:#3c3420;--ux-accent:#111;--ux-line:#111;--ux-raised:4px 4px 0 #111;--ux-inset:inset 0 0 0 1px #111;--ux-danger:#a23b32}
html[data-appearance="glass"] .appui-primary{color:#103e46;background:#c4ffe5}
html[data-appearance="brutal"] .appui-primary{color:#111;background:#ffd000;border:2px solid #111}
html[data-appearance="glass"] .appui-option[aria-selected="true"]{color:#c4ffe5;background:#1c627f}
html[data-appearance="glass"] .appui-rules-content .rule-card strong,html[data-appearance="glass"] .appui-rules-content article strong{color:#c4ffe5}
.appui-dialog,.appui-picker,.settings-dialog,.backup-card{min-width:0;overflow-wrap:break-word}
html[data-appearance="glass"] .backup-card{background:rgba(255,255,255,.1)}
html[data-appearance="glass"] .backup-preview{background:#164e45;color:#fff}
html[data-appearance="glass"] .backup-preview p{color:#fff}
html[data-appearance="glass"] .backup-status[data-kind=success],html[data-appearance="dark"] .backup-status[data-kind=success]{color:#a9efc5}

html[data-appearance="glass"] body{background-attachment:scroll;background-repeat:no-repeat;background-size:100% 100%}
html[data-appearance="glass"] :is(#home,#two-choice,#three-choice,#four-choice,#game,#timesup) button.text-button{min-height:44px;padding:12px 8px;border:0;border-radius:8px;background:transparent;color:#e1fff2;box-shadow:none}
html[data-appearance="brutal"] :is(#home,#two-choice,#three-choice,#four-choice,#game,#timesup) button.text-button{min-height:44px;padding:12px 8px;border:0;border-radius:0;background:transparent;color:#111;box-shadow:none}
html[data-appearance="glass"] .universe-tile .universe-arrow{color:#c4ffe5}
html[data-appearance="brutal"] .universe-tile .universe-arrow{color:#111}

/* Le secret et le temps doivent rester parfaitement lisibles en pleine manche. */
html[data-appearance="glass"] #timesup .word-card{border:1px solid rgba(255,255,255,.45);background:linear-gradient(135deg,#155b87,#234779);color:#fff;box-shadow:0 8px 20px rgba(4,24,83,.2);border-radius:22px}
html[data-appearance="glass"] #timesup .word-card .word{color:#fff}
html[data-appearance="glass"] #timesup .timer-row strong{color:#103e46;background:#c4ffe5;border-color:rgba(255,255,255,.65);box-shadow:0 4px 12px rgba(4,24,83,.15)}
html[data-appearance="brutal"] #timesup .word-card{border:3px solid #111;border-radius:8px;background:#39ff14;color:#111;box-shadow:5px 5px 0 #111}
html[data-appearance="brutal"] #timesup .word-card .word,html[data-appearance="brutal"] #timesup .word-card>span{color:#111}
html[data-appearance="brutal"] #timesup .timer-row strong{color:#111;background:#ffd000;border:2px solid #111;box-shadow:3px 3px 0 #111}

html[data-appearance="glass"] #game .score-item .avatar{background:#c4ffe5;color:#103e46;border-color:rgba(255,255,255,.6)}
html[data-appearance="brutal"] #game .score-item .avatar{background:#ffd000;color:#111;border:2px solid #111}

/* La collection locale est aussi un écran complet, pas une carte crème sous du texte blanc. */
html[data-appearance="glass"] #bank-panel{background:linear-gradient(140deg,#175b88,#263e7a);color:#fff;border:1px solid rgba(255,255,255,.4);box-shadow:0 12px 28px rgba(4,24,83,.2)}
html[data-appearance="glass"] #bank-panel button.text-button{min-height:44px;padding:12px 8px;background:transparent;color:#e1fff2;border:0;box-shadow:none}
html[data-appearance="glass"] #bank-panel :is(button.secondary,.import-button){background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.4);box-shadow:0 4px 12px rgba(4,24,83,.14)}
html[data-appearance="glass"] #bank-panel :is(button.danger,.danger){color:#ffd0c8;background:#67424f;border-color:rgba(255,208,200,.5)}
html[data-appearance="glass"] #bank-panel button.primary{background:#c4ffe5;color:#103e46;border-color:#c4ffe5;box-shadow:0 5px 12px rgba(4,24,83,.2)}
html[data-appearance="glass"] .settings-audio-section .sound-controls{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.35)}
html[data-appearance="glass"] .settings-audio-section .sound-controls label{color:#fff}

/* Le panneau de liaison approuvé conserve son fond clair et son statut lisible. */
html[data-appearance="glass"] #link-panel #link-panel-status{color:#36584b}
