/* ============================================================
 * Tahadi Al Horouf — theme-harmony.css (v1.18.3)
 * Chargé EN DERNIER sur toutes les pages (après readability.css).
 *
 * But : une seule palette cohérente avec le ciel bleu du site.
 * Avant, chaque jeu avait son propre en-tête (marine/violet, sarcelle/or,
 * sarcelle→indigo, vert foncé) et ses propres boutons (bleu, marron,
 * violet, rouge vif) : l'ensemble paraissait agressif et incohérent.
 *
 * Palette (contraste texte vérifié ≥ 4,5:1) :
 *   encre    #1c3d5a   bleu      #2563eb / #1d4ed8   bleu nuit #1e3a8a
 *   sarcelle #0f766e   soleil    #fbbf24 (texte encre)
 *   vert     #15803d   rouge doux #b91c1c sur #fef2f2
 * ============================================================ */
:root{
  --th-ink:#1c3d5a;
  --th-blue:#2563eb; --th-blue-dark:#1d4ed8; --th-navy:#1e3a8a;
  --th-teal:#0f766e; --th-teal-dark:#115e59;
  --th-sun:#fbbf24;  --th-sun-dark:#f59e0b;
  --th-green:#15803d;
  --th-red:#b91c1c;  --th-red-soft:#fef2f2; --th-red-line:#fecaca;
  --th-hero:linear-gradient(135deg,#1e3a8a 0%,#1d4ed8 58%,#2563eb 100%);
  --th-hero-sub:#e6efff;
}

/* ---------- 1. En-têtes de pages et de jeux : un seul dégradé bleu ---------- */
html body :is(.home-page .hero,.rooms-hero,.gp-hero,.tm-head,.ig-hero,.ug-hero,.rk-hero,.lr-hero,.lres-hero,.games-center-hero),
html body .gp-skin :is(.pv-hero,.pt-hero,.pq-hero,.ws-hero,.ig-hero,.ug-hero){
  background:var(--th-hero)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 14px 34px rgba(30,58,138,.25)!important;
}
html body :is(.gp-hero,.tm-head,.home-page .hero,.rooms-hero)::before,
html body :is(.gp-hero,.tm-head,.home-page .hero,.rooms-hero)::after{opacity:.45}
html body :is(.home-page .hero,.rooms-hero,.gp-hero,.tm-head,.ig-hero,.ug-hero,.rk-hero,.lr-hero,.lres-hero) :is(h1,h2,.tm-title),
html body .gp-skin :is(.pv-hero,.pt-hero,.pq-hero,.ws-hero,.ig-hero,.ug-hero) h1{
  color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important;
}
html body :is(.gp-hero,.tm-head,.ig-hero,.ug-hero,.rk-hero,.lr-hero) :is(p,.tm-subtitle),
html body .gp-skin :is(.pv-hero,.pt-hero,.pq-hero,.ws-hero,.ig-hero,.ug-hero) p{color:var(--th-hero-sub)!important}
html body .tm-chooser .tm-kicker{color:#cfe0ff!important}
html body :is(.gp-hero-icon,.tm-mark),
html body .gp-skin :is(.pv-hero,.pt-hero,.pq-hero,.ws-hero,.ig-hero,.ug-hero) .ic{background:rgba(255,255,255,.16)!important;border:1px solid rgba(255,255,255,.28)!important}
html body .gp-chip-link{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.32)!important}
html body .gp-chip-link:hover{background:rgba(255,255,255,.26)!important}

/* ---------- 2. Écran de choix du mode : 3 couleurs sœurs ---------- */
html body .tm-options,html body .tm-before,html body .tm-extra{background:#f5f9ff!important}
html body .tm-card{border:1px solid #dbe6f5!important;box-shadow:0 6px 18px rgba(28,61,90,.08)!important}
html body .tm-card:hover{border-color:#9cc0f5!important;box-shadow:0 12px 28px rgba(28,61,90,.14)!important}
html body .tm-card:active{box-shadow:0 4px 10px rgba(28,61,90,.12)!important}
html body .tm-card.solo .tm-icon{background:#e0edff!important}
html body .tm-card.daily .tm-icon{background:#fff4d6!important}
html body .tm-card.multi .tm-icon{background:#d9f4ef!important}
html body .tm-card.tool .tm-icon{background:#dcfce7!important}
html body .tm-action{border:0!important;box-shadow:0 6px 14px rgba(28,61,90,.14)!important}
html body .tm-card.solo  .tm-action{background:var(--th-blue)!important;color:#fff!important}
html body .tm-card.solo:hover .tm-action{background:var(--th-blue-dark)!important}
html body .tm-card.daily .tm-action{background:var(--th-sun)!important;color:var(--th-ink)!important}
html body .tm-card.daily:hover .tm-action{background:var(--th-sun-dark)!important}
html body .tm-card.multi .tm-action{background:var(--th-teal)!important;color:#fff!important}
html body .tm-card.multi:hover .tm-action{background:var(--th-teal-dark)!important}
html body .tm-card.tool  .tm-action{background:var(--th-green)!important;color:#fff!important}
html body .tm-mini{border:1px solid #cfdcee!important;box-shadow:0 3px 8px rgba(28,61,90,.08)!important;color:var(--th-ink)!important}
html body .tm-dot{color:var(--th-green)!important}

/* ---------- 3. Accueil : cartes des jeux mises en avant ---------- */
html body .home-page .home-featured-card::before{background:linear-gradient(135deg,#0f766e,#14b8a6)!important}
html body .home-page .home-featured-order::before{background:linear-gradient(135deg,#1d4ed8,#60a5fa)!important}
html body .home-page .home-featured-crossword::before{background:linear-gradient(135deg,#0369a1,#38bdf8)!important}
html body .home-page .home-featured-poetry::before{background:linear-gradient(135deg,#d97706,#fbbf24)!important}
html body .home-page .home-new-badge{background:var(--th-sun)!important;color:var(--th-ink)!important}
html body .home-page .hero-player-form .btn-primary,
html body .home-page .hero-actions .btn-primary{background:var(--th-sun)!important;color:var(--th-ink)!important;box-shadow:0 6px 16px rgba(245,158,11,.35)!important}

/* ---------- 4. Barre de navigation ---------- */
html body .nav-item.nav-install{background:#fff7dd!important;color:#7a4b00!important;border:1px solid #f6d68a!important;box-shadow:none!important}
html body .nav-item.nav-install:hover{background:#ffefc2!important}

/* ---------- 5. Boutons secondaires et « quitter » : plus de rouge vif ---------- */
html body :is(.leave-group-btn,.nav-leave,.exit-game-btn,.gp-exit,.btn-leave,#leave-room,.leave-room-btn,[data-leave-group]){
  background:var(--th-red-soft)!important;color:var(--th-red)!important;border:1px solid var(--th-red-line)!important;box-shadow:none!important;
}
html body :is(.leave-group-btn,.nav-leave,.exit-game-btn,.gp-exit,.btn-leave,#leave-room,.leave-room-btn,[data-leave-group]):hover{background:#fee2e2!important}

/* ---------- 6. Pied de page : bleu nuit au lieu du noir ---------- */
html body .main-footer{background:linear-gradient(180deg,#1c3d5a 0%,#132c44 100%)!important;color:#e6efff!important}
html body .main-footer a{color:#dbeafe!important}
html body .main-footer a:hover{color:#fff!important}

/* ---------- 7. Divers ---------- */
html body .gp-stars .off{color:#94a3b8!important}
html body .gp-step-glyph{box-shadow:inset 0 -3px 0 rgba(0,0,0,.12)}
/* Les petits boutons-pastilles ne doivent pas hériter de la hauteur
   minimale de 50 px imposée à tous les boutons par professional.css. */
html body :is(.gp-chip-link,.tm-mini,.copy-btn,.chip,.cw-chip,[class*="rounded-full"]){min-height:0!important}

/* ---------- 8. Boutons des jeux : même bouton principal partout ---------- */
html body :is(.ig-btn,.pq-btn,.pt-btn,.pv-btn,.ug-btn,.ws-btn):not(.alt):not(.red):not(.warn):not(.ghost){
  background:var(--th-blue)!important;color:#fff!important;border:0!important;box-shadow:0 6px 14px rgba(37,99,235,.25)!important;
}
html body :is(.ig-btn,.pq-btn,.pt-btn,.pv-btn,.ug-btn,.ws-btn):not(.alt):not(.red):not(.warn):not(.ghost):hover{background:var(--th-blue-dark)!important}
html body :is(.ig-btn,.pq-btn,.pt-btn,.pv-btn,.ug-btn,.ws-btn).alt{background:#fff!important;color:var(--th-ink)!important;border:1px solid #cfdcee!important}
html body :is(.ig-btn,.pq-btn,.pt-btn,.pv-btn,.ug-btn,.ws-btn).warn{background:var(--th-sun)!important;color:var(--th-ink)!important}
html body :is(.ig-btn,.pq-btn,.pt-btn,.pv-btn,.ug-btn,.ws-btn).red,
html body .cw-global-exit,
html body .tournament-btn.danger{background:var(--th-red-soft)!important;color:var(--th-red)!important;border:1px solid var(--th-red-line)!important;box-shadow:0 4px 12px rgba(185,28,28,.12)!important}
html body .nav-leave-group{background:var(--th-red-soft)!important;color:var(--th-red)!important;border:1px solid var(--th-red-line)!important}

/* ---------- 9. Bannière d'accueil de /rooms (sélecteur très spécifique) ---------- */
html body.rooms-page .rooms-shell > header.rooms-home-banner-exact,
html body .rooms-page .rooms-shell > header.rooms-home-banner-exact{
  background:var(--th-hero)!important;box-shadow:0 16px 36px rgba(30,58,138,.22)!important;
}

/* ---------- 10. Mots croisés : écran de choix du mode ---------- */
html body .cw-mode-head{background:var(--th-hero)!important}
html body .cw-mode-head:before,html body .cw-mode-head:after{opacity:.45}
html body .cw-mode-kicker{color:#cfe0ff!important}
html body .cw-mode-subtitle{color:var(--th-hero-sub)!important}
html body .cw-mode-options{background:#f5f9ff!important}
html body .cw-mode-choice{border-color:#dbe6f5!important}
html body .cw-mode-choice.solo .cw-mode-icon{background:#e0edff!important}
html body .cw-mode-choice.multi .cw-mode-icon{background:#d9f4ef!important}
html body .cw-mode-choice.daily .cw-mode-icon{background:#fff4d6!important}
html body .cw-mode-choice.solo .cw-mode-action{background:var(--th-blue)!important;color:#fff!important}
html body .cw-mode-choice.solo:hover .cw-mode-action{background:var(--th-blue-dark)!important}
html body .cw-mode-choice.multi .cw-mode-action{background:var(--th-teal)!important;color:#fff!important}
html body .cw-mode-choice.multi:hover .cw-mode-action{background:var(--th-teal-dark)!important}
html body .cw-mode-choice.daily .cw-mode-action{background:var(--th-sun)!important;color:var(--th-ink)!important}
html body .cw-mode-choice.daily:hover .cw-mode-action{background:var(--th-sun-dark)!important}
html body .cw-mode-choice.multi:hover{border-color:#99e0d4!important}
html body .cw-mode-dot{color:var(--th-green)!important}

/* ---------- 11. Pages Tailwind (mots croisés, ordre des mots) ----------
 * Les teintes violettes/indigo de Tailwind sont redirigées vers la gamme bleue
 * du site (les variables non « layer » l'emportent sur @layer theme). */
:root{
  --color-violet-50:#eff6ff;--color-violet-100:#dbeafe;--color-violet-200:#bfdbfe;--color-violet-300:#93c5fd;
  --color-violet-400:#60a5fa;--color-violet-500:#3b82f6;--color-violet-600:#2563eb;--color-violet-700:#1d4ed8;
  --color-violet-800:#1e40af;--color-violet-900:#1e3a8a;--color-violet-950:#172554;
  --color-indigo-200:#bfdbfe;--color-indigo-500:#3b82f6;--color-indigo-600:#2563eb;--color-indigo-700:#1d4ed8;--color-indigo-950:#172554;
  --color-purple-600:#2563eb;--color-purple-700:#1d4ed8;
}

/* ---------- 12. /rooms : bouton « تغيير الاسم » dans la bannière ----------
 * rooms.css ajoutait un pseudo-élément dégradé (orange→rose→bleu) PAR-DESSUS
 * le bouton blanc de rooms-match-games-v17.css : texte bleu illisible. */
html body .rooms-home-banner-exact .rooms-home-change-summary::after{content:none!important;display:none!important}
html body .rooms-home-banner-exact .rooms-home-change-summary{background:#fff!important;color:var(--th-blue-dark)!important;border:1px solid #cfe0ff!important;box-shadow:0 6px 16px rgba(15,35,80,.18)!important;text-shadow:none!important}
html body .rooms-home-banner-exact .rooms-home-change-summary:hover{background:#eef4ff!important}

/* ---------- 13. Boutons noirs (#0f172a) des salles « lettres » ---------- */
html body .lr-btn{background:var(--th-blue)!important;color:#fff!important;border:0!important}
html body .lr-btn:hover{background:var(--th-blue-dark)!important}
html body .lr-btn.secondary{background:#fff!important;color:var(--th-ink)!important;border:1px solid #cfdcee!important}
