/*
 * DartClub — refonte du côté joueur, lot 14 : la version ORDINATEUR de consultation (au-dessus de 768 px de large).
 *
 * Feuille liée par includes/dc_ordi.php (réglage ordi_v2_on allumé seulement) avec l'attribut media="(min-width: 769px)" :
 * sur téléphone elle ne s'applique jamais. De plus, CHAQUE règle est dans un bloc @media dont la largeur minimale est d'au moins
 * 769 px (contrôle : tests/test-refonte-lot14a-ordi.php) : à 768 px et moins, rien ne change, réglage allumé ou non.
 *
 * Ce qui quitte l'ordinateur est MASQUÉ, jamais retiré du HTML (le téléphone d'aujourd'hui et les scripts s'en servent) :
 * bande du haut, en-tête à logo et à menu, cloche et loupe flottantes, gros bouton « Scanner la cible » de l'accueil.
 * La cloche et le lien de la discussion sont DÉPLACÉS par le script dans la ligne 1 : ils y sont mis en forme ici (les règles
 * « !important » à identifiant du gabarit sont battues par une force plus grande, jamais retirées).
 * Aucun état par la seule couleur : entrée ouverte = gras + trait épais (et aria-current dans le HTML), signes écrits.
 * Le direct (14d) : élargi et tableau en colonnes, par le style seulement ; zone vidéo #dc-direct-video prévue au-dessus du tableau
 * (le lot 12 la pose vide et cachée, navigation du téléphone allumée ; le lot « En direct » y rangera la vidéo) : ces règles ne la
 * montrent jamais vide ni cachée.
 */

