/*
Theme Name: IT4IT Theme
Theme URI: https://it4it.be
Author: Toi :)
Description: Thème responsive et élégant pour un site d'entraide entre informaticiens.
Version: 1.0
Text Domain: it4it
*/

:root {
    --it4it-bg: #0f172a;
    --it4it-bg-alt: #020617;
    --it4it-primary: #38bdf8;
    --it4it-primary-soft: rgba(56, 189, 248, 0.15);
    --it4it-text: #e5e7eb;
    --it4it-text-muted: #9ca3af;
    --it4it-border: #1f2937;
    --it4it-card-bg: #020617;
    --it4it-danger: #f97373;
    --it4it-radius-lg: 18px;
    --it4it-radius-xl: 24px;
    --it4it-shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
    color: var(--it4it-text);
    line-height: 1.6;
}

/* Layout de base */

.it4it-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.75), transparent);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #e0f2fe, #38bdf8 40%, #0f172a);
    box-shadow:
        0 0 40px rgba(56, 189, 248, 0.8),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b1120;
    font-size: 0.8rem;
    font-weight: 700;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.site-title a {
    color: #e5e7eb;
    text-decoration: none;
}

.site-tagline {
    margin: 0;
    font-size: 0.75rem;
    color: var(--it4it-text-muted);
}

/* Navigation */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--it4it-text);
    font-size: 1.4rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.main-nav a {
    color: var(--it4it-text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    transition: all 0.15s ease;
}

.main-nav a:hover {
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.8);
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: #e5e7eb;
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

/* Bouton principal */

.it4it-cta {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b1120;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow:
        0 10px 30px rgba(8, 47, 73, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.it4it-cta:hover {
    transform: translateY(-1px);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(148, 163, 184, 0.4);
}

/* Hero (page d’accueil) */

.hero {
    padding: 2.5rem 0 1.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--it4it-text-muted);
    background: radial-gradient(circle at left, rgba(56, 189, 248, 0.6), transparent 55%),
                rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.hero-title {
    margin: 0.9rem 0 0.5rem;
    font-size: clamp(2.1rem, 3vw, 2.6rem);
    letter-spacing: 0.01em;
}

.hero-title span {
    background: linear-gradient(to right, #e0f2fe, #38bdf8);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    margin: 0 0 1.5rem;
    color: var(--it4it-text-muted);
    font-size: 0.95rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.hero-secondary {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 0.85rem;
    color: var(--it4it-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.7);
}

.hero-meta {
    font-size: 0.8rem;
    color: var(--it4it-text-muted);
}

/* Hero – bloc “stats” */

.hero-panel {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.4), transparent 60%),
                var(--it4it-bg-alt);
    border-radius: var(--it4it-radius-xl);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--it4it-shadow-soft);
    padding: 1.4rem 1.4rem 1.1rem;
}

.hero-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.hero-panel-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-panel-chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: var(--it4it-text-muted);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.hero-stat {
    padding: 0.65rem 0.7rem;
    border-radius: var(--it4it-radius-lg);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(30, 64, 175, 0.7);
}

.hero-stat-label {
    font-size: 0.72rem;
    color: var(--it4it-text-muted);
}

.hero-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Listes de cartes (articles, sections) */

.section {
    padding: 1rem 0 2.5rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-title {
    margin: 0;
    font-size: 1.1rem;
}

.section-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--it4it-text-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.card {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
    border-radius: var(--it4it-radius-lg);
    border: 1px solid rgba(31, 41, 55, 0.9);
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow:
        0 26px 55px rgba(15, 23, 42, 1),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

.card-title {
    margin: 0 0 0.2rem;
    font-size: 0.98rem;
}

.card-title a {
    color: #e5e7eb;
    text-decoration: none;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--it4it-text-muted);
    margin-bottom: 0.4rem;
}

.card-excerpt {
    font-size: 0.85rem;
    color: #cbd5f5;
}

/* Contenu principal */

.site-main {
    padding: 1.5rem 0 2.5rem;
}

.post,
.page {
    background: rgba(15, 23, 42, 0.92);
    border-radius: var(--it4it-radius-xl);
    border: 1px solid rgba(31, 41, 55, 0.9);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--it4it-shadow-soft);
}

.post-title,
.page-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.post-meta {
    font-size: 0.78rem;
    color: var(--it4it-text-muted);
    margin-bottom: 1rem;
}

.post-content,
.page-content {
    font-size: 0.95rem;
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination a,
.pagination span {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 41, 55, 0.9);
    text-decoration: none;
    color: var(--it4it-text-muted);
}

.pagination .current {
    border-color: rgba(56, 189, 248, 0.7);
    background: rgba(56, 189, 248, 0.12);
    color: #e5e7eb;
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(30, 64, 175, 0.8);
    padding: 1.3rem 0 1.8rem;
    font-size: 0.8rem;
    color: var(--it4it-text-muted);
    background: radial-gradient(circle at top, rgba(30, 64, 175, 0.4), rgba(15, 23, 42, 1));
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

/* 404 */

.not-found {
    text-align: center;
    padding: 3rem 1rem;
}

.not-found h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.not-found p {
    color: var(--it4it-text-muted);
}

/* Responsive */

@media (max-width: 800px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .site-header-inner {
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        inset: 3.3rem 0 auto 0;
        padding: 0.8rem 1.5rem 0.6rem;
        background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.97));
        border-bottom: 1px solid rgba(30, 64, 175, 0.7);
        transform-origin: top center;
        transform: scaleY(0);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.14s ease, opacity 0.14s ease;
    }

    .main-nav.is-open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.4rem;
    }

    .hero {
        padding-top: 1.5rem;
    }
}
