/* ==========================================================
   BASE.CSS
   Styles communs à toutes les pages : couleurs, polices,
   menu, boutons, panneaux, cartes et pied de page.
   ========================================================== */


/* --- VARIABLES (couleurs du site, à modifier ici) --- */
:root {
    --bg: #0b0d14;
    --panel: rgba(14, 15, 22, 0.88);   /* fond des panneaux */
    --card: #151821;                    /* fond des cartes / boîtes */
    --line: #3a3d4d;                    /* bordures */
    --line-soft: #3a3d4d66;             /* séparateurs discrets */
    --hover: #c8a86222;                 /* survol des boutons / onglets */
    --nav-bg: #0b0d14f0;                /* barre de menu et pied de page */
    --gold: #c8a862;                    /* couleur d'accent principale */
    --gold-light: #e6cf94;
    --title: #f1e6c8;                   /* grands titres */
    --text: #e6e3dc;
    --muted: #a9a9b3;

    /* Image de fond du site (à déposer dans assets/img/) */
    --hero: url("../img/bgbleuazur.webp");
}


/* --- RESET --- */
* {
    margin: 0;
    box-sizing: border-box;
}


/* --- PAGE & TEXTE --- */
body {
    font-family: "Crimson Pro", Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);

    /* Fond : voile sombre (1er calque) + image + couleur de secours.
       Pour assombrir plus ou moins, changez les 3 valeurs de transparence (0.55 / 0.78 / 0.9) */
    background:
        linear-gradient(rgba(8, 9, 14, 0.55), rgba(8, 9, 14, 0.78) 60%, rgba(8, 9, 14, 0.9)) fixed,
        var(--hero) center top / cover fixed,
        var(--bg);

    /* Colonne pleine hauteur : le footer reste collé en bas de la page */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
.logo {
    font-family: Cinzel, "Times New Roman", serif;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Contour visible quand on navigue au clavier */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}


/* --- HEADER / NAVIGATION --- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 2rem;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* Image du logo : taille fixe pour ne pas déformer le menu */
.logo img {
    height: 46px;
    width: auto;
    display: block;
}

.nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 0.3rem;
}

.nav ul a {
    display: block;
    padding: 0.9rem 1.2rem;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
}

/* Lien survolé ou page actuelle */
.nav ul a:hover,
.nav ul a[aria-current] {
    color: #fff;
    border-color: var(--gold);
    background: linear-gradient(#c8a86233, #c8a86208);
}


/* --- BOUTONS --- */
.btn {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    background: linear-gradient(#d6b66f, #a88543);
    border: 1px solid #e6cf94;
    color: #1a1508;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
}

.btn:hover {
    filter: brightness(1.2);
}

/* Bouton du menu mobile (caché sur ordinateur) */
.burger {
    display: none;
    background: none;
    border: 1px solid var(--line);
    color: #fff;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 1.2rem;
}


/* --- HERO (bandeau titre en haut des pages) --- */
.hero {
    /* Zone sombre douce derrière le texte pour mieux le lire */
    background: radial-gradient(ellipse at 50% 50%, rgba(5, 10, 25, 0.6), transparent 70%);
    text-align: center;
    padding: 4.5rem 1rem 3.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--title);
    text-shadow: 0 0 30px #c8a86255, 0 3px 12px #000c;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.hero p {
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 8px #000, 0 0 20px #000a; /* ombre pour se détacher du fond */
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Logo au-dessus du titre : même taille sur toutes les pages (changez 120px ici) */
.hero .crest img {
    height: 120px;
    width: auto;
    display: block;
    margin: 0 auto 0.5rem;
    filter: drop-shadow(0 4px 14px #000a);
}


/* --- PANNEAUX --- */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.4rem;
    box-shadow:
        0 0 0 3px #0c0d14,
        0 0 0 4px #2a2c3a,
        0 10px 40px #0008;
}

.panel h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line-soft);
}


/* --- CARTES --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.cards article {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
}

.cards h3 {
    color: var(--gold);
    font-size: 1.1rem;
}


/* --- FOOTER --- */
footer {
    margin-top: auto; /* pousse le footer tout en bas */
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: var(--nav-bg);
}


/* --- RESPONSIVE (téléphone) --- */
@media (max-width: 800px) {
    .burger {
        display: block;
    }

    .nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #0b0d14;
        padding: 0.5rem;
    }

    /* Classe ajoutée par main.js quand le menu est ouvert */
    .nav ul.open {
        display: flex;
    }

    /* Bouton Discord : reste visible sur téléphone (version compacte) */
    .nav {
        padding: 0.5rem 1rem;
        gap: 0.6rem;
    }

    .logo {
        margin-right: auto;
        font-size: 1.1rem;
    }

    .logo img {
        height: 36px;
    }

    .nav .btn {
        order: 2;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .burger {
        order: 3;
    }
}

/* Très petits écrans : on garde seulement l'image du logo */
@media (max-width: 380px) {
    .logo {
        font-size: 0;
        gap: 0;
    }
}


/* --- ACCESSIBILITÉ : pas d'animation si l'utilisateur la désactive --- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
