/* =========================================================
   Skywars Devlog — Styles unifiés (comportement inchangé)
   ========================================================= */

/* ---------- Variables & bases ---------- */
.skywars-devlog-archive,
:root {
    --devlog-gap: 1.2rem;
    --devlog-radius: 16px;
    --devlog-shadow: 0 6px 20px rgba(0,0,0,.06);
    --devlog-text-muted: #64748b; /* slate-500 */
    --devlog-border: #e5e7eb;     /* gray-200 */
    --devlog-card: #fff;
    --devlog-bg: #ddd;         /* placeholders */
}

.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.devlog-in { max-width: 1100px; margin: 0 auto; padding: 0 0; }

/* ---------- En-têtes & textes ---------- */
.skywars-devlog-archive .page-header h1 { font-size: 2rem; margin-bottom: .25rem; }
.skywars-devlog-archive .intro { color: #666; margin-bottom: 1.5rem; }
.page-title { font-size: 1.8rem; margin: 0 0 .25rem; }
.intro { color:#556; margin:.25rem 0 .5rem; }

.skywars-devlog-single .entry-title { font-size: 2rem; margin-bottom: .25rem; }
.skywars-devlog-single .entry-meta { color:#666; margin-bottom: 1rem; }
.entry-thumb img { border-radius: 10px; }

/* ---------- Grille cartes (archive "ancienne") ---------- */
.devlog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.devlog-card {
    background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.03); display: flex; flex-direction: column;
}
.devlog-card .thumb img { display:block; width:100%; height:auto; }
.devlog-content { padding: 1rem 1rem 1.25rem; display:flex; flex-direction:column; gap:.5rem; }
.devlog-title { margin: 0; font-size: 1.1rem; }
.devlog-meta { color: #555; font-size: .9rem; }
.readmore { text-decoration: none; }

/* ---------- Navigation de posts / pagination ---------- */
.post-nav { display:flex; justify-content: space-between; margin-top: 2rem; }
.devlog-nav-min { display:flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.devlog-nav-min a { text-decoration: none; }
.devlog-nav-sep { opacity: .6; }

.pagination { margin: 1.6rem 0 2.2rem; text-align: center; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; margin: 0 .2rem; padding: 0 .5rem;
    border: 1px solid var(--devlog-border); border-radius: 10px; text-decoration: none; color: inherit;
}
.pagination .page-numbers.current { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }

/* ---------- Badges & métas ---------- */
.devlog-badge {
    display: inline-flex; align-items: center;
    padding: .15rem .5rem; border-radius: 999px;
    font-size: .8rem; line-height: 1.2;
    background: #f1f5f9; color: #0f172a;
    border: 1px solid rgba(15,23,42,.08);
}
.devlog-badge--pre-beta {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e; /* amber-800 */
}

.devlog-badge--beta {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af; /* blue-800 */
}

.devlog-badge--release {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534; /* green-800 */
}

.devlog-meta-line { font-size: 0.95rem; color: #333; }
.devlog-meta-line time { white-space: nowrap; }

/* ---------- Liste "derniers devlogs" (snippets) ---------- */
.devlog-latest { display: grid; gap: 1rem; }
.devlog-snippet {
    position: relative;
    display: flex; gap: .9rem; align-items: flex-start;
    border: 1px solid #eee; border-radius: 12px; padding: .75rem; background:#fff;
}
.devlog-snippet-media {
    display: block; width: 96px; min-width: 96px; height: 96px;
    border-radius: 10px; overflow: hidden; background: #f3f3f3;
}
.devlog-snippet-thumb { width: 100%; height: 100%; object-fit: cover; display:block; }
.devlog-snippet-thumb--placeholder { display:block; width:100%; height:100%; background: #e9e9e9; }
.devlog-snippet-body { flex: 1; min-width: 0; }
.devlog-snippet-title { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.3; word-break: break-word; }
.devlog-snippet-title a { text-decoration: none; }
.devlog-snippet-meta { color:#444; font-size: .92rem; }

/* ---------- Fil d’Ariane & catégories ---------- */
.sky-breadcrumbs { font-size: .95rem; margin: .5rem 0 1rem; color:#0C4956; }
.sky-breadcrumbs a { text-decoration: none; }
.sky-breadcrumbs-sep { margin: 0 .35rem; opacity: .6; }
.devlog-cats { color:#666; margin:.25rem 0 .5rem; }

/* Boutons de catégories (header cat + global) */
.page-header--cat .page-header__inner {
    background: #fafbff; border: 1px solid #eef0f7; border-radius: 16px;
    padding: 1.25rem 1.25rem 1rem; margin-bottom: 1rem;
}
.devlog-cat-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.8rem 0 1.2rem; }
.devlog-cat-chip {
    display: inline-flex; align-items: center; padding: .4rem .7rem; font-size: .9rem;
    background: #f8fafc; color: #0f172a;
    border: 1px solid var(--devlog-border); border-radius: 999px; text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .05s ease;
}
.devlog-cat-chip:hover { background: #eef2f7; border-color: #dbe1e8; }
.devlog-cat-chip.is-active { background: #e2e8f0; border-color: #cbd5e1; font-weight: 600; }
.devlog-cat-chip:active { transform: translateY(1px); }

/* Compteur de résultats */
.devlog-results { color:#667; margin:.5rem 0 1rem; }

/* ---------- Liste complète (rows) ---------- */
.devlog-list { display: grid; gap: var(--devlog-gap); margin-top: .5rem; }
.devlog-row {
    display: grid; grid-template-columns: 112px 1fr; gap: 1rem;
    padding: .9rem; border: 1px solid var(--devlog-border); border-radius: 14px;
    background: var(--devlog-card); box-shadow: 0 2px 10px rgba(0,0,0,.02);
}
.devlog-row__media {
    display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
    background: radial-gradient(100% 100% at 30% 0%, rgba(255,255,255,.08), transparent 40%), var(--devlog-bg);
}
.devlog-row__thumb { width:100%; height:100%; object-fit:cover; display:block; }
.devlog-row__thumb--placeholder { display:block; width:100%; height:100%; }
.devlog-row__body { display: flex; flex-direction: column; gap: .35rem; }
.devlog-row__title { font-size: 1.05rem; line-height: 1.25; margin: 0; }
.devlog-row__title a { color: inherit; text-decoration: none; }
.devlog-row__title a:hover { text-decoration: underline; }
.devlog-row__meta {
    font-size: .9rem; color: var(--devlog-text-muted);
    display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.devlog-row__excerpt { margin: .2rem 0 0; color: #334155; font-size: .95rem; }


/* Disposition 2 colonnes ≥720px (préserve comportement existant) */
@media (min-width: 1200px) {
    .devlog-list { grid-template-columns: 1fr 1fr; }
}

/* Ajustements compacts */
@media (max-width: 540px) {
    .devlog-row { grid-template-columns: 88px 1fr; padding: .75rem; }
}

/* ---------- Hero (3 derniers devlogs, v2) ---------- */
.devlog-hero { margin-block: 1.25rem 2rem; }
.devlog-hero-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--devlog-gap);
}
@media (max-width: 1200px) { .devlog-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .devlog-hero-grid { grid-template-columns: 1fr; } }

.devlog-hero-card {
    background: var(--devlog-card); border: 1px solid var(--devlog-border);
    border-radius: var(--devlog-radius); box-shadow: var(--devlog-shadow);
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.devlog-hero-media,
.devlog-hero-thumb {
    display:block; width:100%; aspect-ratio: 16 / 9;
    background:
            radial-gradient(120% 120% at 10% 0%, rgba(255,255,255,.06), transparent 40%),
            radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.08), transparent 40%),
            radial-gradient(120% 120% at 0% 100%, rgba(255,255,255,.05), transparent 40%),
            var(--devlog-bg);
}
.devlog-hero-media img,
.devlog-hero-thumb img { width:100%; height:100%; object-fit:cover; }
.devlog-hero-body { padding: 0.9rem 1rem 1.1rem; }
.devlog-hero-title {
    font-size: clamp(1.05rem, 1vw + .8rem, 1.25rem); line-height: 1.25; margin: 0 0 .4rem;
}
.devlog-hero-title a { color: inherit; text-decoration: none; }
.devlog-hero-title a:hover { text-decoration: underline; }
.devlog-hero-meta {
    font-size: .9rem; color: var(--devlog-text-muted);
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}

/* ---------- CTA "Origines" ---------- */
.devlog-origins-cta { margin: 1.8rem 0 2.8rem; text-align: center; }
.devlog-origins-link {
    display: inline-block; padding: .7rem 1rem;
    border: 1px solid var(--devlog-border); border-radius: 12px;
    background: #f8fafc; text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}
.devlog-origins-link:hover { background: #eef2f7; border-color: #dbe1e8; }

/* ---------- Conteneur principal ---------- */
.devlog-main {
    margin: 40px auto; background: #ededed;
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.3);
    width: 100%; border-radius: 15px; padding-top: 4%; padding-bottom: 40px;
}

@media only screen and (min-width: 1350px) {
    .devlog-main{
        padding: 54px 0;
    }
}

/* Desktop & Tablet: 80% ou 1200px max */
@media (min-width: 768px) {
    .devlog-main { width: 80%; max-width: 1200px; padding-left: 0; padding-right: 0; }
    .devlog-main .devlog-in { width: 80%; max-width: 1080px; }
}

/* Phone: 100% + padding 20px gauche/droite */
@media (max-width: 767px) {
    .devlog-main { width: 100%; max-width: 100%; padding-left: 20px; padding-right: 20px; }
    .devlog-main .devlog-in { width: 100%; }
}

.devlog-hero-card,
.devlog-row {
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    cursor: pointer; /* feedback visuel */
}

/* Le lien du titre s’étend sur toute la carte */
.stretched-link {
    position: static;             /* pas de nouveau contexte, on s’ancre sur le parent */
    color: inherit;
    text-decoration: none;
}

/* L’overlay capte les clics sur tout le bloc parent */
.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;                     /* top/right/bottom/left: 0 */
    z-index: 2;                   /* au-dessus du contenu pour capter les clics */
    background: transparent;
}

/* Effet hover/focus sur la carte entière */
.devlog-hero-card:hover,
.devlog-hero-card:focus-within,
.devlog-row:hover,
.devlog-row:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    background-color: #fff;       /* garde l’éclairage cohérent */
}

/* Conserve l’indication de lien sur le texte du titre */
.devlog-hero-title a:hover,
.devlog-row__title a:hover,
.devlog-hero-title a:focus-visible,
.devlog-row__title a:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* Si tu as d’autres éléments interactifs dans la carte (boutons, tags),
   garde-les au-dessus de l’overlay pour rester cliquables. */
.devlog-hero-card .devlog-cat-chip,
.devlog-row .devlog-cat-chip,
.devlog-hero-card .devlog-badge,
.devlog-row .devlog-badge {
    position: relative;
    z-index: 3;
}

/* Pas d’underline sur les liens de titre, même au survol ou au focus */
.devlog-hero-title a,
.devlog-row__title a {
    text-decoration: none !important;
}

.devlog-hero-title a:hover,
.devlog-row__title a:hover,
.devlog-hero-title a:focus,
.devlog-row__title a:focus,
.devlog-hero-title a:focus-visible,
.devlog-row__title a:focus-visible {
    text-decoration: none !important;
}

/* On garde le feedback sur TOUTE la carte (hover/focus) */
.devlog-hero-card:hover,
.devlog-hero-card:focus-within,
.devlog-row:hover,
.devlog-row:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    background-color: #fff;
}
