/*
Theme Name: GeneratePress Child – MyWordGames
Description: Home builder + UI
Template: generatepress
*/

/* ---------- Palette & base ---------- */
:root{
  --mwg-bg: #f6f7fb;
  --mwg-text: #1c1d22;
  --mwg-muted: #6a7080;
  --mwg-accent: #1e4dd8;     /* bleu */
  --mwg-accent-2: #e63946;   /* rouge */
  --mwg-chip: #e8ecff;
  --mwg-card: #ffffff;
  --mwg-border: #e6e8f0;     /* bordures “légères” */
  --mwg-frame: #b7bfd6;      /* bordures plus foncées (pas noir) */
  /* largeur max desktop pour éviter l’effet “étiré” */
  --mwg-wrap: clamp(980px, 82vw, 1120px);
}

body{ background: var(--mwg-bg); }

/* ---------- Anti-CLS thumbs ---------- */
.mwg-thumb-wrap{ aspect-ratio: 16/9; overflow:hidden; border-radius:10px; }
.mwg-thumb-wrap img{ width:100%; height:100%; object-fit:cover; display:block; }

/* ---------- Contrainte desktop ---------- */
@media (min-width: 1024px){
  .mwg-home{
    max-width: var(--mwg-wrap);
    margin-inline: auto;
    padding-inline: 24px;
  }
}

