/* Pages « du jour » (/mots-fleches-du-jour/, /sudoku-du-jour/, /mot-du-jour/).
 * Chargé par functions/_daily/page.js, qui insère la grille du jour dans #daily. Classes en « daily- ». */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/games/fleches/assets/fonts/barlow-cond-600.woff2) format('woff2'); }

#daily > * { max-width: none; }
.daily-sheet, .daily-sol { max-width: 860px !important; }
.daily-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px !important; }
.daily-meta span { padding: 5px 12px; border-radius: 10px; background: var(--blue-l); color: var(--blue); font-weight: 800; font-size: 15px; line-height: 1.3; }
.daily-meta span:first-child { background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-d); }
.daily-meta b { font-weight: 900; }
.daily-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 22px; }
#daily .daily-actions .daily-btn { color: #fff; text-decoration: none; font-weight: 400; }
.daily-print-title { display: none; }
.daily-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#daily .daily-note { font-size: 15px; color: var(--ink-3); margin: 0 0 10px; }
#daily .daily-h2 { margin: 22px 0 4px; }
.daily-swipe { display: none; }

/* ---------- mots fléchés : grille ---------- */
.daily-scroll { container-type: inline-size; overflow-x: auto; margin: 0 0 6px; padding-bottom: 4px; }
.daily-fl-grid {
  --cs: 52px;
  --cs: clamp(38px, (100cqw - 8px - var(--w) * 1px) / var(--w), 64px);
  display: grid; grid-template-columns: repeat(var(--w), var(--cs)); grid-auto-rows: var(--cs); gap: 1px; width: max-content;
  background: #8c98ab; border: max(2px, calc(var(--cs) * .05)) solid #2f3b52;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.daily-fl-def { display: flex; flex-direction: column; background: #dfe8f3; color: #1f2c44; overflow: hidden; }
.daily-fl-def span { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative;
  font: 600 calc(var(--cs) * var(--fs)) / 1.02 'Barlow Condensed', 'Arial Narrow', sans-serif; text-align: center; white-space: nowrap; }
.daily-fl-def i { font-style: normal; display: block; }
.daily-fl-two span:first-child::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; border-bottom: 1px solid #8c98ab; }
.daily-fl-cell { position: relative; display: grid; place-items: center; background: #fff; }
.daily-fl-cell svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: #2f3b52; }
.daily-fl-cell svg .l { fill: none; stroke: #2f3b52; stroke-width: 3.5; }
.daily-fl-cell b { font: 700 calc(var(--cs) * .6) / 1 'Baloo 2', system-ui, sans-serif; color: #1d2433; padding-top: calc(var(--cs) * .08); }

/* ---------- mots fléchés : définitions ---------- */
.daily-defs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; }
#daily .daily-defs h3 { margin: 8px 0 6px; font-size: 17px; }
.daily-defs ul { list-style: none; padding: 0 !important; margin: 0 !important; }
#daily .daily-defs li { margin: 0; padding: 3px 0; font-size: 15px; line-height: 1.35; border-bottom: 1px dashed var(--line); break-inside: avoid; }
#daily .daily-defs li small { color: var(--ink-3); font-weight: 600; }
.daily-pos { display: inline-block; min-width: 2.4em; font-weight: 800; color: var(--blue); }
.daily-ans { color: var(--ink); letter-spacing: .5px; }

/* ---------- sudoku ---------- */
.daily-sdk-wrap { container-type: inline-size; margin: 0 0 6px; }
#daily .daily-sdk {
  --c: 48px;
  --c: clamp(30px, (100cqw - 12px) / 9, 50px);
  min-width: 0; border-collapse: collapse; table-layout: fixed; border: 3px solid #2c3b34; background: #fff;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
#daily .daily-sdk td {
  width: var(--c); height: var(--c); padding: 0; border: 1px solid #aab8b0; text-align: center; vertical-align: middle;
  font: 700 calc(var(--c) * .56) / 1 'Baloo 2', system-ui, sans-serif; color: #18211d;
}
#daily .daily-sdk td:nth-child(3n) { border-right: 3px solid #2c3b34; }
#daily .daily-sdk tr:nth-child(3n) td { border-bottom: 3px solid #2c3b34; }
#daily .daily-sdk .daily-s { color: #1a5bbd; font-weight: 600; }

/* ---------- mot du jour ---------- */
.daily-mot-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.daily-mot-tile {
  width: 54px; height: 54px; border-radius: 9px; display: grid; place-items: center; padding-top: 4px; box-sizing: border-box;
  font: 400 30px/1 var(--title); color: #fff; background: linear-gradient(180deg, #2f74e6, #1a4cb3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16), inset 0 -4px 0 rgba(0, 0, 0, .2);
}
.daily-mot-good { background: linear-gradient(180deg, #ff5a4f, #d71f26); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), inset 0 -4px 0 rgba(90, 0, 0, .35); }
#daily .daily-mot-clue { font-size: 18px; color: var(--ink); margin: 0 0 16px; }

/* ---------- solution d'hier ---------- */
.daily-sol { margin: 22px 0 4px; padding: 0 18px; border: 2px solid var(--line); border-radius: 16px; background: #f6f9fe; }
.daily-sol[open] { padding-bottom: 16px; }
.daily-sol > summary { cursor: pointer; padding: 14px 0; font-weight: 800; font-size: 18px; color: var(--ink); }
.daily-sol > summary small { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.daily-sol > summary:hover { color: var(--blue); }

@media (max-width: 640px) {
  .daily-defs { grid-template-columns: 1fr; }
  .daily-swipe { display: block; font-size: 14px !important; color: var(--ink-3); margin: 0 0 8px !important; }
  .daily-mot-tile { width: 46px; height: 46px; font-size: 26px; }
  .daily-actions { gap: 12px; }
  #daily .daily-actions .daily-btn { flex: 1 1 100%; justify-content: center; font-size: 18px; padding: 9px 14px; }
  .daily-meta span { font-size: 14px; padding: 4px 10px; }
  .daily-sol { padding: 0 12px; }
  .daily-sol[open] { padding-bottom: 12px; }
}

/* ---------- impression : seulement la grille et les définitions ---------- */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body:has(.daily-sheet) { background: #fff !important; }
  .daily-sheet { max-width: none !important; }
  /* pages avec une grille à imprimer (mots fléchés, sudoku) ; le mot du jour s'imprime normalement */
  body:has(.daily-sheet) > *:not(main), body:has(.daily-sheet) main > *:not(.daily), .daily:has(.daily-sheet) > *:not(#daily),
  #daily:has(.daily-sheet) > *:not(.daily-sheet), .daily-swipe, .daily-actions { display: none !important; }
  body:has(.daily-sheet) main.page, .daily:has(.daily-sheet) { max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; }
  .daily-sheet { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .daily-print-title { display: block; margin: 0 0 4mm !important; font: 700 13pt/1.3 'Baloo 2', system-ui, sans-serif; color: #000; }
  .daily-scroll { overflow: visible; margin: 0 0 3mm; }
  .daily-fl-grid { --cs: min(15mm, (100cqw - 8px - var(--w) * 1px) / var(--w)); margin: 0 auto; }
  #daily .daily-h2 { margin: 3mm 0 1mm; font-size: 12pt; color: #000; }
  #daily .daily-note { margin: 0 0 1mm; font-size: 8.5pt; }
  .daily-defs { gap: 0 8mm; }
  #daily .daily-defs h3 { margin: 1mm 0; font-size: 10pt; color: #000; }
  #daily .daily-defs li { padding: .4mm 0; font-size: 8.5pt; line-height: 1.25; color: #000; border-bottom-color: #ccc; }
  .daily-sdk-wrap { margin-top: 6mm; }
  #daily .daily-sdk { --c: 17mm; margin: 0 auto; }
}
