
/* V24.339 — Vulpingo Duel */
.duel-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:30px;background:linear-gradient(135deg,rgba(15,118,110,.11),rgba(245,158,11,.09))}
.duel-hero h1,.duel-history-heading h1{margin:.25rem 0 .5rem;font-size:clamp(2rem,4vw,3.2rem)}
.duel-hero p{max-width:760px;margin:0;color:var(--muted,#64748b);font-size:1.05rem}
.duel-hero-badge,.duel-vs-pill{display:grid;place-items:center;border-radius:999px;background:#0f766e;color:#fff;font-weight:950;box-shadow:0 12px 30px rgba(15,118,110,.24)}
.duel-hero-badge{width:92px;height:92px;font-size:2rem;transform:rotate(-6deg)}
.duel-hero-stats{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.duel-hero-stats span{padding:9px 13px;border-radius:999px;background:#fff;border:1px solid rgba(15,118,110,.12)}
.duel-lobby-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px;margin:18px 0}
.duel-lobby-grid>.card,.duel-open-lobby{padding:24px}.duel-form{display:grid;gap:18px}.duel-form select,.duel-code-form input,.duel-text-answer input{width:100%}
.duel-label{display:block;font-weight:800;margin-bottom:8px}.duel-mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.duel-mode-option{cursor:pointer}.duel-mode-option input{position:absolute;opacity:0;pointer-events:none}.duel-mode-option span{display:grid;gap:4px;height:100%;padding:14px;border:1px solid rgba(15,23,42,.12);border-radius:16px;background:#fff;transition:.18s ease}.duel-mode-option span:first-letter{font-size:1.2rem}.duel-mode-option small{color:#64748b;line-height:1.35}.duel-mode-option input:checked+span{border-color:#0f766e;box-shadow:0 0 0 3px rgba(15,118,110,.12);background:#f0fdfa}
.duel-private-toggle{display:flex!important;align-items:center;gap:9px}.duel-private-toggle input{width:auto}
.duel-primary{background:linear-gradient(135deg,#0f766e,#0d9488)!important;color:#fff!important;border-color:transparent!important}
.duel-code-form{display:grid;gap:10px}.duel-code-form input{text-align:center;text-transform:uppercase;letter-spacing:.22em;font-size:1.4rem;font-weight:900}
.duel-links{display:grid;gap:8px;margin-top:22px}.duel-links a{padding:12px 14px;border-radius:13px;background:rgba(15,118,110,.06);font-weight:800;text-decoration:none}
.duel-section-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}.duel-live-dot{font-size:.76rem;font-weight:900;color:#dc2626}
.duel-open-list{display:grid;gap:9px}.duel-open-item{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px;border-radius:15px;background:#f8fafc;border:1px solid #e2e8f0}.duel-open-item div{display:grid;gap:3px}.duel-open-item span{font-size:.86rem;color:#64748b}
.duel-empty{text-align:center;padding:34px 18px;color:#64748b}
.duel-game-shell{width:min(1180px,calc(100% - 28px));margin:18px auto 60px}.duel-game-top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:14px 18px;position:sticky;top:76px;z-index:30}.duel-back{text-decoration:none;font-weight:800}.duel-game-title{text-align:center;display:grid}.duel-game-title span{font-weight:850}.duel-game-title strong{font-size:.72rem;color:#0f766e}.duel-timer{justify-self:end;text-align:right;display:grid}.duel-timer strong{font-size:1.35rem;font-variant-numeric:tabular-nums}
.duel-waiting{margin-top:18px;padding:50px 25px;text-align:center}.duel-waiting-icon{display:block;font-size:3rem}.duel-room-code{margin:18px auto 8px;padding:15px 22px;border:0;border-radius:16px;background:#0f172a;color:#fff;font-size:1.7rem;font-weight:950;letter-spacing:.16em;cursor:pointer}.duel-room-code small{display:block;font-size:.65rem;letter-spacing:0;color:#94a3b8}.duel-waiting-pulse{display:flex;justify-content:center;gap:7px;margin-top:20px}.duel-waiting-pulse i{width:9px;height:9px;background:#0f766e;border-radius:50%;animation:duelPulse 1s infinite alternate}.duel-waiting-pulse i:nth-child(2){animation-delay:.2s}.duel-waiting-pulse i:nth-child(3){animation-delay:.4s}@keyframes duelPulse{to{opacity:.25;transform:translateY(-5px)}}
.duel-arena{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;margin-top:16px;align-items:stretch}.duel-player-panel{padding:16px}.duel-vs-pill{width:52px;height:52px;align-self:center;z-index:2}.duel-player-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px}.duel-player-head>div:nth-child(2){display:grid}.duel-player-head small{font-size:.68rem;color:#64748b;font-weight:900}.duel-avatar{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#0f766e;color:#fff;font-weight:900}.duel-avatar-opponent{background:#f59e0b}.duel-live-score{font-size:1.05rem;white-space:nowrap}.duel-progress-track{height:9px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-top:14px}.duel-progress-track i{display:block;width:0;height:100%;background:linear-gradient(90deg,#0f766e,#14b8a6);transition:width .25s ease}.duel-player-opponent .duel-progress-track i{background:linear-gradient(90deg,#d97706,#f59e0b)}.duel-progress-meta{display:flex;gap:14px;margin-top:8px;font-size:.82rem;color:#64748b}
.duel-question-card{grid-column:1/-1;padding:clamp(20px,4vw,38px);min-height:340px}.duel-question-topline{display:flex;justify-content:space-between;gap:15px}.duel-status-chip{font-size:.7rem;font-weight:950;color:#166534;background:#dcfce7;border-radius:999px;padding:6px 10px}.duel-prompt{margin:22px 0;padding:22px;border-radius:18px;background:#f8fafc;border:1px solid #e2e8f0;font-size:clamp(1.15rem,2.5vw,1.6rem);font-weight:850;text-align:center;white-space:pre-wrap}
.duel-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.duel-option{padding:16px;border-radius:15px;border:1px solid #cbd5e1;background:#fff;font:inherit;font-weight:800;cursor:pointer;transition:.15s ease}.duel-option:hover{transform:translateY(-1px);border-color:#0f766e;background:#f0fdfa}.is-submitting .duel-option{pointer-events:none;opacity:.65}
.duel-text-answer{display:grid;grid-template-columns:1fr auto;gap:10px}.duel-text-answer input{font-size:1.05rem}
.duel-feedback{margin:14px 0 0;padding:12px 14px;border-radius:13px;font-weight:850}.duel-feedback.correct{background:#dcfce7;color:#166534}.duel-feedback.wrong{background:#fee2e2;color:#991b1b}
.duel-result{text-align:center;margin-top:18px;padding:50px 24px}.duel-result-icon{font-size:4rem}.duel-result-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.duel-history-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px}.duel-history-list,.duel-ranking-list{display:grid;gap:9px}.duel-history-item,.duel-ranking-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:14px;border-radius:16px;border:1px solid #e2e8f0;background:#fff}.duel-history-item.won{border-left:4px solid #16a34a}.duel-history-item.lost{border-left:4px solid #f59e0b}.duel-history-result{font-size:1.45rem}.duel-history-item>div:nth-child(2){display:grid;gap:3px}.duel-history-item span,.duel-history-item small,.duel-ranking-row small{color:#64748b}.duel-history-score{text-align:right;display:grid}.duel-history-score strong{font-size:1.25rem}
.duel-ranking-hero .button{flex:0 0 auto}.duel-ranking-card{padding:18px}.duel-ranking-row.is-me{background:#f0fdfa;border-color:rgba(15,118,110,.35)}.duel-rank-number{width:46px;text-align:center;font-weight:950;font-size:1.12rem}.duel-ranking-row>div{display:grid}.duel-elo{font-size:1.2rem;text-align:right}.duel-elo small{font-size:.65rem}
@media(max-width:780px){.duel-lobby-grid{grid-template-columns:1fr}.duel-mode-grid{grid-template-columns:1fr}.duel-hero{align-items:flex-start}.duel-hero-badge{width:64px;height:64px;font-size:1.3rem}.duel-game-shell{width:min(100% - 18px,1180px);margin-top:9px}.duel-game-top{top:64px;grid-template-columns:auto 1fr auto}.duel-game-title span{max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duel-arena{grid-template-columns:1fr 1fr;gap:8px}.duel-vs-pill{display:none}.duel-player-head{grid-template-columns:auto 1fr}.duel-live-score{grid-column:1/-1;font-size:.9rem}.duel-player-panel{padding:12px}.duel-avatar{width:34px;height:34px}.duel-progress-meta{gap:8px;font-size:.74rem}.duel-question-card{grid-column:1/-1}.duel-options{grid-template-columns:1fr}.duel-text-answer{grid-template-columns:1fr}.duel-history-heading{align-items:flex-start;flex-direction:column}.duel-history-item,.duel-ranking-row{grid-template-columns:auto 1fr}.duel-history-score,.duel-elo{grid-column:2;text-align:left}.duel-section-heading{align-items:flex-start}}


/* V24.340 — Adventure Race */
.duel-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.duel-mode-adventure span{background:linear-gradient(135deg,#fffbeb,#fff7ed);border-color:#f59e0b}
.duel-mode-adventure input:checked+span{border-color:#d97706;box-shadow:0 0 0 3px rgba(245,158,11,.16);background:#fffbeb}
.duel-adventure-note{margin:-5px 0 0;padding:10px 12px;border-radius:12px;background:#fffbeb;color:#92400e;font-size:.84rem}
.duel-story-name{font-size:.72rem;color:#d97706;font-weight:850;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.duel-adventure-scene{grid-column:1/-1;padding:22px;overflow:hidden;background:linear-gradient(145deg,#fffdf7,#f8fafc);border-color:rgba(217,119,6,.18)}
.duel-adventure-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}
.duel-adventure-heading>strong{font-size:1.12rem}
.duel-scene-narration{margin:0 0 16px;color:#475569;line-height:1.65}
.duel-scene-dialogue{display:grid;gap:8px}
.duel-dialogue-line{display:grid;grid-template-columns:minmax(70px,110px) 1fr;gap:10px;align-items:start;padding:10px 12px;border-radius:13px;background:#fff;border:1px solid #e2e8f0}
.duel-dialogue-line strong{text-transform:capitalize;color:#0f766e}
.duel-dialogue-line span{line-height:1.5}
.duel-race-track{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;margin-top:22px;padding-top:18px;border-top:1px dashed #cbd5e1}
.duel-race-line{height:9px;background:linear-gradient(90deg,#dbeafe,#fde68a);border-radius:999px;position:relative}
.duel-racer{position:absolute;top:50%;transform:translateY(-50%);font-style:normal;font-size:1.5rem;transition:left .35s cubic-bezier(.2,.8,.2,1);filter:drop-shadow(0 3px 4px rgba(15,23,42,.18))}
.duel-racer-self{left:-12px;z-index:2}
.duel-racer-opponent{left:-12px;top:calc(50% + 22px);font-size:1.25rem}
.duel-race-start,.duel-race-finish{font-size:1.3rem}
.duel-word-builder{display:grid;gap:14px}
.duel-word-answer{min-height:62px;display:flex;flex-wrap:wrap;gap:8px;align-content:flex-start;padding:12px;border:2px dashed #99f6e4;border-radius:15px;background:#f0fdfa}
.duel-word-answer:empty::before{content:"Construis ta phrase ici…";color:#94a3b8;font-weight:700}
.duel-word-bank{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.duel-word-tile{border:1px solid #cbd5e1;background:#fff;padding:10px 13px;border-radius:12px;font:inherit;font-weight:850;cursor:pointer;box-shadow:0 2px 0 #e2e8f0}
.duel-word-tile:hover{border-color:#0f766e}
.duel-word-tile:disabled{opacity:.28;cursor:default}
.duel-word-tile.selected{background:#ccfbf1;border-color:#14b8a6;opacity:1}
.duel-word-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:780px){
  .duel-mode-grid{grid-template-columns:1fr}
  .duel-adventure-heading{align-items:flex-start;flex-direction:column}
  .duel-dialogue-line{grid-template-columns:1fr;gap:3px}
  .duel-adventure-scene{padding:16px}
  .duel-racer-opponent{top:calc(50% + 18px)}
}


/* V24.341 — Duel polish & top navigation */
.duel-hero,
.duel-ranking-hero{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.65);
    box-shadow:0 22px 50px rgba(15,23,42,.10);
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.88), transparent 34%),
        linear-gradient(135deg, #fef3f2 0%, #fff8eb 34%, #effcf8 70%, #eef6ff 100%);
}
.duel-hero::before,
.duel-ranking-hero::before{
    content:'';
    position:absolute;
    inset:auto -42px -52px auto;
    width:180px;height:180px;border-radius:50%;
    background:radial-gradient(circle, rgba(244,114,182,.18), rgba(244,114,182,0));
    pointer-events:none;
}
.duel-hero::after,
.duel-ranking-hero::after{
    content:'';
    position:absolute;
    left:-52px;top:-52px;
    width:170px;height:170px;border-radius:50%;
    background:radial-gradient(circle, rgba(45,212,191,.18), rgba(45,212,191,0));
    pointer-events:none;
}
.duel-hero > div:first-child,
.duel-ranking-hero > div:first-child{position:relative;z-index:1}
.duel-hero h1,.duel-history-heading h1{line-height:1.04;letter-spacing:-.03em}
.duel-hero p,.duel-history-heading p{font-size:1rem;line-height:1.7;color:#51636f}
.duel-hero-stats{gap:12px;margin-top:22px}
.duel-hero-stats span{
    display:inline-flex;align-items:center;gap:7px;
    padding:10px 14px;border-radius:999px;
    background:rgba(255,255,255,.85);
    border:1px solid rgba(255,255,255,.7);
    box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.duel-hero-badge,
.duel-vs-pill{
    position:relative;
    background:linear-gradient(135deg,#f97316,#ec4899 55%,#0f766e 100%);
    box-shadow:0 18px 38px rgba(236,72,153,.20);
}
.duel-hero-badge::after,
.duel-vs-pill::after{
    content:'';position:absolute;inset:7px;border-radius:999px;border:1px solid rgba(255,255,255,.28)
}
.duel-lobby-grid{grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr);gap:22px;align-items:start}
.duel-lobby-grid>.card,
.duel-open-lobby,
.duel-ranking-card,
.duel-history-heading,
.duel-game-top,
.duel-player-panel,
.duel-question-card,
.duel-adventure-scene,
.duel-result,
.duel-waiting{
    border:1px solid rgba(223,231,239,.95);
    box-shadow:0 18px 44px rgba(15,23,42,.07);
}
.duel-create-card,
.duel-join-card,
.duel-open-lobby,
.duel-ranking-card,
.duel-history-heading,
.duel-question-card,
.duel-adventure-scene,
.duel-result,
.duel-player-panel,
.duel-game-top,
.duel-waiting{
    background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,251,252,.98));
}
.duel-create-card h2,
.duel-join-card h2,
.duel-open-lobby h2{margin:.35rem 0 0;font-size:1.45rem;letter-spacing:-.02em}
.duel-form{gap:20px}
.duel-form label,
.duel-code-form,
.duel-open-item{font-size:.95rem}
.duel-form select,
.duel-code-form input,
.duel-text-answer input{
    min-height:50px;padding:0 15px;border-radius:14px;border:1px solid #dbe4ea;background:#fff;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.duel-form select:focus,
.duel-code-form input:focus,
.duel-text-answer input:focus{outline:none;border-color:#5dc6b7;box-shadow:0 0 0 4px rgba(45,212,191,.14)}
.duel-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.duel-mode-option span{
    position:relative;gap:6px;min-height:112px;padding:16px 16px 15px;border-radius:18px;
    border:1px solid rgba(212,220,229,.95);
    background:linear-gradient(180deg,#ffffff,#f8fbfb);
    box-shadow:0 10px 22px rgba(15,23,42,.04);
}
.duel-mode-option span strong{font-size:1rem;letter-spacing:-.015em}
.duel-mode-option span::after{content:'Choisir';position:absolute;right:14px;bottom:12px;font-size:.72rem;font-weight:900;letter-spacing:.06em;color:#0f766e;opacity:.55;text-transform:uppercase}
.duel-mode-option:hover span{transform:translateY(-2px);border-color:#9fd9d1;box-shadow:0 16px 34px rgba(15,118,110,.10)}
.duel-mode-option input:checked+span{transform:translateY(-2px);border-color:#0f766e;box-shadow:0 0 0 4px rgba(15,118,110,.10),0 16px 34px rgba(15,118,110,.10)}
.duel-mode-option input:checked+span::after{content:'Sélectionné';opacity:1}
.duel-mode-option:nth-child(1) span{background:linear-gradient(160deg,#f0fdfa,#ffffff 58%)}
.duel-mode-option:nth-child(2) span{background:linear-gradient(160deg,#fff7ed,#ffffff 58%)}
.duel-mode-option:nth-child(3) span{background:linear-gradient(160deg,#f5f3ff,#ffffff 58%)}
.duel-mode-option:nth-child(4) span{background:linear-gradient(160deg,#eff6ff,#ffffff 58%)}
.duel-private-toggle{
    padding:14px 15px;border-radius:15px;border:1px dashed #b7ddd7;background:#f5fcfa
}
.duel-primary{
    min-height:50px;border-radius:15px!important;font-weight:900!important;letter-spacing:.01em!important;
    box-shadow:0 16px 28px rgba(15,118,110,.18);
}
.duel-primary:hover{transform:translateY(-1px)}
.duel-code-form{gap:12px}
.duel-code-form input{background:linear-gradient(180deg,#ffffff,#fbf7ff);border:1px solid #eadff8}
.duel-links{gap:10px}
.duel-links a{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:13px 15px;border:1px solid #e3ebf0;border-radius:15px;background:linear-gradient(180deg,#fff,#f8fbfd);
    box-shadow:0 10px 22px rgba(15,23,42,.04)
}
.duel-links a:hover{transform:translateY(-1px);background:#fff}
.duel-open-lobby{padding:26px}
.duel-section-heading{margin-bottom:16px}
.duel-live-dot{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border-radius:999px;background:#fff1f2;color:#be123c}
.duel-open-list{gap:12px}
.duel-open-item{
    position:relative;padding:16px 18px;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fafc);
    border:1px solid #e2e8f0;box-shadow:0 12px 28px rgba(15,23,42,.05)
}
.duel-open-item::before{content:'';position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:999px;background:linear-gradient(180deg,#14b8a6,#ec4899)}
.duel-open-item strong{font-size:.98rem}
.duel-open-item span{font-size:.85rem;line-height:1.45}
.duel-empty{padding:40px 18px;border-radius:16px;background:#fbfcfd;border:1px dashed #d7e2e8}
.duel-game-shell{width:min(1260px,calc(100% - 26px));margin:20px auto 70px}
.duel-game-top{
    grid-template-columns:auto 1fr auto;gap:18px;padding:16px 18px;top:78px;border-radius:22px;
    backdrop-filter:blur(10px);background:rgba(255,255,255,.82)
}
.duel-back{display:inline-flex;align-items:center;gap:8px;padding:12px 14px;border-radius:14px;background:#f8fafc;border:1px solid #e5edf1;color:#36525b}
.duel-back:hover{background:#edf8f5;color:#0f766e;text-decoration:none}
.duel-game-title{justify-self:center;padding:0 12px}
.duel-game-title span{font-size:1rem;line-height:1.35}
.duel-game-title strong{font-size:.78rem;letter-spacing:.14em}
.duel-story-name{margin-top:3px;font-size:.7rem}
.duel-timer{
    min-width:106px;padding:10px 14px;border-radius:16px;background:#fff7ed;border:1px solid #fde3be;color:#9a3412
}
.duel-arena{display:grid;grid-template-columns:1fr auto 1fr;gap:18px;align-items:start;margin-top:18px}
.duel-player-panel{padding:20px;border-radius:22px}
.duel-player-self{background:linear-gradient(180deg,#f0fdfa,#ffffff)}
.duel-player-opponent{background:linear-gradient(180deg,#fff7ed,#ffffff)}
.duel-player-head{align-items:center;gap:14px}
.duel-avatar{
    width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#0f766e,#14b8a6);color:#fff;
    font-size:1.25rem;box-shadow:0 10px 24px rgba(15,118,110,.18)
}
.duel-avatar-opponent{background:linear-gradient(135deg,#f97316,#ec4899)}
.duel-live-score{
    margin-left:auto;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 8px 18px rgba(15,23,42,.05)
}
.duel-progress-track{height:14px;margin:18px 0 12px;background:#eef4f7;border-radius:999px;overflow:hidden}
.duel-progress-track i{background:linear-gradient(90deg,#0f766e,#14b8a6);box-shadow:0 0 18px rgba(20,184,166,.34)}
.duel-player-opponent .duel-progress-track i{background:linear-gradient(90deg,#f97316,#ec4899)}
.duel-progress-meta{font-size:.82rem;color:#60727c}
.duel-vs-pill{align-self:center;width:76px;height:76px;font-size:1rem}
.duel-adventure-scene{grid-column:1 / -1;border-radius:24px;padding:24px;background:linear-gradient(145deg,#fffdf7,#f8fafc)}
.duel-adventure-heading > strong{font-size:1.25rem;letter-spacing:-.02em}
.duel-scene-narration{font-size:1.02rem}
.duel-scene-dialogue{margin-top:8px}
.duel-dialogue-line{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.82);box-shadow:0 10px 20px rgba(15,23,42,.04)}
.duel-race-track{margin-top:24px;padding:20px 14px 0}
.duel-race-line{height:12px;box-shadow:inset 0 2px 8px rgba(15,23,42,.08)}
.duel-question-card{grid-column:1 / -1;padding:28px;border-radius:24px;background:linear-gradient(180deg,#fff,#fcfdfd)}
.duel-question-topline{margin-bottom:10px}
.duel-status-chip{padding:8px 10px;border-radius:999px;background:#eefaf6;color:#0f766e;font-size:.72rem;font-weight:900;letter-spacing:.08em}
.duel-question-card h2{margin:.2rem 0 .6rem;font-size:1.55rem;line-height:1.2;letter-spacing:-.025em}
.duel-prompt{font-size:1.06rem;line-height:1.7;color:#465762}
.duel-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.duel-option{
    min-height:64px;padding:15px 16px;border-radius:18px;border:1px solid #dce7ec;background:linear-gradient(180deg,#fff,#f8fbfc);
    font:inherit;font-weight:850;color:#2f4952;text-align:left;box-shadow:0 10px 22px rgba(15,23,42,.04)
}
.duel-option:hover{transform:translateY(-1px);border-color:#8bd0c5;background:#f4fcfa}
.duel-text-answer{display:flex;gap:12px;align-items:center;margin-top:18px}
.duel-text-answer .button{min-height:50px;border-radius:15px}
.duel-feedback{margin-top:16px;padding:14px 16px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0;color:#3c5560;font-weight:700}
.duel-result{padding:34px 26px;border-radius:26px;text-align:center;background:linear-gradient(180deg,#fff,#fcfcff)}
.duel-result-icon{width:84px;height:84px;margin:0 auto 12px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,#f97316,#ec4899);font-size:2rem;color:#fff;box-shadow:0 18px 35px rgba(236,72,153,.18)}
.duel-result-actions{justify-content:center;gap:10px;flex-wrap:wrap}
.duel-history-list,
.duel-ranking-list{display:grid;gap:12px}
.duel-history-item,
.duel-ranking-row{
    display:grid;align-items:center;gap:14px;padding:16px 18px;border-radius:18px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#fff,#f8fafc);
    box-shadow:0 10px 24px rgba(15,23,42,.04)
}
.duel-history-item{grid-template-columns:auto 1fr auto}
.duel-history-item.won{border-color:#b8e4d7;background:linear-gradient(180deg,#f7fffb,#ffffff)}
.duel-history-item.lost{border-color:#f6d2da;background:linear-gradient(180deg,#fffafb,#ffffff)}
.duel-history-result{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.05);font-size:1.25rem}
.duel-history-score{display:grid;justify-items:end;gap:2px;padding-left:10px}
.duel-history-score strong{font-size:1.25rem}
.duel-ranking-row{grid-template-columns:auto 1fr auto}
.duel-ranking-row.is-me{border-color:#9dd6cb;background:linear-gradient(180deg,#f0fdfa,#ffffff)}
.duel-rank-number{display:grid;place-items:center;min-width:58px;height:58px;padding:0 12px;border-radius:18px;background:linear-gradient(135deg,#fff7ed,#fef2f2);font-weight:900;color:#9a3412;box-shadow:0 8px 18px rgba(15,23,42,.05)}
.duel-elo{display:grid;justify-items:end;font-size:1.2rem}
.duel-elo small{font-size:.7rem;color:#64748b;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:1180px){
  .duel-arena{grid-template-columns:1fr;gap:14px}
  .duel-vs-pill{justify-self:center;order:2}
  .duel-player-opponent{order:3}
}
@media(max-width:920px){
  .duel-lobby-grid{grid-template-columns:1fr}
  .duel-mode-grid{grid-template-columns:1fr}
  .duel-game-top{position:static;grid-template-columns:1fr;justify-items:stretch;text-align:center}
  .duel-back,.duel-timer{justify-self:stretch}
  .duel-timer{text-align:center}
  .duel-options{grid-template-columns:1fr}
}
@media(max-width:640px){
  .duel-hero{padding:22px;gap:18px;flex-direction:column;align-items:flex-start}
  .duel-hero-badge{width:76px;height:76px;align-self:flex-end}
  .duel-open-item,
  .duel-history-item,
  .duel-ranking-row{grid-template-columns:1fr}
  .duel-history-score,
  .duel-elo{justify-items:start;padding-left:0}
  .duel-player-head{grid-template-columns:54px 1fr;display:grid}
  .duel-live-score{grid-column:1 / -1;margin-left:0;justify-self:start}
  .duel-question-card{padding:20px}
}


/* V24.344 — responsive + vrais drapeaux Chrome + historique enrichi */
.duel-flag{
    display:inline-block;
    width:24px;
    height:16px;
    flex:0 0 24px;
    object-fit:cover;
    border-radius:3px;
    box-shadow:0 0 0 1px rgba(15,23,42,.10),0 2px 5px rgba(15,23,42,.08);
    vertical-align:-2px;
}
.duel-player-inline,
.duel-game-course,
.duel-history-course{
    display:inline-flex;
    align-items:center;
    gap:7px;
}
.duel-history-lessons{margin-top:6px}
.duel-history-lessons summary{
    cursor:pointer;
    color:#0f766e;
    font-size:.8rem;
    font-weight:850;
    list-style:none;
}
.duel-history-lessons summary::-webkit-details-marker{display:none}
.duel-history-lessons>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.duel-history-lessons>div span{
    display:inline-flex;
    padding:5px 8px;
    border-radius:999px;
    background:#f0fdfa;
    border:1px solid #cdeee7;
    color:#41636a;
    font-size:.72rem;
}
@media (max-width:1180px){
    .duel-mode-option span::after{
        display:none!important;
        content:none!important;
    }
}


/* V24.346 — choix Langue + Niveau */
.duel-language-level-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(180px,.55fr);
    gap:12px;
}
.duel-language-level-grid label{
    display:grid;
    gap:7px;
    font-weight:850;
}
@media(max-width:680px){
    .duel-language-level-grid{grid-template-columns:1fr}
}


/* V24.347 — leçons cliquables depuis l'historique Duel */
.duel-history-lessons>div .duel-history-lesson-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 9px;
    border-radius:999px;
    background:#f0fdfa;
    border:1px solid #cdeee7;
    color:#285f63;
    font-size:.74rem;
    font-weight:800;
    text-decoration:none;
    transition:transform .15s ease,border-color .15s ease,background-color .15s ease,box-shadow .15s ease;
}
.duel-history-lessons>div .duel-history-lesson-link:hover,
.duel-history-lessons>div .duel-history-lesson-link:focus-visible{
    transform:translateY(-1px);
    border-color:#7bc8bd;
    background:#e7f8f4;
    box-shadow:0 7px 16px rgba(15,118,110,.10);
    outline:none;
}
.duel-history-lesson-id{
    display:inline-grid;
    place-items:center;
    min-width:24px;
    height:24px;
    padding:0 5px;
    border-radius:999px;
    background:#ffffff;
    color:#0f766e;
    font-size:.68rem;
    font-weight:950;
    border:1px solid #bfe6de;
}

/* =========================================================
   V24.349 — VULPINGO DUEL: COMPETITIVE ARENA
   Plus de tension visuelle, animation et lisibilité live.
   ========================================================= */

:root{
  --duel-cyan:#14b8a6;
  --duel-cyan-dark:#0f766e;
  --duel-orange:#f97316;
  --duel-pink:#ec4899;
  --duel-violet:#7c3aed;
  --duel-ink:#102a33;
  --duel-soft:#f4faf9;
}

/* ----- Lobby / page Duel ----- */
.duel-arena-hero{
  min-height:330px;
  padding:38px 42px;
  border-radius:30px;
  isolation:isolate;
  background:
    linear-gradient(118deg,rgba(255,255,255,.96) 0%,rgba(244,253,250,.96) 48%,rgba(255,244,239,.98) 100%);
  box-shadow:0 26px 70px rgba(15,56,65,.13), inset 0 1px 0 rgba(255,255,255,.9);
}
.duel-arena-hero::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.36;
  background-image:
    linear-gradient(rgba(15,118,110,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(15,118,110,.06) 1px,transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(90deg,#000,transparent 80%);
  pointer-events:none;
}
.duel-arena-hero::after{
  content:"";
  position:absolute;
  right:-100px;
  top:50%;
  width:460px;
  height:460px;
  border-radius:50%;
  transform:translateY(-50%);
  background:radial-gradient(circle,rgba(236,72,153,.16),rgba(249,115,22,.09) 34%,transparent 68%);
  filter:blur(1px);
  pointer-events:none;
}
.duel-hero-copy{position:relative;z-index:3;max-width:760px}
.duel-kicker-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.duel-live-kicker,
.duel-rank-chip{
  display:inline-flex;align-items:center;gap:7px;
  padding:7px 11px;border-radius:999px;
  font-size:.7rem;font-weight:950;letter-spacing:.09em;
}
.duel-live-kicker{background:#ecfdf5;color:#08786c;border:1px solid #b8ece3}
.duel-live-kicker i,.duel-live-dot i,.duel-battle-live i{
  width:7px;height:7px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 0 rgba(239,68,68,.5);animation:duelLivePulse 1.45s infinite
}
.duel-rank-chip{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;letter-spacing:.04em}
.duel-arena-hero h1{margin:0;font-size:clamp(2.9rem,7vw,5.6rem);line-height:.94;letter-spacing:-.065em;color:#102f38}
.duel-arena-hero h1 span{
  display:inline-block;
  background:linear-gradient(120deg,#0f766e 5%,#14b8a6 38%,#f97316 72%,#ec4899 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 8px 22px rgba(20,184,166,.12));
}
.duel-arena-hero p{max-width:670px;margin:18px 0 0;font-size:1.08rem;line-height:1.72;color:#536971}
.duel-arena-hero p strong{color:#163c45}
.duel-arena-hero .duel-hero-stats{margin-top:24px}
.duel-arena-hero .duel-hero-stats span{
  min-width:110px;padding:10px 14px;border:1px solid rgba(164,199,194,.52);background:rgba(255,255,255,.76);backdrop-filter:blur(8px)
}
.duel-arena-hero .duel-hero-stats small{display:block;margin-right:4px;color:#789098;font-size:.58rem;font-weight:950;letter-spacing:.09em}
.duel-arena-hero .duel-hero-stats strong{font-size:1.08rem;color:#153a43}
.duel-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.duel-hero-actions .button{min-height:47px;padding-inline:18px;border-radius:14px}

.duel-hero-stage{position:absolute;right:35px;top:50%;width:270px;height:270px;transform:translateY(-50%);z-index:2;display:grid;place-items:center}
.duel-hero-stage .duel-hero-badge{
  width:132px;height:132px;display:grid;place-items:center;align-content:center;gap:1px;
  border:7px solid rgba(255,255,255,.72);transform:none;z-index:3;
  background:linear-gradient(145deg,#f97316,#ec4899 52%,#6d28d9);
  box-shadow:0 24px 48px rgba(190,24,93,.25),0 0 0 12px rgba(255,255,255,.26)
}
.duel-hero-stage .duel-hero-badge span{font-size:2.55rem;font-weight:1000;font-style:italic;letter-spacing:-.08em}
.duel-hero-stage .duel-hero-badge small{font-size:.58rem;font-weight:950;letter-spacing:.21em;color:rgba(255,255,255,.8)}
.duel-orbit{position:absolute;border-radius:50%;border:1px solid rgba(15,118,110,.21);animation:duelOrbit 10s linear infinite}
.duel-orbit::before{content:"";position:absolute;width:11px;height:11px;border-radius:50%;background:#14b8a6;box-shadow:0 0 20px rgba(20,184,166,.75);top:-6px;left:50%}
.duel-orbit-one{width:205px;height:205px}
.duel-orbit-two{width:255px;height:255px;border-color:rgba(236,72,153,.18);animation-duration:15s;animation-direction:reverse}
.duel-orbit-two::before{background:#ec4899;box-shadow:0 0 20px rgba(236,72,153,.65)}
.duel-spark{position:absolute;color:#f97316;font-size:1.15rem;animation:duelSpark 2.2s ease-in-out infinite}
.duel-spark-a{left:18px;top:46px}.duel-spark-b{right:3px;bottom:66px;animation-delay:.5s}.duel-spark-c{left:42px;bottom:22px;color:#14b8a6;animation-delay:1s}

.duel-lobby-grid{margin-top:22px;gap:20px}
.duel-create-card,.duel-join-card,.duel-open-lobby{position:relative;overflow:hidden;border-radius:26px!important}
.duel-create-card::before,.duel-join-card::before{
  content:"";position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(#14b8a6,#ec4899);opacity:.85
}
.duel-card-heading{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin-bottom:22px}
.duel-card-heading h2{margin:2px 0 0!important}
.duel-card-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#dff9f4,#f0fdfa);border:1px solid #bfe9e2;font-size:1.25rem;box-shadow:0 10px 24px rgba(15,118,110,.09)}
.duel-card-icon-alt{background:linear-gradient(145deg,#fff1eb,#fff7ed);border-color:#fed7aa}
.duel-step-badge{align-self:start;display:grid;place-items:center;min-width:36px;height:26px;padding:0 8px;border-radius:999px;background:#112f38;color:#fff;font-size:.65rem;font-weight:950;letter-spacing:.08em}
.duel-form label{color:#25454d;font-weight:850}
.duel-label{font-size:.9rem;color:#24444c}
.duel-language-level-grid select,.duel-form>label select{font-weight:800;color:#183a43}

.duel-mode-grid{gap:13px}
.duel-mode-option span{
  min-height:126px;padding:17px 18px 35px;border-radius:20px;overflow:hidden;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s ease,border-color .22s ease
}
.duel-mode-option span::before{content:"";position:absolute;right:-24px;top:-24px;width:82px;height:82px;border-radius:50%;background:currentColor;opacity:.04}
.duel-mode-option:hover span{transform:translateY(-4px) scale(1.012)}
.duel-mode-option input:checked+span{transform:translateY(-3px);box-shadow:0 0 0 3px rgba(15,118,110,.11),0 18px 36px rgba(15,79,74,.13)}
.duel-mode-option input:checked+span::before{animation:duelModePing .55s ease-out}
.duel-mode-option span strong{font-size:1.04rem;color:#173942}
.duel-mode-option span small{max-width:88%;color:#637b83}
.duel-mode-option span::after{font-size:.62rem;bottom:13px}
.duel-adventure-note{border-style:solid;background:linear-gradient(90deg,#fff8e9,#fffdf7)}
.duel-private-toggle{transition:.18s ease}.duel-private-toggle:hover{border-color:#78c8bb;background:#eefbf8}

.duel-join-card{background:linear-gradient(180deg,#fff,#fbfcff)!important}
.duel-code-form input{min-height:62px;font-size:1.45rem;border:2px solid #e6dcf3!important;box-shadow:inset 0 1px 8px rgba(76,29,149,.025)}
.duel-code-form .button{min-height:50px;border-radius:14px;background:#122b34;color:white;border-color:#122b34;font-weight:900}
.duel-links a::after{content:"→";font-size:1rem;transition:transform .18s ease}.duel-links a:hover::after{transform:translateX(3px)}

.duel-open-lobby{margin-top:22px;background:linear-gradient(180deg,#fff,#f9fcfc)!important}
.duel-section-heading p{margin:4px 0 0;color:#789098;font-size:.86rem}
.duel-live-dot{background:#fff1f2;border:1px solid #fecdd3;letter-spacing:.08em}
.duel-open-item{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.duel-open-item:hover{transform:translateY(-2px);border-color:#a8dcd3;box-shadow:0 18px 35px rgba(15,70,67,.09)}
.duel-open-item .button{border-radius:13px;font-weight:900;transition:.18s ease}
.duel-open-item:hover .button{background:#102f38;color:#fff;border-color:#102f38}

/* ----- Game Arena ----- */
.duel-game-shell{position:relative;isolation:isolate}
.duel-game-ambient{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;background:linear-gradient(180deg,#f7fbfb 0%,#fbfbfd 46%,#fff8f5 100%)}
.duel-game-ambient i{position:absolute;border-radius:50%;filter:blur(2px);opacity:.4;animation:duelAmbientFloat 13s ease-in-out infinite alternate}
.duel-game-ambient i:nth-child(1){width:420px;height:420px;left:-170px;top:8%;background:radial-gradient(circle,#b7f0e7,transparent 68%)}
.duel-game-ambient i:nth-child(2){width:520px;height:520px;right:-210px;top:20%;background:radial-gradient(circle,#ffd6df,transparent 68%);animation-delay:-4s}
.duel-game-ambient i:nth-child(3){width:350px;height:350px;left:42%;bottom:-180px;background:radial-gradient(circle,#ffe6c9,transparent 68%);animation-delay:-8s}

.duel-game-top{border:1px solid rgba(185,214,209,.72);box-shadow:0 18px 48px rgba(15,55,63,.11);background:rgba(255,255,255,.88)!important}
.duel-game-title strong{display:inline-flex;justify-content:center;margin-top:3px;color:#e45772!important;font-weight:1000}
.duel-timer{position:relative;overflow:hidden;font-variant-numeric:tabular-nums}
.duel-timer::before{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent,rgba(255,255,255,.7),transparent);transform:translateX(-120%);animation:duelShimmer 3.2s infinite}

.duel-battle-status{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;
  margin:12px 0 0;padding:9px 16px;border-radius:16px;
  background:rgba(17,47,56,.94);color:#fff;box-shadow:0 12px 28px rgba(15,42,50,.16);
  transition:background .25s ease,box-shadow .25s ease
}
.duel-battle-status[hidden]{display:none!important}
.duel-battle-live{display:inline-flex;align-items:center;gap:8px;font-size:.67rem;font-weight:950;letter-spacing:.1em;color:#cceee8}
.duel-battle-status>strong{text-align:center;font-size:.82rem;font-weight:1000;letter-spacing:.1em}
.duel-round-status{text-align:right;font-size:.75rem;color:#c9d9dd;font-weight:800}
.duel-battle-status[data-lead="self"]{background:linear-gradient(90deg,#0f766e,#12353d)}
.duel-battle-status[data-lead="opponent"]{background:linear-gradient(90deg,#12353d,#a53b5a)}
.duel-battle-status.lead-change{animation:duelLeadChange .55s ease}

.duel-arena{position:relative;margin-top:16px}
.duel-player-panel{position:relative;overflow:hidden;transition:transform .28s ease,border-color .28s ease,box-shadow .28s ease}
.duel-player-panel::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:.25s ease}
.duel-player-self::after{background:linear-gradient(110deg,transparent 20%,rgba(20,184,166,.11),transparent 72%)}
.duel-player-opponent::after{background:linear-gradient(110deg,transparent 20%,rgba(236,72,153,.10),transparent 72%)}
.duel-player-panel.advanced{animation:duelAdvance .58s cubic-bezier(.2,.9,.2,1)}
.duel-player-panel.advanced::after{animation:duelPanelSweep .65s ease}
.duel-game-shell[data-lead="self"] .duel-player-self{border-color:#68cfc0;box-shadow:0 18px 45px rgba(15,118,110,.14),0 0 0 2px rgba(20,184,166,.08)}
.duel-game-shell[data-lead="opponent"] .duel-player-opponent{border-color:#efa4ba;box-shadow:0 18px 45px rgba(190,24,93,.12),0 0 0 2px rgba(236,72,153,.07)}
.duel-player-head{position:relative}
.duel-momentum-badge{position:absolute;right:0;top:-12px;padding:5px 8px;border-radius:999px;background:#0f766e;color:#fff;font-size:.56rem;font-weight:1000;letter-spacing:.07em;box-shadow:0 8px 18px rgba(15,118,110,.22);animation:duelBadgePop .3s ease}
.duel-momentum-opponent{background:#be365f;box-shadow:0 8px 18px rgba(190,54,95,.2)}
.duel-live-score{font-variant-numeric:tabular-nums}
.duel-live-score span.is-bumping{display:inline-block;animation:duelScoreBump .5s cubic-bezier(.2,.9,.2,1)}
.duel-progress-track{position:relative}
.duel-progress-track::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-100%);animation:duelProgressShine 2.8s linear infinite}
.duel-progress-track i{transition:width .5s cubic-bezier(.2,.85,.2,1)}
.duel-vs-pill{align-self:center;display:grid!important;align-content:center;gap:0;border:5px solid rgba(255,255,255,.8);animation:duelVsFloat 2.6s ease-in-out infinite;box-shadow:0 15px 35px rgba(180,49,96,.2)}
.duel-vs-pill span{font-size:1.1rem;font-weight:1000;font-style:italic}.duel-vs-pill small{font-size:.47rem;letter-spacing:.15em;color:rgba(255,255,255,.76)}

.duel-question-card{position:relative;overflow:hidden;border:1px solid rgba(189,216,211,.82)}
.duel-question-energy{position:absolute;left:0;right:0;top:0;height:4px;background:#e7eef0}
.duel-question-energy i{display:block;width:44%;height:100%;background:linear-gradient(90deg,#14b8a6,#f97316,#ec4899);animation:duelEnergy 2.2s ease-in-out infinite alternate;box-shadow:0 0 16px rgba(236,72,153,.4)}
.duel-question-card h2{font-size:clamp(1.35rem,2.3vw,1.75rem)}
.duel-prompt{border:1px solid #dfebed;background:linear-gradient(145deg,#f8fbfb,#fff);box-shadow:inset 0 1px 0 #fff}
.duel-option{position:relative;overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.duel-option::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent,rgba(255,255,255,.75),transparent);transform:translateX(-125%);transition:transform .45s ease}
.duel-option:hover::after{transform:translateX(125%)}
.duel-option:hover{transform:translateY(-3px);box-shadow:0 16px 30px rgba(15,70,67,.09)}
.duel-feedback.correct{background:#ecfdf5!important;border-color:#9fe4d6!important;color:#08786c!important;animation:duelFeedbackGood .46s ease}
.duel-feedback.wrong{background:#fff1f2!important;border-color:#fecdd3!important;color:#be3455!important;animation:duelFeedbackBad .42s ease}
.duel-screen-flash{position:fixed;inset:0;z-index:400;pointer-events:none;opacity:0}
.duel-screen-flash.correct{background:radial-gradient(circle at center,rgba(52,211,153,.19),transparent 65%)}
.duel-screen-flash.wrong{background:radial-gradient(circle at center,rgba(244,63,94,.15),transparent 65%)}
.duel-screen-flash.is-active{animation:duelScreenFlash .55s ease}
.duel-game-shell.answer-correct .duel-question-card{animation:duelCorrectCard .55s ease}
.duel-game-shell.answer-wrong .duel-question-card{animation:duelWrongCard .45s ease}

.duel-countdown{
  position:fixed;inset:0;z-index:500;display:grid;place-items:center;align-content:center;gap:18px;
  background:rgba(7,24,30,.68);backdrop-filter:blur(9px);color:#fff
}
.duel-countdown[hidden]{display:none!important}
.duel-countdown-ring{width:155px;height:155px;border-radius:50%;display:grid;place-items:center;position:relative;background:linear-gradient(145deg,#173e47,#0f252c);border:3px solid rgba(255,255,255,.22);box-shadow:0 0 0 12px rgba(255,255,255,.055),0 0 70px rgba(20,184,166,.28)}
.duel-countdown-ring::before{content:"";position:absolute;inset:-9px;border-radius:50%;border:4px solid transparent;border-top-color:#14b8a6;border-right-color:#ec4899;animation:duelCountdownSpin 1.2s linear infinite}
.duel-countdown strong{font-size:4.1rem;font-weight:1000;letter-spacing:-.08em;text-shadow:0 8px 30px rgba(0,0,0,.28)}
.duel-countdown strong.is-pop{animation:duelCountdownPop .5s cubic-bezier(.2,1.05,.2,1)}
.duel-countdown>span{font-size:.8rem;font-weight:950;letter-spacing:.2em;text-transform:uppercase;color:#d7ebe7}

.duel-waiting{position:relative;overflow:hidden;border-radius:28px;background:linear-gradient(145deg,#fff,#f4fbfa)!important}
.duel-waiting::before{content:"";position:absolute;left:50%;top:50%;width:440px;height:440px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgba(20,184,166,.11);box-shadow:0 0 0 45px rgba(20,184,166,.035),0 0 0 90px rgba(236,72,153,.025);animation:duelWaitingRadar 3s ease-in-out infinite}
.duel-waiting>*{position:relative;z-index:2}
.duel-waiting-icon{animation:duelSwordFloat 2s ease-in-out infinite}
.duel-room-code{background:linear-gradient(120deg,#102f38,#154c55);box-shadow:0 16px 35px rgba(13,45,53,.22);transition:.18s ease}
.duel-room-code:hover{transform:translateY(-2px) scale(1.02)}

.duel-result{position:relative;overflow:hidden;min-height:350px;display:grid;justify-items:center;align-content:center}
.duel-result.is-victory{background:linear-gradient(145deg,#f0fdfa,#fff9ee)!important;border-color:#8bd9cb}
.duel-result.is-defeat{background:linear-gradient(145deg,#fff7f8,#fff)!important;border-color:#f1bdc9}
.duel-result.is-victory .duel-result-icon{animation:duelTrophy .9s cubic-bezier(.18,.9,.25,1.35)}
.duel-result h1{font-size:clamp(2.2rem,6vw,4.4rem);letter-spacing:-.055em;margin:.2rem 0;color:#163b44}
.duel-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.duel-confetti i{position:absolute;left:var(--x);top:-20px;width:8px;height:15px;border-radius:2px;background:#14b8a6;opacity:0;animation:duelConfettiFall var(--duration) var(--delay) ease-in forwards}
.duel-confetti i:nth-child(3n){background:#f97316}.duel-confetti i:nth-child(4n){background:#ec4899}.duel-confetti i:nth-child(5n){background:#7c3aed}.duel-confetti i:nth-child(7n){background:#facc15}

/* Adventure Race gets an even more game-like track */
.duel-adventure-scene{position:relative;overflow:hidden}
.duel-race-line{height:14px;background:linear-gradient(90deg,#d5f6f0,#ffe6c7 55%,#ffd7e4);border:2px solid rgba(255,255,255,.75)}
.duel-racer{font-size:1.7rem;filter:drop-shadow(0 5px 6px rgba(15,42,50,.18))}
.duel-racer-self{animation:duelRacerBounce 1.2s ease-in-out infinite}.duel-racer-opponent{animation:duelRacerBounce 1.2s .35s ease-in-out infinite}

/* ----- Animations ----- */
@keyframes duelLivePulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.52)}70%{box-shadow:0 0 0 7px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
@keyframes duelOrbit{to{transform:rotate(360deg)}}
@keyframes duelSpark{0%,100%{transform:scale(.75) rotate(0);opacity:.38}50%{transform:scale(1.3) rotate(25deg);opacity:1}}
@keyframes duelModePing{0%{transform:scale(.5);opacity:.16}100%{transform:scale(2.3);opacity:0}}
@keyframes duelAmbientFloat{0%{transform:translate3d(0,0,0) scale(1)}100%{transform:translate3d(40px,-35px,0) scale(1.08)}}
@keyframes duelShimmer{0%,55%{transform:translateX(-130%)}100%{transform:translateX(140%)}}
@keyframes duelLeadChange{0%{transform:scale(.985);filter:brightness(1.5)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes duelAdvance{0%{transform:translateY(0)}45%{transform:translateY(-7px) scale(1.012)}100%{transform:translateY(0)}}
@keyframes duelPanelSweep{0%{opacity:0;transform:translateX(-100%)}35%{opacity:1}100%{opacity:0;transform:translateX(100%)}}
@keyframes duelBadgePop{0%{transform:scale(.65);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes duelScoreBump{0%{transform:scale(1)}45%{transform:scale(1.45);color:#f97316;text-shadow:0 0 16px rgba(249,115,22,.35)}100%{transform:scale(1)}}
@keyframes duelProgressShine{0%{transform:translateX(-130%)}55%,100%{transform:translateX(130%)}}
@keyframes duelVsFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@keyframes duelEnergy{0%{transform:translateX(-55%)}100%{transform:translateX(155%)}}
@keyframes duelFeedbackGood{0%{transform:scale(.98);opacity:.2}55%{transform:scale(1.018)}100%{transform:scale(1);opacity:1}}
@keyframes duelFeedbackBad{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}55%{transform:translateX(5px)}80%{transform:translateX(-2px)}}
@keyframes duelScreenFlash{0%{opacity:0}30%{opacity:1}100%{opacity:0}}
@keyframes duelCorrectCard{0%{box-shadow:0 18px 44px rgba(15,23,42,.07)}45%{box-shadow:0 0 0 4px rgba(52,211,153,.18),0 20px 55px rgba(16,185,129,.17)}100%{box-shadow:0 18px 44px rgba(15,23,42,.07)}}
@keyframes duelWrongCard{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}55%{transform:translateX(4px)}80%{transform:translateX(-2px)}}
@keyframes duelCountdownSpin{to{transform:rotate(360deg)}}
@keyframes duelCountdownPop{0%{transform:scale(.45);opacity:.2}55%{transform:scale(1.22)}100%{transform:scale(1);opacity:1}}
@keyframes duelWaitingRadar{0%,100%{transform:translate(-50%,-50%) scale(.88);opacity:.55}50%{transform:translate(-50%,-50%) scale(1.04);opacity:1}}
@keyframes duelSwordFloat{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-8px) rotate(4deg)}}
@keyframes duelTrophy{0%{transform:scale(.4) rotate(-18deg);opacity:0}55%{transform:scale(1.25) rotate(7deg)}75%{transform:scale(.95) rotate(-2deg)}100%{transform:scale(1) rotate(0);opacity:1}}
@keyframes duelConfettiFall{0%{transform:translate3d(0,-30px,0) rotate(0);opacity:0}12%{opacity:1}100%{transform:translate3d(var(--drift),520px,0) rotate(var(--spin));opacity:.92}}
@keyframes duelRacerBounce{0%,100%{margin-top:0}50%{margin-top:-5px}}

/* ----- Responsive ----- */
@media(max-width:1120px){
  .duel-hero-stage{right:10px;opacity:.78;transform:translateY(-50%) scale(.86)}
  .duel-hero-copy{max-width:68%}
}
@media(max-width:920px){
  .duel-arena-hero{min-height:auto;padding:30px 26px}
  .duel-hero-copy{max-width:none}
  .duel-hero-stage{position:relative;right:auto;top:auto;transform:none;margin:18px auto -20px;width:210px;height:160px}
  .duel-hero-stage .duel-hero-badge{width:96px;height:96px}
  .duel-orbit-one{width:145px;height:145px}.duel-orbit-two{width:185px;height:185px}
  .duel-battle-status{grid-template-columns:1fr auto}.duel-battle-status>strong{grid-row:2;grid-column:1/-1}.duel-round-status{grid-column:2}
  .duel-momentum-badge{position:static;grid-column:1/-1;justify-self:start;margin-top:4px}
}
@media(max-width:640px){
  .duel-arena-hero h1{font-size:3.35rem}
  .duel-arena-hero .duel-hero-stats{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
  .duel-arena-hero .duel-hero-stats span{min-width:0;padding:9px;text-align:center;justify-content:center;flex-wrap:wrap}
  .duel-hero-actions{display:grid;grid-template-columns:1fr;width:100%}
  .duel-card-heading{grid-template-columns:auto 1fr}.duel-step-badge{display:none}
  .duel-battle-status{padding:9px 11px}
  .duel-battle-live{font-size:.58rem}.duel-round-status{font-size:.67rem}
  .duel-countdown-ring{width:126px;height:126px}.duel-countdown strong{font-size:3.4rem}
}

@media(prefers-reduced-motion:reduce){
  .duel-orbit,.duel-spark,.duel-live-kicker i,.duel-live-dot i,.duel-battle-live i,
  .duel-game-ambient i,.duel-timer::before,.duel-progress-track::after,.duel-vs-pill,
  .duel-question-energy i,.duel-waiting::before,.duel-waiting-icon,.duel-racer,.duel-confetti i{
    animation:none!important
  }
  .duel-player-panel,.duel-option,.duel-mode-option span,.duel-progress-track i{transition:none!important}
}

/* V24.351 — Historique Duel / carnet de combat */
.duel-history-page{width:min(1180px,calc(100% - 28px));margin:22px auto 70px}.duel-history-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:30px;padding:34px;border:1px solid rgba(255,255,255,.8);border-radius:28px;background:radial-gradient(circle at 90% 20%,rgba(244,114,182,.18),transparent 27%),radial-gradient(circle at 7% 90%,rgba(45,212,191,.17),transparent 30%),linear-gradient(135deg,#fff8f4,#fff 43%,#f2fbfa);box-shadow:0 24px 60px rgba(15,23,42,.10)}.duel-history-hero:after{content:'VS';position:absolute;right:190px;top:50%;transform:translateY(-50%) rotate(-8deg);font-size:7rem;font-weight:1000;color:rgba(15,118,110,.045)}.duel-kicker{display:inline-flex;padding:7px 11px;border-radius:999px;background:#fff;border:1px solid #e9eef1;color:#8d3657;font-size:.72rem;font-weight:950;letter-spacing:.09em}.duel-history-hero h1{margin:12px 0 9px;font-size:clamp(2rem,4.5vw,3.65rem);line-height:.98;letter-spacing:-.045em}.duel-history-hero p{max-width:690px;color:#596d75;line-height:1.7}.duel-history-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.duel-history-rating{position:relative;z-index:1;display:grid;justify-items:center;min-width:190px;padding:25px 22px;border-radius:25px;background:linear-gradient(145deg,#14282f,#0d6f68);color:#fff;box-shadow:0 20px 42px rgba(15,118,110,.24)}.duel-history-rating span,.duel-history-rating small{font-size:.67rem;font-weight:950;letter-spacing:.14em;color:#b9ebe3}.duel-history-rating strong{font-size:3.2rem;line-height:1}.duel-history-rating em{margin-top:12px;padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.11);font-size:.76rem;font-style:normal}.duel-history-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0 26px}.duel-history-stats article{display:grid;gap:3px;min-height:126px;padding:19px;border-radius:20px;border:1px solid #e4ebef;background:linear-gradient(180deg,#fff,#f9fbfc);box-shadow:0 12px 28px rgba(15,23,42,.05)}.duel-history-stats span{color:#71828a;font-size:.76rem;font-weight:900;text-transform:uppercase}.duel-history-stats strong{font-size:2rem;color:#193239}.duel-history-stats small{color:#7c8d94}.duel-history-feed-title{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:14px}.duel-history-feed-title h2{margin:3px 0 0}.duel-history-count{padding:7px 11px;border-radius:999px;background:#eef7f5;color:#0f766e;font-size:.76rem;font-weight:900}.duel-history-list--arena{gap:14px}.duel-history-battle{display:grid;grid-template-columns:124px minmax(0,1fr);overflow:hidden;border:1px solid #e1e8ec;border-radius:24px;background:#fff;box-shadow:0 15px 36px rgba(15,23,42,.06);transition:.18s}.duel-history-battle:hover{transform:translateY(-2px);box-shadow:0 21px 46px rgba(15,23,42,.09)}.duel-history-battle.won{border-color:#bae5d8}.duel-history-battle.lost{border-color:#f0d0d8}.duel-history-battle-state{display:grid;align-content:center;justify-items:center;gap:9px;padding:20px 12px;background:linear-gradient(180deg,#effcf8,#e7f8f3);color:#0d6f68}.duel-history-battle.lost .duel-history-battle-state{background:linear-gradient(180deg,#fff6f7,#fff0f2);color:#b42346}.duel-history-battle-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:20px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.07);font-size:1.55rem}.duel-history-battle-state strong{font-size:.73rem;letter-spacing:.10em}.duel-history-battle-main{min-width:0;padding:20px 22px}.duel-history-battle-top{display:flex;justify-content:space-between;gap:18px}.duel-history-date{color:#829198;font-size:.76rem}.duel-history-battle h3{margin:3px 0 0;font-size:1.25rem}.duel-history-elo{display:grid;justify-items:end;min-width:100px;padding:9px 11px;border-radius:15px;border:1px solid #dbe7e3;background:#f3fbf8}.duel-history-elo.negative{border-color:#f3d2d9;background:#fff5f6}.duel-history-elo.neutral{background:#f8fafb}.duel-history-elo span{font-size:.62rem;font-weight:950;letter-spacing:.12em;color:#71838a}.duel-history-elo strong{font-size:1.35rem;color:#0f766e}.duel-history-elo.negative strong{color:#be3153}.duel-history-elo small{color:#829198;font-size:.67rem}.duel-history-challenge{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:13px;color:#60737b;font-size:.86rem}.duel-history-battle-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:16px}.duel-history-battle-metrics>div{display:grid;gap:2px;padding:10px 12px;border-radius:14px;background:#f7fafb;border:1px solid #e8eef1}.duel-history-battle-metrics span{color:#849299;font-size:.67rem;font-weight:850;text-transform:uppercase}.duel-history-reason,.duel-history-adventure-source{margin-top:12px;padding:9px 11px;border-radius:12px;background:#fff8ea;color:#8d5a16;font-size:.8rem}.duel-history-lessons{margin-top:13px;border-top:1px dashed #dbe3e7;padding-top:12px}.duel-history-lessons summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;color:#315b61;font-size:.81rem;font-weight:900}.duel-history-lessons summary b{display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#e8f7f3;color:#0f766e}.duel-history-lessons summary em{margin-left:auto;color:#809097;font-size:.7rem;font-style:normal}.duel-history-lesson-grid{display:grid!important;grid-template-columns:repeat(2,1fr);gap:7px!important;margin-top:10px!important}.duel-history-lesson-grid .duel-history-lesson-link{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;padding:9px 10px!important;border-radius:13px!important;background:#f8fbfb!important;border:1px solid #e0ebe8!important;color:#36585e!important;text-decoration:none!important}.duel-history-lesson-grid .duel-history-lesson-link:hover{background:#effaf7!important;border-color:#9bd8cc!important}.duel-history-lesson-grid .duel-history-lesson-link>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duel-history-lesson-grid i{color:#0f766e;font-style:normal;font-weight:950}@media(max-width:900px){.duel-history-hero{grid-template-columns:1fr}.duel-history-rating{justify-self:start}.duel-history-stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.duel-history-page{width:min(100% - 18px,1180px)}.duel-history-battle{grid-template-columns:1fr}.duel-history-battle-state{grid-template-columns:auto 1fr;justify-items:start;padding:12px 16px}.duel-history-battle-icon{width:42px;height:42px}.duel-history-battle-metrics{grid-template-columns:repeat(2,1fr)}.duel-history-lesson-grid{grid-template-columns:1fr!important}}@media(max-width:480px){.duel-history-battle-top{display:grid}.duel-history-elo{justify-items:start}}


/* =========================================================
   V24.355 — Profils joueurs Duel
   ========================================================= */
.duel-profile-shortcut{display:inline-flex!important;align-items:center;gap:7px}
.duel-mini-avatar{
    display:inline-grid;
    place-items:center;
    width:28px;
    height:28px;
    border-radius:9px;
    background:#fff;
    box-shadow:inset 0 0 0 1px rgba(15,23,42,.08);
}
.duel-profile-page{
    width:min(1160px,calc(100% - 28px));
    margin:22px auto 70px;
}
.duel-profile-hero{
    position:relative;
    overflow:hidden;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    padding:30px;
    border-radius:28px;
    border:1px solid #e6ecef;
    background:
        radial-gradient(circle at 10% 25%,rgba(251,146,60,.14),transparent 26%),
        radial-gradient(circle at 92% 15%,rgba(45,212,191,.17),transparent 28%),
        linear-gradient(135deg,#fffaf5,#fff 44%,#f3fbfa);
    box-shadow:0 22px 55px rgba(15,23,42,.09);
}
.duel-profile-avatar{
    display:grid;
    place-items:center;
    width:118px;
    height:118px;
    border-radius:34px;
    font-size:4rem;
    box-shadow:0 18px 40px rgba(15,23,42,.12);
    border:4px solid rgba(255,255,255,.86);
}
.duel-avatar-amber{background:linear-gradient(145deg,#fff2dc,#f9a84b)}
.duel-avatar-arctic{background:linear-gradient(145deg,#f8fdff,#b8e7ef)}
.duel-avatar-night{background:linear-gradient(145deg,#30384d,#111827)}
.duel-avatar-sage{background:linear-gradient(145deg,#eff9e8,#8bcf77)}
.duel-avatar-fire{background:linear-gradient(145deg,#fff1e8,#ef6b4a)}
.duel-avatar-royal{background:linear-gradient(145deg,#f3eaff,#9b7ce8)}
.duel-profile-identity h1{
    margin:8px 0 2px;
    font-size:clamp(2rem,4vw,3.25rem);
    line-height:1;
    letter-spacing:-.045em;
}
.duel-profile-title{
    display:inline-flex;
    margin-top:8px;
    padding:7px 11px;
    border-radius:999px;
    background:#15323a;
    color:#fff;
    font-size:.78rem;
    font-weight:900;
}
.duel-profile-identity p{
    margin:9px 0 0;
    color:#687a82;
}
.duel-profile-rating{
    display:grid;
    justify-items:center;
    min-width:160px;
    padding:20px;
    border-radius:23px;
    background:linear-gradient(145deg,#132d35,#0f766e);
    color:#fff;
    box-shadow:0 18px 38px rgba(15,118,110,.22);
}
.duel-profile-rating span{font-size:.67rem;font-weight:950;letter-spacing:.16em;color:#bcece5}
.duel-profile-rating strong{font-size:3rem;line-height:1}
.duel-profile-rating small{margin-top:5px;color:#d8f4ef;font-weight:800}
.duel-profile-saved{
    margin:14px 0 0;
    padding:11px 14px;
    border-radius:14px;
    background:#eaf9f3;
    color:#0b6e5b;
    font-weight:850;
}
.duel-profile-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin:15px 0;
}
.duel-profile-stats article{
    display:grid;
    gap:4px;
    padding:17px 18px;
    border-radius:18px;
    border:1px solid #e4eaed;
    background:#fff;
    box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.duel-profile-stats span{
    color:#7a8b92;
    font-size:.69rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
}
.duel-profile-stats strong{
    color:#19363d;
    font-size:1.7rem;
}
.duel-profile-grid{
    display:grid;
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
    gap:15px;
}
.duel-profile-panel{
    padding:22px;
    border-radius:22px;
    border:1px solid #e3eaed;
    background:#fff;
    box-shadow:0 12px 30px rgba(15,23,42,.05);
}
.duel-profile-panel-head{
    display:flex;
    justify-content:space-between;
    align-items:end;
    gap:15px;
    margin-bottom:16px;
}
.duel-profile-panel-head h2{margin:3px 0 0;font-size:1.25rem}
.duel-profile-panel-head>a{
    color:#0f766e;
    text-decoration:none;
    font-size:.8rem;
    font-weight:850;
}
.duel-profile-languages{display:grid;gap:9px}
.duel-profile-languages>div{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:10px;
    align-items:center;
    padding:11px 12px;
    border-radius:14px;
    background:#f8fafb;
    border:1px solid #e8eef0;
}
.duel-profile-languages span{color:#7a8b92;font-size:.76rem}
.duel-profile-editor{display:grid;gap:18px}
.duel-profile-editor fieldset{
    margin:0;
    padding:0;
    border:0;
}
.duel-profile-editor legend{
    margin-bottom:10px;
    font-size:.78rem;
    font-weight:900;
    color:#455f67;
}
.duel-avatar-picker{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
}
.duel-avatar-choice{
    position:relative;
    display:grid;
    justify-items:center;
    gap:7px;
    padding:12px 8px;
    border-radius:16px;
    cursor:pointer;
    border:2px solid transparent;
    box-shadow:inset 0 0 0 1px rgba(15,23,42,.08);
}
.duel-avatar-choice input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.duel-avatar-choice:has(input:checked){
    border-color:#0f766e;
    box-shadow:0 0 0 3px rgba(15,118,110,.11);
}
.duel-avatar-choice-visual{
    display:grid;
    place-items:center;
    width:52px;
    height:52px;
    border-radius:16px;
    background:rgba(255,255,255,.76);
    font-size:2rem;
}
.duel-avatar-choice b{
    text-align:center;
    font-size:.72rem;
}
.duel-profile-recent{margin-top:15px}
.duel-profile-match-list{display:grid;gap:9px}
.duel-profile-match{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:15px;
    align-items:center;
    padding:13px 14px;
    border-radius:16px;
    background:#f9fbfb;
    border:1px solid #e5ecee;
}
.duel-profile-match.won{border-left:4px solid #2caa7e}
.duel-profile-match.lost{border-left:4px solid #e36b83}
.duel-profile-match>div:first-child{display:grid;gap:2px}
.duel-profile-match>div:first-child>span{
    color:#74878e;
    font-size:.72rem;
    font-weight:900;
}
.duel-profile-match small{color:#84949a}
.duel-profile-match-score{
    display:grid;
    justify-items:end;
    gap:3px;
}
.duel-profile-match-score strong{font-size:1.1rem}
.duel-profile-match-score>span{
    font-size:.72rem;
    font-weight:950;
}
.duel-profile-match-score .positive{color:#0f8a68}
.duel-profile-match-score .negative{color:#c23e5b}
.duel-player-profile-link,
.duel-opponent-link{
    color:inherit;
    text-decoration:none;
    border-bottom:1px dashed rgba(15,118,110,.35);
}
.duel-player-profile-link:hover,
.duel-opponent-link:hover{
    color:#0f766e;
    border-bottom-color:#0f766e;
}
@media(max-width:900px){
    .duel-profile-hero{grid-template-columns:auto 1fr}
    .duel-profile-rating{grid-column:1/-1;justify-self:start}
    .duel-profile-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
    .duel-profile-page{width:min(100% - 18px,1160px);margin-top:10px}
    .duel-profile-hero{grid-template-columns:1fr;justify-items:start;padding:22px}
    .duel-profile-avatar{width:92px;height:92px;border-radius:26px;font-size:3rem}
    .duel-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
    .duel-avatar-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:500px){
    .duel-profile-match{grid-template-columns:1fr}
    .duel-profile-match-score{justify-items:start}
}


/* V24.357 — système compétitif étendu */
.duel-matchmaking-chip{
 display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:5px 8px;border-radius:999px;
 font-size:.68rem;font-weight:900;background:#f3f7f8;border:1px solid #dce7ea;color:#52676f;
}
.duel-matchmaking-chip.balanced{background:#ecfbf7;border-color:#b8e6da;color:#0b7564}
.duel-matchmaking-chip.hard{background:#fff7e7;border-color:#f2d9a6;color:#9a6410}
.duel-matchmaking-chip.very-hard{background:#fff0f2;border-color:#f0c4cd;color:#ae2848}
.duel-matchmaking-chip.favored,.duel-matchmaking-chip.very-favored{background:#f2f7ff;border-color:#cfddf5;color:#315e9b}
.duel-ranking-tabs{
 width:min(1180px,calc(100% - 28px));margin:14px auto;display:flex;gap:8px;overflow:auto;padding:5px 0;
}
.duel-ranking-tabs a{
 flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:9px 12px;border-radius:999px;
 background:#fff;border:1px solid #dfe8eb;color:#526971;text-decoration:none;font-size:.76rem;font-weight:900;
}
.duel-ranking-tabs a.active{background:#12363c;color:#fff;border-color:#12363c;box-shadow:0 8px 20px rgba(18,54,60,.16)}
.duel-combat-announcer{
 position:fixed;left:50%;top:18%;z-index:10000;transform:translate(-50%,-10px) scale(.9);
 padding:13px 20px;border-radius:999px;background:#152f36;color:#fff;font-weight:1000;letter-spacing:.07em;
 box-shadow:0 18px 50px rgba(15,23,42,.24);opacity:0;pointer-events:none;
 transition:opacity .2s ease,transform .2s ease;
}
.duel-combat-announcer.is-showing{opacity:1;transform:translate(-50%,0) scale(1)}
.duel-combat-announcer.positive{background:linear-gradient(135deg,#0f766e,#16a085)}
.duel-combat-announcer.negative{background:linear-gradient(135deg,#a82949,#e6576f)}
.duel-rematch-form{display:inline-flex;margin:0}
.duel-badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.duel-badge-grid article{
 display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;padding:12px;border-radius:15px;
 background:#f8fbfb;border:1px solid #e3ecee;
}
.duel-badge-grid article>span{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#fff;font-size:1.5rem;box-shadow:0 6px 18px rgba(15,23,42,.07)}
.duel-badge-grid article div{display:grid;gap:2px}
.duel-badge-grid article small{color:#7b8e95;font-size:.7rem;line-height:1.3}
.duel-profile-languages b{color:#0f766e}
@media(max-width:650px){.duel-badge-grid{grid-template-columns:1fr}.duel-combat-announcer{top:12%;max-width:90%;text-align:center}}


/* V24.359 — historique duel : profil adverse plus visible */
.duel-history-opponent-card{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    margin-top:10px;
    padding:11px 12px;
    border-radius:16px;
    border:1px solid #deebe7;
    background:linear-gradient(180deg,#fbfffe,#f4fbf9);
    text-decoration:none;
    color:inherit;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.duel-history-opponent-card:hover,
.duel-history-opponent-card:focus-visible{
    transform:translateY(-1px);
    border-color:#9fd7cc;
    box-shadow:0 12px 24px rgba(15,118,110,.08);
}
.duel-history-opponent-avatar{
    width:48px;
    height:48px;
    border-radius:16px;
    box-shadow:0 8px 18px rgba(15,23,42,.08);
    font-size:1.25rem;
}
.duel-history-opponent-meta{
    min-width:0;
    display:grid;
    gap:2px;
}
.duel-history-opponent-meta small{
    color:#6f858c;
    font-size:.68rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.duel-history-opponent-meta strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.96rem;
}
.duel-history-opponent-meta em{
    color:#70858c;
    font-style:normal;
    font-size:.78rem;
}
.duel-history-opponent-cta{
    color:#0f766e;
    font-size:.74rem;
    font-weight:900;
    white-space:nowrap;
}
@media(max-width:700px){
    .duel-history-opponent-card{
        grid-template-columns:auto 1fr;
    }
    .duel-history-opponent-cta{
        grid-column:2;
        padding-left:2px;
    }
}
@media(max-width:480px){
    .duel-history-opponent-card{
        padding:10px;
        border-radius:14px;
    }
    .duel-history-opponent-avatar{
        width:44px;
        height:44px;
    }
}


/* V24.360 — lien profil joueur explicite dans l'historique */
.duel-history-opponent-heading{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin-top:2px;
}
.duel-history-opponent-heading h3{
    margin:0;
}
.duel-history-profile-button{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid #a8dcd2;
    background:#ecfaf6;
    color:#0f766e;
    text-decoration:none;
    font-size:.72rem;
    font-weight:950;
    white-space:nowrap;
    box-shadow:0 5px 12px rgba(15,118,110,.06);
    transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.duel-history-profile-button:hover,
.duel-history-profile-button:focus-visible{
    transform:translateY(-1px);
    background:#daf5ee;
    border-color:#67bfaf;
    box-shadow:0 8px 18px rgba(15,118,110,.12);
    outline:none;
}
.duel-opponent-link{
    color:#163c44!important;
    font-weight:950;
    text-decoration:underline!important;
    text-decoration-color:#7bcabd!important;
    text-decoration-thickness:2px!important;
    text-underline-offset:3px;
    border-bottom:0!important;
}
.duel-opponent-link:hover{
    color:#0f766e!important;
}
@media(max-width:520px){
    .duel-history-opponent-heading{
        align-items:flex-start;
        flex-direction:column;
        gap:6px;
    }
}


/* V24.366 — historique : carte joueur + carte ELO harmonisées */
.duel-history-battle-top{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(190px,260px);
    align-items:stretch;
    gap:16px;
}
.duel-history-battle-top > div:first-child{
    min-width:0;
    display:grid;
    gap:10px;
    align-content:start;
}
.duel-history-opponent-card{
    margin-top:0;
    min-height:114px;
    height:100%;
    align-content:center;
}
.duel-history-elo{
    min-width:0;
    min-height:114px;
    height:100%;
    padding:14px 16px;
    border-radius:18px;
    display:grid;
    align-content:center;
    justify-items:end;
    gap:6px;
}
.duel-history-elo strong{
    line-height:1;
}
.duel-history-elo small{
    text-align:right;
}

@media(max-width:860px){
    .duel-history-battle-top{
        grid-template-columns:minmax(0,1fr) minmax(170px,220px);
    }
}

@media(max-width:640px){
    .duel-history-battle-top{
        grid-template-columns:1fr 1fr;
    }
    .duel-history-opponent-card,
    .duel-history-elo{
        min-height:116px;
    }
    .duel-history-opponent-card{
        padding:12px;
    }
}

@media(max-width:520px){
    .duel-history-battle-top{
        grid-template-columns:1fr;
        gap:12px;
    }
    .duel-history-opponent-card,
    .duel-history-elo{
        width:100%;
        min-height:110px;
    }
    .duel-history-elo{
        justify-items:start;
        text-align:left;
    }
    .duel-history-elo small{
        text-align:left;
    }
}


/* V24.368 — avertissement de niveau avant un Duel */
.duel-level-warning{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:13px 14px;
    border:1px solid #efcf96;
    border-radius:16px;
    background:linear-gradient(135deg,#fffaf0,#fff6df);
    color:#70521c;
    box-shadow:0 8px 20px rgba(146,94,15,.06);
}
.duel-level-warning[hidden]{
    display:none !important;
}
.duel-level-warning-icon{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:13px;
    background:#fff;
    font-size:1.25rem;
    box-shadow:0 5px 14px rgba(15,23,42,.06);
}
.duel-level-warning>div{
    min-width:0;
}
.duel-level-warning strong{
    display:block;
    margin-bottom:2px;
    font-size:.82rem;
}
.duel-level-warning p{
    margin:0;
    color:#82672f;
    font-size:.76rem;
    line-height:1.45;
}
.duel-level-warning>a{
    color:#8b5c0a;
    font-size:.72rem;
    font-weight:900;
    text-decoration:none;
    white-space:nowrap;
}
.duel-level-warning>a:hover{
    text-decoration:underline;
}
@media(max-width:640px){
    .duel-level-warning{
        grid-template-columns:auto minmax(0,1fr);
    }
    .duel-level-warning>a{
        grid-column:2;
        justify-self:start;
    }
}


/* V24.375 — restauration scoreboard mobile Duel */
.duel-mobile-scoreboard{
    display:none;
}

@media(max-width:780px){
    .duel-mobile-scoreboard:not([hidden]){
        display:grid;
        gap:8px;
        position:sticky;
        top:72px;
        z-index:110;
        margin:8px 0 10px;
    }

    .duel-mobile-lane{
        padding:10px 12px;
        border:1px solid #dce8eb;
        border-radius:16px;
        background:rgba(255,255,255,.96);
        box-shadow:0 10px 24px rgba(15,23,42,.08);
        backdrop-filter:blur(10px);
        -webkit-backdrop-filter:blur(10px);
    }

    .duel-mobile-lane-self{
        background:linear-gradient(135deg,rgba(236,253,245,.97),rgba(255,255,255,.97));
    }

    .duel-mobile-lane-opponent{
        background:linear-gradient(135deg,rgba(255,247,237,.97),rgba(255,255,255,.97));
    }

    .duel-mobile-lane-head{
        display:grid;
        grid-template-columns:auto minmax(0,1fr) auto;
        gap:8px;
        align-items:center;
        margin-bottom:7px;
    }

    .duel-mobile-lane-head>strong{
        min-width:0;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        color:#18373f;
        font-size:.82rem;
    }

    .duel-mobile-lane-badge{
        display:inline-flex;
        align-items:center;
        gap:4px;
        padding:4px 7px;
        border-radius:999px;
        background:#0f766e;
        color:#fff;
        font-size:.58rem;
        font-weight:950;
        letter-spacing:.06em;
        white-space:nowrap;
    }

    .duel-mobile-lane-badge-opponent{
        background:linear-gradient(90deg,#f97316,#ec4899);
    }

    .duel-mobile-lane-score{
        color:#18373f;
        font-size:.7rem;
        font-weight:900;
        white-space:nowrap;
    }

    .duel-mobile-lane-progress{
        height:9px;
        overflow:hidden;
        border-radius:999px;
        background:#d9f2ec;
        box-shadow:inset 0 2px 5px rgba(15,23,42,.07);
    }

    .duel-mobile-lane-progress-opponent{
        background:#fde7df;
    }

    .duel-mobile-lane-progress i{
        display:block;
        width:0;
        height:100%;
        border-radius:inherit;
        background:linear-gradient(90deg,#0f766e,#14b8a6);
        transition:width .4s cubic-bezier(.2,.85,.2,1);
    }

    .duel-mobile-lane-progress-opponent i{
        background:linear-gradient(90deg,#f97316,#ec4899);
    }

    .duel-mobile-lane-meta{
        display:flex;
        gap:12px;
        margin-top:6px;
        color:#63777e;
        font-size:.66rem;
        font-weight:850;
    }

    .duel-mobile-lane-meta span:first-child{
        margin-right:auto;
    }

    /* Les grandes cartes desktop sont inutiles sur téléphone :
       le scoreboard fixe donne déjà les deux progressions. */
    .duel-player-self,
    .duel-player-opponent{
        display:none;
    }

    .duel-arena{
        grid-template-columns:1fr !important;
    }

    .duel-question-card,
    .duel-adventure-scene,
    .duel-race-track{
        grid-column:1 !important;
    }
}

@media(max-width:430px){
    .duel-mobile-lane{
        padding:9px 10px;
    }

    .duel-mobile-lane-head{
        gap:6px;
    }

    .duel-mobile-lane-badge{
        font-size:.54rem;
        padding:4px 6px;
    }
}


/* =========================================================
   V24.381 — Duel mobile-first flow
   ========================================================= */
.duel-mobile-flow{display:none}

@media(max-width:780px){
    body.duel-mobile-flow-page .duel-hero,
    body.duel-mobile-flow-page > .site-main > .duel-hero{
        display:none!important;
    }

    body.duel-mobile-flow-page .duel-mobile-flow{
        display:grid;
        min-height:calc(100svh - 150px);
        margin:-4px -8px 0;
        padding:14px 14px 30px;
        background:
            radial-gradient(circle at 15% 5%,rgba(20,184,166,.12),transparent 32%),
            radial-gradient(circle at 90% 60%,rgba(236,72,153,.09),transparent 34%),
            #f7fbfb;
    }

    .duel-mobile-flow-head{
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        gap:14px;
        align-items:start;
        margin-bottom:18px;
        padding:5px 2px;
    }
    .duel-mobile-flow-kicker{
        color:#0f766e;
        font-size:.68rem;
        font-weight:1000;
        letter-spacing:.1em;
    }
    .duel-mobile-flow-head h1{
        margin:5px 0 4px;
        color:#142d35;
        font-size:clamp(1.9rem,8vw,2.5rem);
        line-height:1.05;
    }
    .duel-mobile-flow-head p{
        margin:0;
        max-width:400px;
        color:#6b7e84;
        font-size:.86rem;
        line-height:1.45;
    }
    .duel-mobile-step-indicator{
        display:flex;
        align-items:baseline;
        justify-content:center;
        min-width:58px;
        padding:10px 12px;
        border:1px solid #d8e7e4;
        border-radius:18px;
        background:#fff;
        box-shadow:0 8px 20px rgba(22,50,57,.07);
        color:#789096;
    }
    .duel-mobile-step-indicator strong{
        color:#0f766e;
        font-size:1.45rem;
        line-height:1;
    }

    .duel-mobile-flow-screen{display:none}
    .duel-mobile-flow-screen.is-active{display:grid;gap:12px}

    .duel-mobile-action-card{
        appearance:none;
        width:100%;
        display:grid;
        grid-template-columns:auto minmax(0,1fr) auto;
        align-items:center;
        gap:13px;
        padding:17px 15px;
        border:1px solid #dbe8e6;
        border-radius:22px;
        background:#fff;
        color:#17363e;
        text-align:left;
        text-decoration:none;
        box-shadow:0 12px 30px rgba(23,54,62,.07);
        cursor:pointer;
    }
    .duel-mobile-action-card:active{transform:scale(.99)}
    .duel-mobile-action-icon{
        display:grid;
        place-items:center;
        width:50px;height:50px;
        border-radius:16px;
        background:#ecf9f6;
        font-size:1.35rem;
    }
    .duel-mobile-action-card small{
        display:block;
        margin-bottom:2px;
        color:#0f766e;
        font-size:.64rem;
        font-weight:950;
        text-transform:uppercase;
        letter-spacing:.08em;
    }
    .duel-mobile-action-card strong{
        display:block;
        margin-bottom:4px;
        font-size:1.03rem;
    }
    .duel-mobile-action-card p{
        margin:0;
        color:#71858a;
        font-size:.76rem;
        line-height:1.4;
    }
    .duel-mobile-action-card>b{
        color:#0f766e;
        font-size:1.2rem;
    }
    .duel-mobile-action-resume{
        border-color:#8bd6c8;
        background:linear-gradient(135deg,#ebfbf7,#fff);
    }
    .duel-mobile-action-resume .duel-mobile-action-icon{
        background:#0f8f82;
        color:#fff;
    }

    .duel-mobile-secondary-links{
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:8px;
        margin-top:3px;
    }
    .duel-mobile-secondary-links a{
        padding:10px 5px;
        border:1px solid #e0e9e8;
        border-radius:14px;
        background:rgba(255,255,255,.72);
        color:#516a70;
        text-align:center;
        text-decoration:none;
        font-size:.68rem;
        font-weight:850;
    }

    .duel-mobile-flow-back{
        justify-self:start;
        min-height:42px;
        padding:8px 13px;
        border:1px solid #d8e5e4;
        border-radius:13px;
        background:#fff;
        color:#35545a;
        font-weight:900;
    }
    .duel-mobile-flow-slot{
        display:grid;
        gap:12px;
    }

    /* Existing blocks become mobile step panels */
    body.duel-mobile-flow-page .duel-lobby-grid,
    body.duel-mobile-flow-page > .duel-open-lobby,
    body.duel-mobile-flow-page .duel-open-lobby{
        margin-top:0;
    }
    body.duel-mobile-flow-page .duel-lobby-grid{
        display:contents;
    }

    body.duel-mobile-flow-page [data-duel-mobile-panel]{
        border-radius:22px;
        box-shadow:none;
    }

    body.duel-mobile-flow-page .duel-card-heading .duel-step-badge{
        display:none;
    }

    body.duel-mobile-flow-page .duel-create-card,
    body.duel-mobile-flow-page .duel-join-card,
    body.duel-mobile-flow-page .duel-open-lobby{
        padding:17px;
    }

    body.duel-mobile-flow-page .duel-card-heading{
        margin-bottom:14px;
    }

    body.duel-mobile-flow-page .duel-mode-grid{
        grid-template-columns:1fr!important;
    }

    body.duel-mobile-flow-page .duel-open-list{
        gap:9px;
    }

    body.duel-mobile-flow-page .duel-open-item{
        grid-template-columns:minmax(0,1fr);
        gap:10px;
        padding:13px;
    }
    body.duel-mobile-flow-page .duel-open-item .button{
        width:100%;
        justify-content:center;
    }

    /* hide the original desktop placement on mobile; JS moves the chosen panel into the flow slot */
    body.duel-mobile-flow-page .duel-lobby-grid > [data-duel-mobile-panel],
    body.duel-mobile-flow-page > [data-duel-mobile-panel]{
        display:none;
    }
    body.duel-mobile-flow-page .duel-mobile-flow-slot > [data-duel-mobile-panel]{
        display:block!important;
    }

    /* Desktop footer not useful inside mobile Duel hub */
    body.duel-mobile-flow-page .vulpingo-footer{
        display:none!important;
    }
}

/* =========================================================
   V24.381 — Step 3: actual Duel fullscreen on mobile
   ========================================================= */
@media(max-width:780px){
    body.duel-mobile-game-active{
        overflow-x:hidden;
        background:#f7fbfb;
    }
    body.duel-mobile-game-active .site-header,
    body.duel-mobile-game-active .mobile-tabbar,
    body.duel-mobile-game-active .vulpingo-footer{
        display:none!important;
    }
    body.duel-mobile-game-active main.site-main,
    body.duel-mobile-game-active .site-main{
        max-width:none!important;
        width:100%!important;
        margin:0!important;
        padding:0!important;
    }
    body.duel-mobile-game-active .duel-game-shell{
        min-height:100svh;
        width:100%;
        max-width:none;
        margin:0;
        padding:8px 10px 24px;
    }
    body.duel-mobile-game-active .duel-mobile-scoreboard:not([hidden]){
        top:0;
        margin-top:0;
        border-radius:0 0 20px 20px;
    }
    body.duel-mobile-game-active .duel-game-top{
        margin-top:8px;
        border-radius:18px;
    }
    body.duel-mobile-game-active .duel-question-card,
    body.duel-mobile-game-active .duel-adventure-scene{
        border-radius:22px;
    }

    body.duel-mobile-game-result .site-header{
        display:none!important;
    }
    body.duel-mobile-game-result .duel-game-shell{
        min-height:100svh;
        margin:0;
        padding:10px;
    }
}


/* V24.383 — accueil Duel mobile compact + matchmaking uniquement au clic */
@media(max-width:780px){
    body.duel-mobile-flow-page .duel-mobile-flow{
        padding-top:6px;
    }

    body.duel-mobile-flow-page .duel-mobile-flow-head{
        margin-bottom:10px;
        padding-top:0;
    }

    body.duel-mobile-flow-page .duel-mobile-flow-screen[data-duel-mobile-screen="home"].is-active{
        gap:10px;
        align-content:start;
    }

    /* Aucun panneau de configuration / matchmaking ne doit apparaître
       sous l'accueil mobile. Ils sont injectés uniquement après un clic. */
    body.duel-mobile-flow-page [data-duel-mobile-panel]{
        display:none !important;
    }

    body.duel-mobile-flow-page .duel-mobile-flow-slot > [data-duel-mobile-panel]{
        display:block !important;
    }
}


/* =========================================================
   V24.384 — Duel mobile : viewport adaptatif + liens sûrs
   ========================================================= */

/* Le décor du hero Historique ne doit JAMAIS intercepter les taps. */
.duel-history-hero::after{
    pointer-events:none !important;
    z-index:0 !important;
}
.duel-history-hero > *{
    position:relative;
    z-index:1;
}
.duel-history-actions{
    position:relative;
    z-index:20;
}
.duel-history-actions a{
    position:relative;
    z-index:21;
    pointer-events:auto !important;
    touch-action:manipulation;
}

/* Base commune : aucune page Duel ne dépasse horizontalement sur mobile. */
@media(max-width:780px){
    body.duel-mobile-page{
        overflow-x:hidden;
    }

    body.duel-mobile-page .site-main,
    body.duel-mobile-page main.site-main{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    body.duel-mobile-page img,
    body.duel-mobile-page svg{
        max-width:100%;
    }

    /* HUB */
    body.duel-mobile-hub-page .duel-mobile-flow{
        width:100%;
        max-width:100%;
        min-height:calc(100svh - 138px);
    }

    /* Historique / Profil / Classement : largeur réelle de l'écran. */
    body.duel-mobile-history-page .duel-history-page,
    body.duel-mobile-profile-page .duel-profile-page,
    body.duel-mobile-ranking-page .duel-ranking-card,
    body.duel-mobile-ranking-page .duel-ranking-tabs,
    body.duel-mobile-ranking-page .duel-ranking-hero{
        width:calc(100% - 16px) !important;
        max-width:none !important;
        margin-left:8px !important;
        margin-right:8px !important;
    }

    body.duel-mobile-history-page .duel-history-page,
    body.duel-mobile-profile-page .duel-profile-page{
        margin-top:8px !important;
        margin-bottom:84px !important;
    }

    body.duel-mobile-history-page .duel-history-hero,
    body.duel-mobile-profile-page .duel-profile-hero,
    body.duel-mobile-ranking-page .duel-ranking-hero{
        padding:18px !important;
        border-radius:22px !important;
    }

    body.duel-mobile-history-page .duel-history-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
        gap:8px;
        margin-top:16px;
    }

    body.duel-mobile-history-page .duel-history-actions .button{
        width:100%;
        min-height:46px;
        justify-content:center;
    }

    body.duel-mobile-history-page .duel-history-rating{
        width:100%;
        min-width:0;
        padding:18px;
    }

    body.duel-mobile-history-page .duel-history-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
        margin:10px 0 16px;
    }

    body.duel-mobile-history-page .duel-history-stats article{
        min-height:96px;
        padding:14px;
    }

    body.duel-mobile-profile-page .duel-profile-hero{
        gap:14px;
    }

    body.duel-mobile-profile-page .duel-profile-stats{
        gap:8px;
    }

    body.duel-mobile-ranking-page .duel-ranking-tabs{
        padding-bottom:4px;
    }

    body.duel-mobile-ranking-page .duel-ranking-row{
        grid-template-columns:auto minmax(0,1fr) auto;
        min-width:0;
    }
}

/* ---------------------------------------------------------
   VRAI DUEL EN COURS — utilise toute la hauteur/largeur écran
   --------------------------------------------------------- */
@media(max-width:780px){
    body.duel-mobile-game-active{
        width:100%;
        height:100svh;
        min-height:100svh;
        overflow:hidden !important;
        overscroll-behavior:none;
    }

    body.duel-mobile-game-active .duel-game-shell{
        box-sizing:border-box;
        width:100vw !important;
        max-width:100vw !important;
        height:100svh !important;
        min-height:100svh !important;
        margin:0 !important;
        padding:
            max(4px, env(safe-area-inset-top))
            max(7px, env(safe-area-inset-right))
            max(6px, env(safe-area-inset-bottom))
            max(7px, env(safe-area-inset-left)) !important;
        display:flex;
        flex-direction:column;
        gap:5px;
        overflow:hidden;
    }

    body.duel-mobile-game-active .duel-mobile-scoreboard:not([hidden]){
        position:relative !important;
        top:auto !important;
        flex:0 0 auto;
        gap:4px;
        margin:0 !important;
        z-index:110;
    }

    body.duel-mobile-game-active .duel-mobile-lane{
        padding:6px 8px;
        border-radius:12px;
    }

    body.duel-mobile-game-active .duel-mobile-lane-head{
        gap:5px;
        margin-bottom:4px;
    }

    body.duel-mobile-game-active .duel-mobile-lane-head>strong{
        font-size:clamp(.68rem,3vw,.78rem);
    }

    body.duel-mobile-game-active .duel-mobile-lane-badge{
        padding:3px 5px;
        font-size:.49rem;
    }

    body.duel-mobile-game-active .duel-mobile-lane-score{
        font-size:.62rem;
    }

    body.duel-mobile-game-active .duel-mobile-lane-progress{
        height:6px;
    }

    body.duel-mobile-game-active .duel-mobile-lane-meta{
        gap:8px;
        margin-top:3px;
        font-size:.56rem;
    }

    body.duel-mobile-game-active .duel-game-top{
        flex:0 0 auto;
        min-height:0;
        margin:0 !important;
        padding:6px 8px !important;
        border-radius:12px !important;
    }

    body.duel-mobile-game-active .duel-game-top .duel-back{
        font-size:.65rem;
    }

    body.duel-mobile-game-active .duel-game-title{
        min-width:0;
    }

    body.duel-mobile-game-active .duel-game-course,
    body.duel-mobile-game-active .duel-story-name{
        max-width:42vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    body.duel-mobile-game-active .duel-game-title strong{
        font-size:.65rem;
    }

    body.duel-mobile-game-active .duel-timer strong{
        font-size:1rem;
    }

    body.duel-mobile-game-active .duel-battle-status:not([hidden]){
        flex:0 0 auto;
        margin:0;
        padding:4px 7px;
        min-height:28px;
        border-radius:10px;
        font-size:.62rem;
    }

    body.duel-mobile-game-active .duel-battle-live{
        font-size:.53rem;
    }

    body.duel-mobile-game-active .duel-arena:not([hidden]){
        flex:1 1 auto;
        min-height:0;
        width:100%;
        display:flex !important;
        flex-direction:column;
        gap:5px;
        overflow:hidden;
    }

    body.duel-mobile-game-active .duel-vs-pill{
        display:none !important;
    }

    body.duel-mobile-game-active .duel-adventure-scene:not([hidden]){
        flex:0 1 30svh;
        min-height:0;
        max-height:30svh;
        overflow-y:auto;
        overscroll-behavior:contain;
        padding:9px 10px !important;
        border-radius:14px !important;
    }

    body.duel-mobile-game-active .duel-scene-narration,
    body.duel-mobile-game-active .duel-scene-dialogue{
        font-size:clamp(.72rem,3.2vw,.86rem);
        line-height:1.35;
    }

    body.duel-mobile-game-active .duel-question-card{
        flex:1 1 auto;
        min-height:0;
        width:100%;
        overflow-y:auto;
        overscroll-behavior:contain;
        -webkit-overflow-scrolling:touch;
        padding:clamp(9px,2.2svh,14px) 10px !important;
        border-radius:14px !important;
    }

    body.duel-mobile-game-active .duel-question-card h2{
        margin:5px 0;
        font-size:clamp(.88rem,3.7vw,1.12rem);
        line-height:1.2;
    }

    body.duel-mobile-game-active .duel-prompt{
        margin:5px 0 8px;
        font-size:clamp(.86rem,3.6vw,1.08rem);
        line-height:1.3;
    }

    body.duel-mobile-game-active .duel-question-topline{
        margin-bottom:3px;
    }

    body.duel-mobile-game-active .duel-options{
        gap:6px;
    }

    body.duel-mobile-game-active .duel-options button,
    body.duel-mobile-game-active .duel-option{
        min-height:42px;
        padding:8px 10px;
        font-size:clamp(.76rem,3.3vw,.92rem);
    }

    body.duel-mobile-game-active .duel-text-answer{
        gap:6px;
    }

    body.duel-mobile-game-active .duel-text-answer input{
        min-height:44px;
    }

    body.duel-mobile-game-active .duel-word-bank{
        gap:5px;
    }

    body.duel-mobile-game-active .duel-word-bank button{
        min-height:36px;
        padding:6px 8px;
    }

    body.duel-mobile-game-active .duel-feedback{
        margin:6px 0 0;
        font-size:.75rem;
    }

    /* Résultat : centré et contenu dans le viewport. */
    body.duel-mobile-game-result{
        overflow:hidden !important;
    }

    body.duel-mobile-game-result .duel-game-shell{
        width:100vw !important;
        max-width:100vw !important;
        height:100svh !important;
        min-height:100svh !important;
        margin:0 !important;
        padding:10px !important;
        display:grid;
        place-items:center;
        overflow:hidden;
    }

    body.duel-mobile-game-result .duel-result:not([hidden]){
        width:100%;
        max-height:calc(100svh - 20px);
        overflow-y:auto;
        padding:18px 14px;
        border-radius:20px;
    }

    body.duel-mobile-game-result .duel-result-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:7px;
        width:100%;
    }

    body.duel-mobile-game-result .duel-result-actions .button,
    body.duel-mobile-game-result .duel-rematch-form,
    body.duel-mobile-game-result .duel-rematch-form .button{
        width:100%;
        justify-content:center;
    }
}

/* Très petits téléphones / faible hauteur : compaction supplémentaire. */
@media(max-width:430px), (max-height:700px) and (max-width:780px){
    body.duel-mobile-game-active .duel-mobile-lane{
        padding:5px 7px;
    }
    body.duel-mobile-game-active .duel-mobile-lane-meta{
        display:none;
    }
    body.duel-mobile-game-active .duel-game-course{
        font-size:.6rem;
    }
    body.duel-mobile-game-active .duel-battle-status:not([hidden]){
        min-height:24px;
    }
    body.duel-mobile-game-active .duel-question-card{
        padding:8px !important;
    }
    body.duel-mobile-game-active .duel-options button,
    body.duel-mobile-game-active .duel-option{
        min-height:38px;
        padding:6px 8px;
    }
}


/* =========================================================
   V24.385 — Duel mobile : marges latérales quasi plein écran
   ========================================================= */
@media(max-width:780px){
    /* Le conteneur global ne doit plus rajouter son propre gutter. */
    body.duel-mobile-page .site-main,
    body.duel-mobile-page main.site-main{
        padding-left:0 !important;
        padding-right:0 !important;
    }

    /* Hub : pratiquement bord à bord, avec juste un filet de respiration. */
    body.duel-mobile-hub-page .duel-mobile-flow{
        width:calc(100% - 6px) !important;
        max-width:none !important;
        margin-left:3px !important;
        margin-right:3px !important;
        padding-left:8px !important;
        padding-right:8px !important;
        border-radius:0 !important;
    }

    /* Historique / Profil / Classement : 3 px de marge réelle par côté. */
    body.duel-mobile-history-page .duel-history-page,
    body.duel-mobile-profile-page .duel-profile-page,
    body.duel-mobile-ranking-page .duel-ranking-card,
    body.duel-mobile-ranking-page .duel-ranking-tabs,
    body.duel-mobile-ranking-page .duel-ranking-hero{
        width:calc(100% - 6px) !important;
        max-width:none !important;
        margin-left:3px !important;
        margin-right:3px !important;
    }

    /* Les cartes internes peuvent utiliser presque toute la largeur disponible. */
    body.duel-mobile-history-page .duel-history-hero,
    body.duel-mobile-profile-page .duel-profile-hero,
    body.duel-mobile-ranking-page .duel-ranking-hero,
    body.duel-mobile-ranking-page .duel-ranking-card{
        border-radius:18px !important;
    }

    body.duel-mobile-history-page .duel-history-battle,
    body.duel-mobile-profile-page .duel-profile-panel,
    body.duel-mobile-profile-page .duel-profile-stats article,
    body.duel-mobile-ranking-page .duel-ranking-row{
        border-radius:16px !important;
    }

    /* Partie active : réduit encore le padding horizontal sans coller les contrôles au bord. */
    body.duel-mobile-game-active .duel-game-shell{
        padding-left:max(3px, env(safe-area-inset-left)) !important;
        padding-right:max(3px, env(safe-area-inset-right)) !important;
    }

    body.duel-mobile-game-result .duel-game-shell{
        padding-left:max(4px, env(safe-area-inset-left)) !important;
        padding-right:max(4px, env(safe-area-inset-right)) !important;
    }
}

@media(max-width:430px){
    body.duel-mobile-hub-page .duel-mobile-flow,
    body.duel-mobile-history-page .duel-history-page,
    body.duel-mobile-profile-page .duel-profile-page,
    body.duel-mobile-ranking-page .duel-ranking-card,
    body.duel-mobile-ranking-page .duel-ranking-tabs,
    body.duel-mobile-ranking-page .duel-ranking-hero{
        width:calc(100% - 4px) !important;
        margin-left:2px !important;
        margin-right:2px !important;
    }

    body.duel-mobile-hub-page .duel-mobile-flow{
        padding-left:6px !important;
        padding-right:6px !important;
    }

    body.duel-mobile-game-active .duel-game-shell{
        padding-left:max(2px, env(safe-area-inset-left)) !important;
        padding-right:max(2px, env(safe-area-inset-right)) !important;
    }
}


/* =========================================================
   V24.386 — Résultat / victoire mobile quasi plein écran
   ========================================================= */
@media(max-width:780px){
    body.duel-mobile-game-result .duel-game-shell{
        width:100vw !important;
        max-width:100vw !important;
        height:100svh !important;
        min-height:100svh !important;
        margin:0 !important;
        padding:
            max(2px, env(safe-area-inset-top))
            max(2px, env(safe-area-inset-right))
            max(2px, env(safe-area-inset-bottom))
            max(2px, env(safe-area-inset-left)) !important;
        display:grid !important;
        place-items:stretch !important;
    }

    body.duel-mobile-game-result .duel-result:not([hidden]){
        box-sizing:border-box;
        width:100% !important;
        max-width:none !important;
        min-height:calc(100svh - 4px);
        max-height:calc(100svh - 4px);
        margin:0 !important;
        padding:clamp(16px,3svh,24px) 12px !important;
        border-radius:18px !important;
        display:flex !important;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        overflow-y:auto;
        text-align:center;
    }

    body.duel-mobile-game-result .duel-result-icon{
        margin-bottom:6px;
        font-size:clamp(2.6rem,12vw,4.2rem);
    }

    body.duel-mobile-game-result .duel-result h1{
        margin:6px 0;
        font-size:clamp(1.8rem,8vw,2.8rem);
        line-height:1.02;
    }

    body.duel-mobile-game-result .duel-result p{
        max-width:520px;
        margin:4px auto 14px;
        font-size:clamp(.82rem,3.5vw,1rem);
    }

    body.duel-mobile-game-result .duel-result-actions{
        width:100%;
        margin-top:10px;
    }
}

@media(max-width:430px){
    body.duel-mobile-game-result .duel-game-shell{
        padding-left:max(1px, env(safe-area-inset-left)) !important;
        padding-right:max(1px, env(safe-area-inset-right)) !important;
    }

    body.duel-mobile-game-result .duel-result:not([hidden]){
        min-height:calc(100svh - 2px);
        max-height:calc(100svh - 2px);
        border-radius:14px !important;
        padding-left:9px !important;
        padding-right:9px !important;
    }
}


/* =========================================================
   V24.389 — Association Rush progressif
   ========================================================= */
.duel-association-rush{
    display:grid;
    gap:12px;
    margin-top:10px;
}
.duel-association-rush[hidden]{display:none!important}
.duel-association-rush-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:#546a70;
    font-size:.76rem;
    font-weight:900;
}
.duel-association-rush-head>span{
    color:#0f766e;
}
.duel-association-list{
    display:grid;
    gap:8px;
}
.duel-association-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:8px;
    padding:8px;
    border:1px solid #e0e9e8;
    border-radius:14px;
    background:#f9fcfb;
}
.duel-association-left{
    display:flex;
    align-items:center;
    min-width:0;
    gap:7px;
}
.duel-association-left small{
    flex:0 0 auto;
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    border-radius:8px;
    background:#e7f7f3;
    color:#0f766e;
    font-size:.65rem;
    font-weight:950;
}
.duel-association-left strong{
    min-width:0;
    overflow-wrap:anywhere;
    color:#1d3b42;
    font-size:.86rem;
}
.duel-association-arrow{
    color:#8da0a5;
    font-weight:1000;
}
.duel-association-select{
    min-width:0;
    width:100%;
    min-height:42px;
    padding:7px 28px 7px 9px;
    border:1px solid #cedfdb;
    border-radius:11px;
    background:#fff;
    color:#25464d;
    font:inherit;
    font-size:.8rem;
    font-weight:800;
}
.duel-association-rush>.button{
    width:100%;
    min-height:44px;
    justify-content:center;
}

@media(max-width:780px){
    body.duel-mobile-game-active .duel-association-rush{
        gap:6px;
        margin-top:6px;
    }
    body.duel-mobile-game-active .duel-association-rush-head{
        font-size:.65rem;
    }
    body.duel-mobile-game-active .duel-association-list{
        gap:5px;
    }
    body.duel-mobile-game-active .duel-association-row{
        gap:5px;
        padding:5px 6px;
        border-radius:10px;
    }
    body.duel-mobile-game-active .duel-association-left{
        gap:5px;
    }
    body.duel-mobile-game-active .duel-association-left small{
        width:20px;
        height:20px;
        border-radius:6px;
        font-size:.55rem;
    }
    body.duel-mobile-game-active .duel-association-left strong{
        font-size:clamp(.68rem,3vw,.79rem);
        line-height:1.15;
    }
    body.duel-mobile-game-active .duel-association-select{
        min-height:36px;
        padding:5px 24px 5px 7px;
        font-size:clamp(.65rem,2.8vw,.76rem);
    }
    body.duel-mobile-game-active .duel-association-rush>.button{
        min-height:38px;
        padding:7px 10px;
    }
}
@media(max-width:400px){
    body.duel-mobile-game-active .duel-association-row{
        grid-template-columns:minmax(0,.9fr) auto minmax(0,1.1fr);
    }
}


/* =========================================================
   V24.390 — Association Rush : interactions comme les lessons
   ========================================================= */
.duel-association-rush{
    display:grid;
    gap:8px;
    margin-top:7px;
}
.duel-association-rush[hidden]{display:none!important}

.duel-association-rush-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    color:#586e74;
    font-size:.74rem;
    font-weight:900;
}
.duel-association-rush-head>span{color:#0f766e}

.duel-association-help{
    margin:0!important;
    color:#71858a;
    font-size:.7rem!important;
    line-height:1.3!important;
}

.duel-association-columns{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:7px;
    align-items:start;
}
.duel-association-column{
    min-width:0;
    display:grid;
    gap:5px;
    padding:7px;
    border:1px solid #e0e9e8;
    border-radius:13px;
    background:#f8fbfa;
}
.duel-association-column>strong{
    color:#687d83;
    font-size:.62rem;
    text-align:center;
    text-transform:uppercase;
    letter-spacing:.05em;
}
.duel-association-column>div{
    display:grid;
    gap:5px;
}

.duel-association-chip{
    width:100%;
    min-height:38px;
    padding:6px 5px;
    border:1px solid #d8e5e2;
    border-radius:9px;
    background:#fff;
    color:#24434a;
    font:inherit;
    font-size:.72rem;
    font-weight:850;
    line-height:1.15;
    text-align:center;
    overflow-wrap:anywhere;
    cursor:pointer;
    transition:transform .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease;
}
.duel-association-chip:active{transform:scale(.98)}
.duel-association-chip.is-selected{
    border-color:#0f8f82;
    background:#e9f8f5;
    box-shadow:0 0 0 2px rgba(15,143,130,.11);
}
.duel-association-chip.is-correct{
    border-color:#55b89c;
    background:#e7f8f1;
    color:#08705d;
    opacity:.72;
}
.duel-association-chip.is-wrong{
    border-color:#df7184;
    background:#fff0f3;
    color:#a92e48;
    animation:duelAssocShake .22s linear 1;
}
@keyframes duelAssocShake{
    0%,100%{transform:translateX(0)}
    35%{transform:translateX(-3px)}
    70%{transform:translateX(3px)}
}

.duel-association-progress{
    display:grid;
    grid-template-columns:auto minmax(70px,1fr);
    gap:8px;
    align-items:center;
    color:#657a80;
    font-size:.64rem;
    font-weight:850;
}
.duel-association-progress>i{
    display:block;
    height:6px;
    overflow:hidden;
    border-radius:999px;
    background:#dcefeb;
}
.duel-association-progress>i>b{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,#0f766e,#14b8a6);
    transition:width .18s ease;
}

@media(max-width:780px){
    body.duel-mobile-game-active .duel-association-rush{
        gap:5px;
        margin-top:4px;
    }
    body.duel-mobile-game-active .duel-association-rush-head{
        font-size:.62rem;
    }
    body.duel-mobile-game-active .duel-association-help{
        font-size:.59rem!important;
    }
    body.duel-mobile-game-active .duel-association-columns{
        gap:5px;
    }
    body.duel-mobile-game-active .duel-association-column{
        gap:4px;
        padding:5px;
        border-radius:10px;
    }
    body.duel-mobile-game-active .duel-association-column>strong{
        font-size:.54rem;
    }
    body.duel-mobile-game-active .duel-association-column>div{
        gap:4px;
    }
    body.duel-mobile-game-active .duel-association-chip{
        min-height:34px;
        padding:5px 4px;
        border-radius:8px;
        font-size:clamp(.61rem,2.7vw,.71rem);
        line-height:1.08;
    }
    body.duel-mobile-game-active .duel-association-progress{
        font-size:.56rem;
    }
}

@media(max-width:430px), (max-height:700px) and (max-width:780px){
    body.duel-mobile-game-active .duel-association-chip{
        min-height:30px;
        padding:4px 3px;
        font-size:clamp(.56rem,2.5vw,.66rem);
    }
    body.duel-mobile-game-active .duel-association-column{
        padding:4px;
    }
}


/* =========================================================
   V24.392 — Duel lisibilité mobile + rival au premier plan
   ========================================================= */
@media(max-width:780px){
    /* L'adversaire est volontairement la première information de course :
       on voit immédiatement s'il prend de l'avance ou s'il est rattrapé. */
    body.duel-mobile-game-active .duel-mobile-lane-opponent{
        order:-1;
        border:2px solid rgba(249,115,22,.32);
        background:linear-gradient(135deg,#fff4ea,#fff 60%,#fff0f6);
        box-shadow:0 9px 24px rgba(236,72,153,.12);
    }
    body.duel-mobile-game-active .duel-mobile-lane-opponent .duel-mobile-lane-head>strong{
        font-size:clamp(.82rem,3.5vw,.98rem);
        font-weight:950;
    }
    body.duel-mobile-game-active .duel-mobile-lane-opponent .duel-mobile-lane-score{
        font-size:clamp(.76rem,3.2vw,.9rem);
        font-weight:950;
    }
    body.duel-mobile-game-active .duel-mobile-lane-progress-opponent{
        height:10px;
        box-shadow:inset 0 2px 5px rgba(15,23,42,.08),0 0 0 1px rgba(249,115,22,.08);
    }
    body.duel-mobile-game-active .duel-mobile-lane-opponent .duel-mobile-lane-meta{
        display:flex;
        font-size:.66rem;
    }
    .duel-game-shell[data-lead="opponent"] .duel-mobile-lane-opponent{
        box-shadow:0 10px 28px rgba(236,72,153,.2),0 0 0 3px rgba(249,115,22,.08);
    }

    /* Plus de confort de lecture : l'ancienne version comprimait trop la typo
       pour tenter de tout faire tenir sans scroll. Le bloc question peut déjà
       défiler, on privilégie donc la lisibilité. */
    body.duel-mobile-game-active .duel-question-card h2{
        font-size:clamp(1.05rem,4.5vw,1.32rem);
        line-height:1.28;
    }
    body.duel-mobile-game-active .duel-prompt{
        font-size:clamp(1rem,4.15vw,1.24rem);
        line-height:1.42;
        padding:10px 11px;
    }
    body.duel-mobile-game-active .duel-options button,
    body.duel-mobile-game-active .duel-option{
        min-height:48px;
        padding:10px 12px;
        font-size:clamp(.92rem,3.75vw,1.06rem);
        line-height:1.3;
    }
    body.duel-mobile-game-active .duel-word-answer{
        min-height:58px;
        padding:9px;
    }
    body.duel-mobile-game-active .duel-word-bank button,
    body.duel-mobile-game-active .duel-word-tile{
        min-height:42px;
        padding:8px 10px;
        font-size:clamp(.88rem,3.7vw,1.02rem);
    }
    body.duel-mobile-game-active .duel-word-actions .button{
        min-height:42px;
        font-size:.86rem;
    }
}

@media(max-width:430px), (max-height:700px) and (max-width:780px){
    /* Même en faible hauteur, on conserve les infos du rival ; elles sont
       plus utiles en duel que les micro-gains de hauteur obtenus en les cachant. */
    body.duel-mobile-game-active .duel-mobile-lane-opponent .duel-mobile-lane-meta{
        display:flex;
    }
}

.duel-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.duel-mode-solo span{background:linear-gradient(145deg,#fffaf0,#fff)}
@media(max-width:780px){.duel-type-grid{grid-template-columns:1fr}}


/* V24.393 — Duel 3/4 joueurs */
.duel-player-count-field small{display:block;margin-top:.35rem;opacity:.72}.duel-waiting-players{display:flex;flex-wrap:wrap;gap:.55rem;justify-content:center;margin:1rem 0}.duel-waiting-players span{padding:.55rem .8rem;border:1px solid rgba(18,130,123,.18);border-radius:999px;background:rgba(18,130,123,.07);font-weight:800}.duel-multi-board{grid-column:1/-1;padding:1rem 1.1rem}.duel-multi-board-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.8rem}.duel-multi-list{display:grid;gap:.65rem}.duel-multi-row{display:grid;grid-template-columns:2.25rem 1fr auto;align-items:center;gap:.7rem;padding:.75rem;border-radius:16px;background:rgba(13,57,66,.05);border:1px solid rgba(13,57,66,.08)}.duel-multi-row.is-self{box-shadow:0 0 0 2px rgba(16,139,132,.18) inset}.duel-multi-row.is-left{opacity:.5}.duel-multi-rank{font-size:1.2rem;font-weight:900;text-align:center}.duel-multi-player strong,.duel-multi-player small{display:block}.duel-multi-player small{opacity:.72;margin:.15rem 0 .35rem}.duel-multi-player i{display:block;height:8px;border-radius:999px;background:rgba(13,57,66,.09);overflow:hidden}.duel-multi-player i b{display:block;height:100%;border-radius:inherit;background:currentColor}.duel-multi-state{font-weight:900}.duel-final-ranking{width:min(620px,100%);margin:1.2rem auto;display:grid;gap:.55rem}.duel-final-ranking>strong{font-size:1.1rem;text-transform:uppercase;letter-spacing:.08em}.duel-final-row{display:grid;grid-template-columns:2.5rem 1fr auto;align-items:center;gap:.6rem;padding:.75rem .9rem;border-radius:14px;background:rgba(255,255,255,.12)}.duel-final-row small{white-space:nowrap}@media(max-width:720px){.duel-multi-board{padding:.8rem}.duel-multi-row{grid-template-columns:1.9rem 1fr auto;padding:.65rem}.duel-final-row{grid-template-columns:2rem 1fr}.duel-final-row small{grid-column:2;white-space:normal}.duel-player-count-field select{font-size:1rem}}

.duel-history-multi-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.55rem .75rem;border-radius:999px;background:rgba(18,130,123,.08);font-weight:850;margin-top:.45rem}


/* =========================================================
   V24.399 — Duel mobile fullscreen + sortie toujours accessible
   ========================================================= */
@media (max-width:780px){
    body.duel-mobile-game-page{
        width:100%;
        min-height:100svh;
        overflow:hidden !important;
        background:linear-gradient(180deg,#eef7f6 0%,#f8fbfb 100%);
    }

    body.duel-mobile-game-page .site-header,
    body.duel-mobile-game-page .mobile-tabbar,
    body.duel-mobile-game-page .vulpingo-footer{
        display:none !important;
    }

    body.duel-mobile-game-page .site-main,
    body.duel-mobile-game-page main.site-main{
        width:100% !important;
        max-width:none !important;
        min-height:100svh !important;
        margin:0 !important;
        padding:0 !important;
        overflow:hidden !important;
    }

    body.duel-mobile-game-page .duel-game-shell{
        box-sizing:border-box;
        width:100vw !important;
        max-width:100vw !important;
        min-height:100svh !important;
        height:100svh !important;
        margin:0 !important;
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left)) !important;
        display:flex;
        flex-direction:column;
        gap:8px;
        overflow:hidden !important;
    }

    body.duel-mobile-game-page .duel-back-floating{
        position:fixed;
        top:max(8px, env(safe-area-inset-top));
        left:max(8px, env(safe-area-inset-left));
        z-index:220;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-height:42px;
        padding:10px 14px;
        border-radius:999px;
        background:rgba(255,255,255,.96);
        border:1px solid rgba(185,214,209,.95);
        box-shadow:0 12px 28px rgba(15,55,63,.14);
        backdrop-filter:blur(12px);
    }

    body.duel-mobile-game-page .duel-game-top{
        position:relative !important;
        top:auto !important;
        grid-template-columns:1fr auto !important;
        align-items:center;
        gap:10px;
        min-height:64px;
        margin:0 !important;
        padding:12px 12px 12px 14px !important;
        padding-left:62px !important;
        border-radius:18px !important;
    }

    body.duel-mobile-game-page .duel-back-inline{
        display:none !important;
    }

    body.duel-mobile-game-page .duel-game-title{
        text-align:left;
        min-width:0;
        gap:2px;
    }

    body.duel-mobile-game-page .duel-game-course,
    body.duel-mobile-game-page .duel-story-name{
        max-width:100%;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    body.duel-mobile-game-page .duel-game-title strong{
        font-size:.88rem;
        line-height:1.15;
    }

    body.duel-mobile-game-page .duel-timer{
        min-width:68px;
        justify-self:end;
    }

    body.duel-mobile-game-page .duel-timer small{
        font-size:.68rem;
    }

    body.duel-mobile-game-page .duel-timer strong{
        font-size:1.1rem;
        line-height:1;
    }

    body.duel-mobile-game-page .duel-mobile-scoreboard:not([hidden]){
        position:relative !important;
        top:auto !important;
        margin:0 !important;
        display:grid;
        gap:6px;
        flex:0 0 auto;
        z-index:110;
    }

    body.duel-mobile-game-page .duel-battle-status:not([hidden]){
        margin:0 !important;
        flex:0 0 auto;
        padding:8px 12px;
        border-radius:16px;
    }

    body.duel-mobile-game-page .duel-waiting:not([hidden]),
    body.duel-mobile-game-page .duel-result:not([hidden]){
        flex:1 1 auto;
        min-height:0;
        overflow:auto;
        -webkit-overflow-scrolling:touch;
    }

    body.duel-mobile-game-page .duel-arena:not([hidden]){
        flex:1 1 auto;
        min-height:0;
        display:flex !important;
        flex-direction:column;
        gap:8px;
        overflow:hidden;
    }

    body.duel-mobile-game-page .duel-question-card,
    body.duel-mobile-game-page .duel-adventure-scene,
    body.duel-mobile-game-page .duel-multi-board{
        width:100%;
        margin:0 !important;
    }

    body.duel-mobile-game-page .duel-question-card{
        flex:1 1 auto;
        min-height:0;
        overflow:auto;
        -webkit-overflow-scrolling:touch;
        padding:14px 12px 18px !important;
        border-radius:20px !important;
    }

    body.duel-mobile-game-page .duel-adventure-scene:not([hidden]){
        flex:0 0 auto;
        max-height:28svh;
        overflow:auto;
        border-radius:18px !important;
    }

    body.duel-mobile-game-page .duel-text-answer{
        grid-template-columns:minmax(0,1fr) auto !important;
        align-items:stretch;
        gap:8px;
    }

    body.duel-mobile-game-page .duel-text-answer input{
        min-width:0;
        min-height:52px;
        font-size:1rem;
    }

    body.duel-mobile-game-page .duel-text-answer .button{
        min-width:96px;
        min-height:52px;
        padding:10px 14px;
    }
}

@media (max-width:520px){
    body.duel-mobile-game-page .duel-game-shell{
        padding-left:max(6px, env(safe-area-inset-left)) !important;
        padding-right:max(6px, env(safe-area-inset-right)) !important;
        gap:6px;
    }

    body.duel-mobile-game-page .duel-back-floating{
        min-height:38px;
        padding:8px 12px;
        font-size:.84rem;
    }

    body.duel-mobile-game-page .duel-game-top{
        min-height:58px;
        padding:10px 10px 10px 12px !important;
        padding-left:58px !important;
    }

    body.duel-mobile-game-page .duel-game-title strong{
        font-size:.82rem;
    }

    body.duel-mobile-game-page .duel-game-course{
        font-size:.84rem;
    }

    body.duel-mobile-game-page .duel-battle-status:not([hidden]){
        grid-template-columns:1fr;
        gap:3px;
        justify-items:start;
    }

    body.duel-mobile-game-page .duel-question-card h2{
        font-size:clamp(1.05rem, 5vw, 1.34rem);
    }

    body.duel-mobile-game-page .duel-prompt{
        font-size:clamp(.98rem, 4.5vw, 1.1rem);
    }
}

@media (max-width:520px) and (orientation:portrait){
    body.duel-mobile-game-page .duel-text-answer{
        grid-template-columns:minmax(0,1fr);
    }

    body.duel-mobile-game-page .duel-text-answer .button{
        width:100%;
    }
}


/* V24.400 — fix chargement Duel mobile + retrait de la marge gauche */
@media (max-width:780px){
    body.duel-mobile-game-page .duel-game-shell{
        padding-top:max(8px, env(safe-area-inset-top)) !important;
        padding-right:max(0px, env(safe-area-inset-right)) !important;
        padding-bottom:max(10px, env(safe-area-inset-bottom)) !important;
        padding-left:max(0px, env(safe-area-inset-left)) !important;
    }

    body.duel-mobile-game-page .duel-mobile-scoreboard:not([hidden]),
    body.duel-mobile-game-page .duel-game-top,
    body.duel-mobile-game-page .duel-battle-status:not([hidden]),
    body.duel-mobile-game-page .duel-waiting:not([hidden]),
    body.duel-mobile-game-page .duel-arena:not([hidden]),
    body.duel-mobile-game-page .duel-result:not([hidden]){
        width:100% !important;
        margin-left:0 !important;
        margin-right:0 !important;
    }
}


/* =========================================================
   V24.401 — finition fullscreen mobile + typo Association Rush
   ========================================================= */
@media (max-width:780px){
    html{
        overflow-x:hidden !important;
    }

    body.duel-mobile-game-page{
        margin:0 !important;
        padding:0 !important;
        width:100% !important;
        max-width:100% !important;
        overflow-x:hidden !important;
    }

    body.duel-mobile-game-page,
    body.duel-mobile-game-page *,
    body.duel-mobile-game-page *::before,
    body.duel-mobile-game-page *::after{
        box-sizing:border-box;
    }

    body.duel-mobile-game-page .site-main,
    body.duel-mobile-game-page main.site-main{
        position:relative;
        left:0 !important;
        right:0 !important;
        width:100% !important;
        max-width:100% !important;
        margin:0 !important;
        padding:0 !important;
        transform:none !important;
    }

    body.duel-mobile-game-page .duel-game-shell{
        position:relative;
        left:0 !important;
        right:auto !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        padding-left:0 !important;
        padding-right:0 !important;
        overflow-x:hidden !important;
    }

    body.duel-mobile-game-page .duel-mobile-scoreboard:not([hidden]),
    body.duel-mobile-game-page .duel-game-top,
    body.duel-mobile-game-page .duel-battle-status:not([hidden]),
    body.duel-mobile-game-page .duel-waiting:not([hidden]),
    body.duel-mobile-game-page .duel-arena:not([hidden]),
    body.duel-mobile-game-page .duel-result:not([hidden]),
    body.duel-mobile-game-page .duel-question-card,
    body.duel-mobile-game-page .duel-adventure-scene,
    body.duel-mobile-game-page .duel-multi-board{
        min-width:0 !important;
        width:100% !important;
        max-width:100% !important;
        margin-left:0 !important;
        margin-right:0 !important;
    }

    /* Association Rush : même niveau de lisibilité que les autres modes. */
    body.duel-mobile-game-active .duel-association-rush{
        gap:9px;
        margin-top:8px;
    }

    body.duel-mobile-game-active .duel-association-rush-head{
        font-size:clamp(.82rem,3.4vw,.96rem);
        line-height:1.25;
    }

    body.duel-mobile-game-active .duel-association-help{
        font-size:clamp(.82rem,3.35vw,.96rem) !important;
        line-height:1.35;
    }

    body.duel-mobile-game-active .duel-association-columns{
        gap:7px;
    }

    body.duel-mobile-game-active .duel-association-column{
        gap:6px;
        padding:7px;
    }

    body.duel-mobile-game-active .duel-association-column>strong{
        font-size:clamp(.68rem,2.8vw,.78rem);
    }

    body.duel-mobile-game-active .duel-association-column>div{
        gap:6px;
    }

    body.duel-mobile-game-active .duel-association-chip{
        min-height:48px;
        padding:10px 8px;
        font-size:clamp(.92rem,3.75vw,1.06rem);
        line-height:1.3;
        border-radius:11px;
    }

    body.duel-mobile-game-active .duel-association-progress{
        font-size:clamp(.72rem,3vw,.84rem);
    }
}

@media (max-width:430px), (max-height:700px) and (max-width:780px){
    body.duel-mobile-game-active .duel-association-chip{
        min-height:44px;
        padding:8px 6px;
        font-size:clamp(.86rem,3.6vw,1rem);
    }

    body.duel-mobile-game-active .duel-association-column{
        padding:6px;
    }
}

/* V24.343 — Landing publique Duel */
.duel-public{max-width:1180px;margin:0 auto;padding:34px 20px 72px;display:grid;gap:64px}.duel-public-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:42px;align-items:center;padding:38px;border:1px solid var(--border,#e4e7ec);border-radius:28px;background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(255,255,255,.96) 45%,rgba(245,158,11,.08))}.duel-public-kicker{display:inline-flex;align-items:center;gap:8px;font-weight:900;letter-spacing:.08em;font-size:.8rem}.duel-public-hero h1{font-size:clamp(2.5rem,6vw,4.9rem);line-height:.98;margin:14px 0 18px;max-width:780px}.duel-public-hero-copy>p{font-size:1.08rem;line-height:1.75;max-width:700px;color:var(--muted,#667085)}.duel-public-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.duel-public-proof{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:22px;font-size:.92rem;font-weight:750}.duel-public-arena-card{padding:26px;border-radius:24px;background:#15111f;color:#fff;box-shadow:0 24px 60px rgba(29,20,48,.2)}.duel-public-arena-card>strong{display:block;font-size:1.45rem;line-height:1.2;margin:22px 0}.duel-public-live{display:inline-flex;align-items:center;gap:7px;font-size:.75rem;font-weight:900;letter-spacing:.1em}.duel-public-live i{width:8px;height:8px;border-radius:50%;background:#49df91;box-shadow:0 0 0 6px rgba(73,223,145,.14)}.duel-public-mini-match{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:24px 0}.duel-public-mini-match div{display:grid;justify-items:center;gap:4px;text-align:center}.duel-public-mini-match div>span{font-size:2rem}.duel-public-mini-match small{opacity:.68}.duel-public-mini-match em{font-style:normal;font-weight:950;opacity:.65}.duel-public-progress{height:9px;background:rgba(255,255,255,.13);border-radius:999px;overflow:hidden;margin:18px 0 10px}.duel-public-progress span{display:block;width:68%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8b5cf6,#f59e0b)}.duel-public-heading{text-align:center;max-width:760px;margin:0 auto 26px}.duel-public-heading h2{font-size:clamp(1.8rem,4vw,3rem);margin:8px 0 10px}.duel-public-heading p{color:var(--muted,#667085);line-height:1.65}.duel-public-modes,.duel-public-loop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.duel-public-modes article,.duel-public-loop-grid article{padding:24px;border:1px solid var(--border,#e4e7ec);border-radius:20px;background:var(--surface,#fff)}.duel-public-modes article>span,.duel-public-loop-grid article>span{font-size:2rem}.duel-public-modes h3,.duel-public-loop-grid h3{margin:14px 0 8px}.duel-public-modes p,.duel-public-loop-grid p{margin:0;color:var(--muted,#667085);line-height:1.6;font-size:.94rem}.duel-public-loop{padding:38px;border-radius:28px;background:rgba(124,58,237,.055)}.duel-public-loop-grid article{position:relative}.duel-public-loop-grid article>b{position:absolute;top:18px;right:18px;font-size:.78rem;opacity:.35}.duel-public-ranking{display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:center;padding:34px;border:1px solid var(--border,#e4e7ec);border-radius:26px}.duel-public-ranking h2{font-size:clamp(1.7rem,3vw,2.6rem);margin:8px 0 12px}.duel-public-ranking p{color:var(--muted,#667085);line-height:1.7}.duel-public-ranks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.duel-public-ranks span{padding:14px 16px;border-radius:14px;background:rgba(124,58,237,.07);font-weight:800}.duel-public-ranks span:last-child{grid-column:1/-1;text-align:center}.duel-public-final{text-align:center;padding:44px 24px;border-radius:28px;background:#15111f;color:#fff}.duel-public-final>span{font-size:2.6rem}.duel-public-final h2{font-size:clamp(2rem,4vw,3rem);margin:12px 0 10px}.duel-public-final p{opacity:.76}.duel-public-final .duel-public-actions{justify-content:center}.duel-public-final .button.secondary{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.22)}
@media(max-width:900px){.duel-public-hero,.duel-public-ranking{grid-template-columns:1fr}.duel-public-modes,.duel-public-loop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.duel-public{gap:42px}.duel-public-hero{padding:28px}.duel-public-loop{padding:28px}}
@media(max-width:600px){.duel-public{padding:20px 14px 54px;gap:34px}.duel-public-hero,.duel-public-loop,.duel-public-ranking{padding:22px;border-radius:22px}.duel-public-hero h1{font-size:2.55rem}.duel-public-actions{display:grid}.duel-public-actions .button{width:100%;justify-content:center;text-align:center}.duel-public-proof{display:grid;gap:8px}.duel-public-modes,.duel-public-loop-grid,.duel-public-ranks{grid-template-columns:1fr}.duel-public-ranks span:last-child{grid-column:auto}.duel-public-modes article,.duel-public-loop-grid article{padding:20px}}

/* V24.470 — Duel rewards, ranks & badge collection */
.duel-result-rewards{width:min(100%,760px);display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:12px;margin:18px auto 4px;text-align:left}
.duel-result-rewards[hidden]{display:none!important}
.duel-result-xp,.duel-result-tier{border:1px solid #dfe9e7;border-radius:18px;background:rgba(255,255,255,.88);box-shadow:0 10px 28px rgba(15,23,42,.055)}
.duel-result-xp{display:grid;align-content:center;gap:3px;padding:16px 18px}
.duel-result-xp span{color:#72868b;font-size:.7rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}
.duel-result-xp strong{font-size:1.75rem;color:#0f766e;line-height:1.05}
.duel-result-xp small{color:#829298}
.duel-result-tier{display:grid;gap:10px;padding:14px 16px}
.duel-result-tier>div:first-child{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px}
.duel-result-tier>div:first-child>span{font-size:1.5rem}
.duel-result-tier>div:first-child>strong{color:#173a42}
.duel-result-tier>div:first-child>small{color:#60757c;font-weight:850}
.duel-tier-progress{display:grid;gap:5px}
.duel-tier-progress i{display:block;overflow:hidden;height:8px;border-radius:999px;background:#e5eeec}
.duel-tier-progress i b{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0f766e,#2dd4bf);transition:width .45s ease}
.duel-tier-progress small{color:#71858b;font-size:.72rem}
.duel-result-performance{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.duel-result-performance[hidden]{display:none!important}
.duel-result-performance span{padding:7px 10px;border:1px solid #dce8e5;border-radius:999px;background:#f7fbfa;color:#315f63;font-size:.76rem;font-weight:900}
.duel-result-badges-link{grid-column:1/-1;justify-self:center;color:#0f766e;font-size:.8rem;font-weight:950;text-decoration:none}
.duel-result-badges-link:hover{text-decoration:underline}
.duel-profile-tier{display:grid;gap:6px;width:100%;margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.16)}
.duel-profile-tier b{font-size:.82rem;color:#fff}
.duel-profile-tier i{display:block;overflow:hidden;height:7px;border-radius:999px;background:rgba(255,255,255,.14)}
.duel-profile-tier i span{display:block;height:100%;border-radius:inherit;background:#fff}
.duel-profile-tier em{color:#ccefe9;font-size:.68rem;font-style:normal;font-weight:800}
.duel-next-title{display:grid;gap:7px;padding:18px;border:1px solid #dfe9e6;border-radius:18px;background:linear-gradient(145deg,#f5fbf9,#fff)}
.duel-next-title>span{color:#70858a;font-size:.68rem;font-weight:950;letter-spacing:.1em;text-transform:uppercase}
.duel-next-title>strong{font-size:1.35rem;color:#173a42}
.duel-next-title>div{display:flex;flex-wrap:wrap;gap:7px}
.duel-next-title small{padding:6px 9px;border-radius:999px;background:#fff;border:1px solid #dfe9e6;color:#557077;font-weight:850}
.duel-next-title.is-complete{background:linear-gradient(145deg,#fff9e8,#fff)}
.duel-profile-cta-row{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}
.duel-badges-panel{width:100%;margin-top:16px}
.duel-badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}
.duel-badge{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:13px;border:1px solid #e1e9ec;border-radius:16px;background:#fff}
.duel-badge>span{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#f4faf8;font-size:1.35rem}
.duel-badge>div{display:grid;gap:2px}
.duel-badge strong{color:#27454c;font-size:.88rem}
.duel-badge small{color:#788b91;font-size:.72rem;line-height:1.35}
.duel-badge>b{color:#0f8a68}
.duel-badge.is-locked{opacity:.56;filter:saturate(.55)}
.duel-badge.is-locked>span{background:#f3f5f6}
.duel-badge.is-locked>b{color:#86959b}
.duel-tier-mini{font-size:1rem;vertical-align:middle}
.duel-history-battle-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.duel-history-xp strong{color:#0f8a68}
@media(max-width:760px){
  .duel-result-rewards{grid-template-columns:1fr}
  .duel-result-performance,.duel-result-badges-link{grid-column:1}
  .duel-badge-grid{grid-template-columns:1fr}
  .duel-history-battle-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:480px){
  .duel-result-tier>div:first-child{grid-template-columns:auto 1fr}
  .duel-result-tier>div:first-child>small{grid-column:2}
  .duel-profile-cta-row .button{width:100%}
}