/* ---------- Trending ticker ---------- */
.mwg-trending{
  position:relative; display:flex; align-items:center; gap:.75rem;
  background:var(--mwg-card); border:1px solid var(--mwg-border);
  padding:.5rem .75rem; border-radius:12px; margin:16px 0 24px;
}
.mwg-trending-label{
  z-index:2; flex:0 0 auto;
  background: var(--mwg-accent-2); color:#fff; font-weight:600;
  font-size:.85rem; padding:.25rem .55rem; border-radius:8px;
}
.mwg-trending-viewport{ position:relative; flex:1 1 auto; overflow:hidden; min-width:0; }
.mwg-trending-track{
  display:inline-flex; gap:1.25rem; align-items:center;
  white-space:nowrap; will-change:transform;
  animation:mwg-marquee 24s linear infinite;
}
.mwg-trending:hover .mwg-trending-track{ animation-play-state: paused; }
.mwg-trend{
  display:inline-flex; align-items:center; gap:.45rem;
  color: var(--mwg-accent); text-decoration:none; font-weight:500;
  padding:.2rem .5rem; background: var(--mwg-chip); border-radius:999px;
  line-height:1;
}
.mwg-trend-sep{ opacity:.3; }
.mwg-trend-icon{
  width:20px; height:20px; border-radius:50%;
  object-fit:cover; display:inline-block; background:#f2f3f7; flex:0 0 20px;
}
.mwg-icon-fallback{ color:#fff; font-weight:800; font-size:12px; text-align:center; line-height:20px; }
@keyframes mwg-marquee{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}
@media (max-width:600px){
  .mwg-trending-track{ gap:.85rem; animation-duration: 28s; }
}

/* ---------- Board 3×2 "Word Games Answers" ---------- */
.mwg-board{ margin:6px 0 32px; }
.mwg-board .mwg-sec-title{ margin:0 0 12px; }
.mwg-board-grid{
  display:grid; gap:8px;
  grid-template-columns: repeat(6, minmax(0,1fr));
}
@media (max-width:900px){
  .mwg-board-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Tuile = grille : icône (1ère col) + nom sur 2 lignes */
.mwg-board-tile{
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: start;
  text-decoration:none;
  background:var(--mwg-card);
  border:1.5px solid var(--mwg-frame);
  border-radius:12px;
  padding:8px;
}
.mwg-board-tile:hover{ border-color: #aeb7cf; }
.mwg-board-tile .mwg-trend-icon{
  grid-column: 1; grid-row: 1;
  width: 28px; height: 28px;
  border-radius: 999px; object-fit: cover; aspect-ratio: 1 / 1;
}
.mwg-board-name{
  grid-column: 2; grid-row: 1 / span 2;
  display:grid; grid-template-rows:auto auto;
  color:var(--mwg-text); font-weight:400; font-size:14px; line-height:1.12;
}
.mwg-board-tile:hover .mwg-board-name{ color:var(--mwg-accent); }
.mwg-name-first{
  grid-row:1;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.mwg-name-second{ grid-row:2; }

/* ---------- Hero Search ---------- */
.mwg-hero-block{ margin:0 0 32px; }
.mwg-hero-block .mwg-sec-title{ margin:0 0 12px; }
.mwg-hero-search{
  display:flex; align-items:center; gap:.5rem; margin:0 auto 22px;
  background: var(--mwg-card);
  border:1.5px solid var(--mwg-frame);
  border-radius:14px; padding:.5rem; max-width: 820px;
}
.mwg-hero-input{
  flex:1 1 auto; min-width:0; border:0; outline:0; height:52px; padding:0 14px;
  font-size:18px; color:var(--mwg-text); background:transparent;
}
.mwg-hero-btn{
  flex:0 0 auto; height:52px; min-width:110px; border:0; border-radius:12px;
  background: var(--mwg-accent); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-weight:700;
  letter-spacing:.2px;
}
.mwg-hero-btn-text{ line-height:1; }
.mwg-hero-btn:hover{ filter:brightness(0.95); }
@media (max-width:600px){
  .mwg-hero-input{ height:48px; font-size:16px; }
  .mwg-hero-btn{ height:48px; min-width:92px; font-size:15px; }
}
@media (min-width: 901px){
  .mwg-home .mwg-hero-search{ max-width:none; width:100%; }
}

/* ---------- Calendar (Daily Answers) ---------- */
.mwg-calendar{
  background: var(--mwg-card); border:1.5px solid var(--mwg-frame);
  border-radius:14px; padding:16px; margin:0 0 32px;
}
.mwg-cal-head{
  display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:6px;
}
.mwg-sec-title{ margin:0 0 12px; font-size:22px; font-weight:700; color:var(--mwg-text); }
.mwg-cal-nav{ display:flex; align-items:center; gap:.6rem; }
.mwg-cal-month{ color:var(--mwg-muted); font-weight:600; }
.mwg-cal-btn{
  text-decoration:none; border:1px solid var(--mwg-border); background:#fff; color:var(--mwg-text);
  padding:.35rem .6rem; border-radius:8px; font-size:14px;
}
.mwg-cal-legend{ display:flex; gap:.75rem; align-items:center; margin:8px 0 10px; }
.mwg-cal-legend .lg{ display:inline-flex; align-items:center; gap:.35rem; font-size:12px; color:var(--mwg-muted); }
.mwg-cal-legend .lg::before{
  content:""; width:12px; height:12px; border-radius:6px; display:inline-block; border:1px solid var(--mwg-border);
}
.mwg-cal-legend .lg.has::before{ background: var(--mwg-chip); border-color: var(--mwg-accent); }
.mwg-cal-legend .lg.today::before{
  background:
    radial-gradient(60% 60% at 50% 42%,
      rgba(230,57,70,.20) 0%,
      rgba(230,57,70,.08) 45%,
      rgba(230,57,70,0) 80%
    ),
    #fff;
  border-color: var(--mwg-accent-2);
  box-shadow: 0 0 0 2px rgba(230,57,70,.18) inset;
}

.mwg-cal-grid{ display:grid; grid-template-columns: repeat(7, 1fr); gap:6px; align-items:stretch; }
.mwg-cal-dow{ text-align:center; font-size:12px; color:var(--mwg-muted); padding:6px 0; }
.mwg-cal-empty{ min-height:44px; }

.mwg-cal-day{
  display:flex; align-items:center; justify-content:center;
  min-height:44px; text-decoration:none; border:1px solid var(--mwg-border);
  border-radius:10px; background:#fff; color:var(--mwg-text); font-weight:700;
}
.mwg-cal-day.has-posts{
  background: var(--mwg-chip);
  border-color: var(--mwg-accent);
  color: var(--mwg-accent);
}
.mwg-cal-day.is-today{
  background:
    radial-gradient(60% 60% at 50% 42%,
      rgba(230,57,70,.20) 0%,
      rgba(230,57,70,.08) 45%,
      rgba(230,57,70,0) 80%
    ),
    #fff;
  border-color: var(--mwg-accent-2);
  color: var(--mwg-accent-2);
  box-shadow: 0 0 0 2px rgba(230,57,70,.18) inset;
}
.mwg-cal-day.is-today.has-posts{
  background:
    radial-gradient(60% 60% at 50% 42%,
      rgba(230,57,70,.18) 0%,
      rgba(230,57,70,.06) 45%,
      rgba(230,57,70,0) 80%
    ),
    var(--mwg-chip);
  border-color: var(--mwg-accent-2);
  color: var(--mwg-accent-2);
}
.mwg-cal-day.is-empty{
  background: #f7f8fc;
  color: var(--mwg-muted);
  border-style: dashed;
  cursor: not-allowed;
  pointer-events: none;
}
.mwg-cal-day:hover{ filter:brightness(0.98); }
.mwg-cal-day.is-empty:hover{ filter: none; }

/* ---------- Latest (cartes compactes) ---------- */
.mwg-latest{ margin:0 0 32px; }
.mwg-latest .mwg-sec-title{ margin-bottom: 12px; }
.mwg-latest-grid{
  display:grid; gap:12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.mwg-latest-item{
  background: var(--mwg-card); border:1.5px solid var(--mwg-frame);
  border-radius:12px; padding:8px;
}
.mwg-latest-row{
  display:flex; align-items:center; gap:10px; text-decoration:none;
}
.mwg-lt-thumb{
  width:80px; height:80px; border-radius:10px; flex:0 0 80px; object-fit:cover;
  background:#f2f3f7; display:block;
}
.mwg-thumb-fallback{
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:24px;
  color:#fff; background: linear-gradient(135deg, var(--mwg-accent), var(--mwg-accent-2));
}
.mwg-lt-title{
  color:var(--mwg-text); font-size:16px; font-weight:400; line-height:1.25; /* allégé */
}
.mwg-latest-row:hover .mwg-lt-title{ color: var(--mwg-accent); }

/* ---------- Popular Games Answers ---------- */
.mwg-corner{ margin:0 0 32px; }
.mwg-corner .mwg-sec-title{ margin-bottom: 12px; }

/* ---------- Icônes rondes partout ---------- */
.mwg-trend-icon{ border-radius: 999px !important; aspect-ratio: 1 / 1; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 600px){
  .mwg-home{ padding-inline: 10px; }
  .mwg-board-grid{ gap: 6px; }
  .mwg-board-tile{ padding: 6px 8px; }
  .mwg-board-name{
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mwg-trend-text{
    max-width: 52vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Header visuel ---------- */
.site-header{ background:#fdfdff; }

/* ---------- Harmonisation bordures foncées ---------- */
.mwg-board-tile,
.mwg-hero-search,
.mwg-calendar,
.mwg-latest-item,
.mwg-corner .mwg-latest-item{
  border-color: var(--mwg-frame) !important;
  border-width: 1.5px;
}

/* Sécurité */
.mwg-home{ overflow-x: hidden; }