@media (min-width: 769px) {
  /* ---------- 1. ce qui quitte l'ordinateur : masqué (jamais retiré) ---------- */
  body .topbar-strip, body header.public-header, body .cible-scanner-accueil { display: none !important }
  html body #global-search-btn { display: none !important }
  html body #notif-bell-wrap { display: none !important }

  /* ---------- 2. l'en-tête : socle (complet même sur une page qui ne charge pas public.css, comme Mon match) ---------- */
  body .dc-oh { display: block; position: relative; z-index: 8990; background: var(--bg-card, #1e1914); border-bottom: 1px solid var(--dc-trait, rgba(212,168,67,0.15));
    color: var(--dc-texte, #f0e6d6); font-family: var(--dc-police-texte, 'Inter', 'Segoe UI', sans-serif); font-size: 15px; line-height: 1.3; text-align: left }
  .dc-oh *, .dc-oh *::before, .dc-oh *::after { box-sizing: border-box }
  .dc-oh a { color: inherit; text-decoration: none }
  .dc-oh ul { list-style: none; margin: 0; padding: 0 }
  .dc-oh li { margin: 0; padding: 0 }
  .dc-oh p { margin: 0 }
  .dc-oh summary { list-style: none; cursor: pointer }
  .dc-oh summary::-webkit-details-marker { display: none }
  .dc-oh summary::marker { content: '' }
  .dc-oh .dc-ic { flex: none }
  .dc-oh a:focus-visible, .dc-oh button:focus-visible, .dc-oh summary:focus-visible,
  #dc-oh-alertes #notif-bell:focus-visible, #dc-oh-discussion #nav-chat-link:focus-visible {
    outline: 3px solid var(--dc-or, #D4A843) !important; outline-offset: 2px; box-shadow: 0 0 0 2px var(--dc-encre, #1a1410) }

  /* ligne 1 : logo + nom du club, puis les outils, à droite */
  .dc-oh-l1 { display: flex; align-items: center; gap: 12px; max-width: 1440px; min-height: 56px; margin: 0 auto; padding: 8px 24px }
  .dc-oh-logo { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: 44px; color: var(--dc-or, #D4A843);
    font-family: var(--dc-police-titre, Georgia, serif); font-size: 18px; letter-spacing: .02em; border-radius: 8px }
  .dc-oh-logo picture { line-height: 0; flex: none }
  .dc-oh-logo img { width: 40px; height: 40px; object-fit: contain; display: block; flex: none }
  .dc-oh-club { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .dc-oh-outils { display: flex; align-items: center; gap: 4px; flex: none; position: relative }
  .dc-oh-b { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px;
    background: none; color: var(--dc-texte, #f0e6d6); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer }
  .dc-oh-b:hover, .dc-oh-e:hover, #dc-oh-alertes #notif-bell:hover, #dc-oh-discussion #nav-chat-link:hover { background: rgba(212,168,67,0.08) !important }
  .dc-oh-b[aria-current="page"], .dc-oh-b.dc-oh-actif { font-weight: 700; box-shadow: inset 0 -3px 0 var(--dc-or, #D4A843) }
  .dc-oh-contour { border-color: var(--dc-or, #D4A843) }
  .dc-oh-plein { background: var(--dc-or, #D4A843); border-color: var(--dc-or, #D4A843); color: var(--dc-encre, #1a1410); font-weight: 700 }
  .dc-oh-plein:hover { background: #e2b955 !important }
  .dc-oh-kbd { font: 12px/1 ui-monospace, Consolas, monospace; padding: 3px 5px; border: 1px solid var(--dc-trait-or, rgba(212,168,67,0.3)); border-radius: 4px;
    color: var(--dc-texte-doux, #a89880) }
  .dc-oh-court { display: none }
  .dc-oh-place { display: inline-flex; align-items: center }
  .dc-oh-place:empty { display: none }

  /* Chercher, visiteur : le petit panneau */
  .dc-oh-panneau { position: absolute; top: calc(100% + 8px); right: 0; z-index: 10; width: 320px; padding: 14px; border: 1px solid var(--dc-trait-or, rgba(212,168,67,0.3));
    border-radius: 12px; background: var(--dc-carte, #1f1a14); box-shadow: 0 8px 24px rgba(0,0,0,0.5); font-size: 15px; line-height: 1.4; white-space: normal }
  .dc-oh-panneau[hidden] { display: none }
  .dc-oh-panneau p { margin: 0 0 12px }
  .dc-oh-panneau-actions { display: flex; gap: 8px }
  .dc-oh-panneau-actions a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; text-align: center;
    border: 2px solid var(--dc-or, #D4A843); border-radius: 10px; font-weight: 700 }

  /* l'avatar, le pseudo, l'habillage VIP (montré seulement si la bande du haut d'aujourd'hui, masquée, le porte), le rang écrit */
  .dc-oh-av { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none }
  .dc-oh-av > img, .dc-oh-av > div { width: 30px !important; height: 30px !important; font-size: 12px !important }
  .dc-oh-pseudo { max-width: 10em; overflow: hidden; text-overflow: ellipsis }
  .dc-oh-vip { display: none; align-items: center; padding: 1px 6px; border-radius: 3px; background: var(--dc-or, #D4A843); color: var(--dc-encre, #1a1410);
    font-size: 11px; font-weight: 900; letter-spacing: .08em; line-height: 1.4 }
  body:has(#topbar-user-btn .vip-gold-card) .dc-oh-vip { display: inline-flex }
  .dc-oh-rang { color: var(--dc-texte-doux, #a89880); font-size: 13px }
  .dc-oh-fl { font-size: 11px; opacity: .8 }
  .dc-oh-drapeau { display: inline-flex; line-height: 0 }
  .dc-oh-moi-tete { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid var(--dc-trait, rgba(212,168,67,0.15)) }
  .dc-oh-moi-qui { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--dc-texte-doux, #a89880); white-space: normal }
  .dc-oh-moi-nom { color: var(--dc-texte, #f0e6d6); font-size: 15px; font-weight: 700 }
  .dc-oh-moi-menu { min-width: 260px }
  .dc-oh-sep { border-top: 1px solid var(--dc-trait, rgba(212,168,67,0.15)); margin-top: 4px !important; padding-top: 4px !important }
  .dc-oh-code { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--dc-texte-doux, #a89880) }

  /* ligne 2 : la navigation */
  .dc-oh-nav { border-top: 1px solid var(--dc-trait, rgba(212,168,67,0.15)) }
  .dc-oh-l2 { display: flex; align-items: center; gap: 2px; max-width: 1440px; min-height: 48px; margin: 0 auto !important; padding: 0 24px !important }
  .dc-oh-li { position: relative; flex: none }
  .dc-oh-dd { position: relative }
  .dc-oh-e { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 6px; background: none;
    color: var(--dc-texte, #f0e6d6); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer }
  .dc-oh-e[aria-current="page"], .dc-oh-e.dc-oh-actif { font-weight: 700; box-shadow: inset 0 -4px 0 var(--dc-or, #D4A843) }
  .dc-oh-droite { display: flex; align-items: center; gap: 8px; margin-left: auto }
  .dc-oh-scanner { border-color: var(--dc-trait-or, rgba(212,168,67,0.3)) }
  .dc-oh-plus { display: none }

  /* sous-menus : au clic (jamais au seul survol), un seul ouvert, fermés par Échap et un clic ailleurs (script) */
  .dc-oh-sm { position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; display: flex; flex-direction: column; min-width: 230px; padding: 6px 0 !important;
    border: 1px solid var(--dc-trait-or, rgba(212,168,67,0.3)); border-radius: 10px; background: var(--dc-carte, #1f1a14); box-shadow: 0 8px 24px rgba(0,0,0,0.5) }
  .dc-oh-dd:not([open]) > .dc-oh-sm { display: none }
  .dc-oh-sm--droite { left: auto; right: 0 }
  .dc-oh-sm ul { display: flex; flex-direction: column }
  .dc-oh-sm a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; color: var(--dc-texte, #f0e6d6); font-size: 15px; white-space: nowrap }
  .dc-oh-sm a:hover { background: rgba(212,168,67,0.1) }
  .dc-oh-sm a[aria-current="page"], .dc-oh-sm a[aria-current="true"] { font-weight: 700; box-shadow: inset 4px 0 0 var(--dc-or, #D4A843) }
  .dc-oh-sm-titre { padding: 8px 16px 2px !important; margin-top: 4px !important; border-top: 1px solid var(--dc-trait, rgba(212,168,67,0.15));
    color: var(--dc-texte-doux, #a89880); font-size: 12px; text-transform: uppercase; letter-spacing: .08em }

  /* l'état du soir, rangé depuis le dépôt par le script : « Mon match », « en cours », la pastille « 1 » des matchs classés */
  .dc-oh-monmatch { font-weight: 800 }
  .dc-oh-urgent { background: #e53935; border-color: #e53935; color: #fff !important }
  .dc-oh-urgent:hover { background: #c62828 !important }
  .dc-oh-bientot { border: 2px solid var(--dc-or, #D4A843) }
  .dc-oh-signe-m { font-weight: 900 }
  .dc-oh-encours { font-weight: 600; color: var(--dc-or, #D4A843) }
  #dc-oh-encours-tournois { display: none }
  .dc-oh-signe > span:first-child { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px;
    border-radius: 10px; background: var(--dc-texte, #f0e6d6); color: var(--dc-encre, #1a1410); font-size: 12px; font-weight: 800 }
  body:has(#dc-oh-depot[data-silence]) .dc-oh-inviter { display: none }

  /* ---------- 3. la cloche et le lien de la discussion d'aujourd'hui, DÉPLACÉS dans la ligne 1 par le script ---------- */
  #dc-oh-alertes #notif-bell-wrap { display: block !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; z-index: auto !important }
  #dc-oh-alertes #notif-bell { width: auto !important; height: auto !important; min-height: 40px !important; padding: 0 10px !important; gap: 6px; border: 1px solid transparent !important;
    border-radius: 8px !important; background: none !important; box-shadow: none !important; color: var(--dc-texte, #f0e6d6) !important; font-size: 16px !important; font-family: inherit !important }
  #dc-oh-alertes #notif-bell .dc-oh-mot { display: inline; font-size: 14px }
  #dc-oh-alertes #notif-bell .dc-cl { display: none !important }
  #dc-oh-alertes #notif-bell-badge { position: static !important; min-width: 20px !important; height: 20px !important; padding: 0 5px !important; border-radius: 10px !important;
    font-size: 12px !important; line-height: 20px !important }
  /* le panneau : sous le bouton, aligné à DROITE (le bouton est à droite de l'écran ; le calcul du script ne vaut que sous 640 px) */
  #dc-oh-alertes #notif-panel { position: absolute !important; top: calc(100% + 6px) !important; left: auto !important; right: 0 !important; width: 320px !important;
    max-width: calc(100vw - 32px) !important; max-height: calc(100vh - 140px); overflow-y: auto; box-sizing: border-box; text-align: left }
  #dc-oh-discussion #nav-chat-link { display: inline-flex !important; align-items: center; gap: 6px !important; min-height: 40px; padding: 0 10px !important; border: 1px solid transparent;
    border-radius: 8px; background: none; color: var(--dc-texte, #f0e6d6) !important; font-size: 0 !important; line-height: 1.3; white-space: nowrap; text-decoration: none }
  #dc-oh-discussion #nav-chat-link svg { width: 18px; height: 18px }
  #dc-oh-discussion #nav-chat-link .dc-oh-mot { display: inline; font-size: 14px }
  #dc-oh-discussion #nav-chat-link.active, #dc-oh-discussion #nav-chat-link[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--dc-or, #D4A843) }
  #dc-oh-discussion #chat-notif-badge { position: static !important; min-width: 20px !important; height: 20px !important; padding: 0 5px !important; border-radius: 10px !important;
    font-size: 12px !important; line-height: 20px !important; animation: none !important }

  /* ---------- 4. le bandeau des cookies : deux boutons de même forme, même taille, même contraste ; « Refuser » le premier (script inchangé) ---------- */
  #cookie-banner #cookie-refuse, #cookie-banner #cookie-accept { min-width: 150px !important; padding: 10px 24px !important; border: 2px solid var(--dc-or, #D4A843) !important;
    border-radius: 8px !important; background: transparent !important; color: var(--dc-texte, #f0e6d6) !important; font-size: 14px !important; font-weight: 700 !important }

  /* ---------- 5. « Le club en chiffres » (accueil seulement : la pièce n'est écrite que là) ---------- */
  body .dc-oh-chiffres { display: block; border-bottom: 1px solid var(--dc-trait, rgba(212,168,67,0.15)); background: rgba(42,34,24,0.6); color: var(--dc-texte-doux, #a89880);
    font-family: var(--dc-police-texte, 'Inter', 'Segoe UI', sans-serif) }
  .dc-oh-chiffres-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; max-width: 1440px; margin: 0 auto; padding: 10px 24px; font-size: 14px }
  .dc-oh-chiffres-t { color: var(--dc-or, #D4A843); font-family: var(--dc-police-titre, Georgia, serif); font-size: 15px }
  .dc-oh-chiffres b { color: var(--dc-texte, #f0e6d6) }
  .dc-oh-point { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #4caf50; vertical-align: middle }
  .dc-oh-slogan { margin-left: auto; font-style: italic }
}

/* ---------- 6. le repli, par paliers ----------
   Largeurs MESURÉES avec les polices du site (lot-14/travail/outils/mesurer-ordi.py, sortie lot-14/travail/mesures.txt) : pseudo de
   20 caractères, rang « Grand Maitre », VIP, pastilles « 9+ » et « 99+ », « ! Mon match » et « · en cours », liaison des cibles, en
   français, anglais et allemand ; à la largeur la plus étroite de chaque palier, il reste au moins 42 px. La mesure a avancé deux paliers
   du plan (« le palier suivant s'applique plus tôt ») : « Ctrl K », le pseudo et « Inviter » court dès 1 439 px, le nom du club dès
   1 199 px pour un joueur connecté, et un cinquième palier sous 900 px. */
/* B, de 769 à 1 439 px : (1) « Ctrl K » masqué ; (2) pseudo masqué (l'avatar porte le nom lu, le rang reste écrit) ; (3) « Inviter un pote » → « Inviter » */
@media (min-width: 769px) and (max-width: 1439px) {
  .dc-oh-kbd, .dc-oh-pseudo, .dc-oh-long { display: none }
  .dc-oh-court { display: inline }
}
/* C, de 769 à 1 199 px : (4) Matchs classés et Aide dans « Plus ▾ » ; nom du club masqué pour un joueur connecté (le logo porte le nom lu) */
@media (min-width: 769px) and (max-width: 1199px) {
  .dc-oh-p4, .dc-oh--co .dc-oh-club { display: none }
  .dc-oh-plus { display: block }
  .dc-oh-e { padding: 0 10px }
}
/* D, de 769 à 1 023 px : (5) « En direct » rangé dans Tournois ▾ (en premier), « en cours » écrit sur Tournois ; (6) nom du club masqué
   pour tous ; (7) « Inviter » dans le menu de l'avatar (« Mon parrainage » y est déjà) */
@media (min-width: 769px) and (max-width: 1023px) {
  .dc-oh-direct, .dc-oh-club, .dc-oh-inviter { display: none }
  #dc-oh-encours-tournois { display: inline }
  .dc-oh-e.dc-oh-actif-etroit { font-weight: 700; box-shadow: inset 0 -4px 0 var(--dc-or, #D4A843) }
  .dc-oh-sm-direct { order: -1 }
  .dc-oh-l1, .dc-oh-l2, .dc-oh-chiffres-in { padding-left: 16px !important; padding-right: 16px !important }
  .dc-oh-e { padding: 0 9px; font-size: 14px }
}
/* E, de 769 à 899 px : (8) Discussion, Alertes et Scanner sans leur mot (icône et pastille ; leur nom lu reste « Discussion », « Alertes »,
   « Scanner ») */
@media (min-width: 769px) and (max-width: 899px) {
  #dc-oh-alertes #notif-bell .dc-oh-mot, #dc-oh-discussion #nav-chat-link .dc-oh-mot, .dc-oh-scanner > span { display: none }
}
/* écran tactile large (tablette, téléphone à l'horizontale) : cibles de 48 px */
@media (min-width: 769px) and (pointer: coarse) {
  .dc-oh-b, .dc-oh-sm a, #dc-oh-alertes #notif-bell, #dc-oh-discussion #nav-chat-link { min-height: 48px !important }
}

/* ---------- 7. le direct (14d), page public/live.php seulement (ses classes n'existent que là) : élargi, tours du tableau côte à côte ---------- */
@media (min-width: 1100px) {
  body .live-container { max-width: 1100px }
  body .live-container .live-nav, body .live-container #tab-now, body .live-container #tab-classement { max-width: 760px; margin-left: auto; margin-right: auto }
  body #tab-bracket .live-bracket-section { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px }
  body #tab-bracket .live-bracket-label { flex: 0 0 100% }
  body #tab-bracket details.live-round { flex: 1 1 0; min-width: 190px }
  /* zone vidéo PRÉVUE au-dessus du tableau (posée vide et cachée par le lot 12 ; remplie plus tard par le lot « En direct ») : vide, elle ne prend aucune place */
  body #dc-direct-video { display: block; max-width: 640px; margin: 0 auto 16px; aspect-ratio: 16 / 9 }
  body #dc-direct-video:empty { display: none }
}

/* Recette du 25/11/2026 (banc du rig, point 4) : sur la page du match, « qui a saisi / qui est attendu » ne se lisait qu'à la
   couleur d'un point (vert ou gris) ; le gérant est daltonien. Un signe est écrit devant chaque nom : coche = a saisi, points de
   suspension = en attente (les mêmes signes qu'au téléphone, includes/dc_jeu.php). Aucun mot : la feuille ne traduit pas. */
@media (min-width: 769px) {
  .submission-indicator .dot.submitted + span::before { content: "✓ "; font-weight: 900 }
  .submission-indicator .dot.waiting + span::before { content: "… "; font-weight: 900 }
}

/* Recette du 25/11/2026 (point 6) : « Créer un compte » de l'en-tête s'affichait en texte clair sur fond doré (contraste 1,79) :
   la couleur d'un bouton de l'en-tête l'emportait sur celle du bouton plein. Texte foncé sur le doré, comme prévu ligne 53. */
@media (min-width: 769px) {
  .dc-oh .dc-oh-b.dc-oh-plein, .dc-oh a.dc-oh-plein, .dc-oh .dc-oh-plein:hover { color: var(--dc-encre, #1a1410) !important }
}
