/* =========================================================
   VARIABLES GLOBALES
   Palette couleurs et curseurs
   ========================================================= */
:root {
    /* Curseurs personnalisés */
    --cursor-mousse: url("/assets/img/Mousse.png") 5 2;
    --cursor-select: url("/assets/img/Select.png") 5 2;

    /* Backgrounds */
    --bg-main: #f7f7f7;
    --bg-sidebar: #323747;
    --bg-button: #1f2330;
    --bg-button-hover: #3a3f52;
    --bg-footer: #595a5c;

    /* Couleurs texte */
    --text-main: #1f2937;   /* titres */
    --text-soft: #374151;   /* paragraphes */
    --text-muted: #6b7280; /* secondaires */    
    --text-light: #f1f1f1;
    --text-muted2: #3d3737;

    /* Couleurs accent */
    --accent-work: #c1121f;      /* rouge */
    --accent-edu: #1f7a8c;       /* bleu pro */
    --accent-project: #5e548e;   /* violet créatif */
    --accent-red: #c1121f;       /* rouge vif */
}

/* =========================================================
   IMPORT FONT
   ========================================================= */
@font-face {
  font-family: testtt;
  src: url(/assets/font/Fredoka-VariableFont.ttf);
}

/* =========================================================
   GLOBAL
   ========================================================= */
* {
    font-family: testtt;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: var(--cursor-mousse), pointer;
}

/* BODY - Layout, couleurs et animation de fond */
body {
    /* Layout Grid */
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr; /* Sidebar fixe */
    grid-template-rows: 1fr;

    /* Background et dégradé animé */
    background: linear-gradient(
        135deg,
        #f1f5f9,   /* gris très clair */
        #e2e8f0,   /* bleu-gris doux */
        #eef2f7,   /* presque blanc */
        #e5ebf3
    );
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;

    /* Typographie */
    color: var(--text-main);
}

/* =========================================================
   HEADER / SIDEBAR
   ========================================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    padding: 20px;
    background-color: var(--bg-sidebar);
    z-index: 100;
}

.titre > h1 {
    color: var(--text-light);
}

.titre > h1::after {
    content: ".";
    color: var(--accent-red);
}

/* NAVIGATION */
nav > ul {
    list-style: none;
    margin-top: 20px;
    padding: 0;
}

nav > ul > li > a,
nav > ul > li > button {
    /* Layout bouton */
    display: flex;
    align-items: center;
    gap: 8px; /* espace entre icône et texte */
    width: 200px;
    margin: 10px 0;
    padding: 12px 20px 12px 15px;
    text-align: left;
    text-decoration: none;

    /* Couleurs et bordures */
    background-color: var(--bg-button);
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;

    /* Typographie */
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;

    /* Transition */
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;

    cursor: var(--cursor-select), pointer;
}

/* Image dans bouton nav */
nav > ul > li > a > img,
nav > ul > li > button > img {
    pointer-events: none;
    cursor: inherit;
    width: 15px;
    height: auto;
}

/* Hover navigation */
nav > ul > li > a:hover,
nav > ul > li > button:hover {
    background-color: var(--bg-button-hover);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    grid-column: 2;
    grid-row: 2;
    padding: 16px 24px;

    background-color: var(--bg-footer);
    color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.08);

    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* =========================================================
   CONTENT
   ========================================================= */
main {
    grid-column: 2;
}

h2 {
    color: var(--text-main); /* titres des sections */
}

/* Hover sur liens et boutons */
a:hover, button:hover {
    cursor: var(--cursor-select), pointer;
}

/* =========================================================
   ANIMATIONS SHOW/HIDE
   ========================================================= */
.hide {
    display: none;
}

.show {
    display: flex;
    animation: fadeInDown 0.5s ease-in;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(+30px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* =========================================================
   ANIMATION DE GRADIENT MOVING
   ========================================================= */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =========================================================
   RESPONSIVE – MAIN / LAYOUT GLOBAL
========================================================= */
@media (max-width: 900px) {

    body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    /* ================= HEADER → TOPBAR ================= */
    header {
        position: relative;
        width: 100%;
        height: auto;

        display: flex;
        flex-direction: column;
        align-items: center;

        padding: 16px 12px;
    }

    .titre {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
    }

    /* ================= NAVIGATION ================= */
    nav {
        width: 100%;
        overflow-x: auto;
    }

    nav > ul {
        display: flex;
        flex-direction: row;
        gap: 10px;

        margin: 0;
        padding: 8px 0;

        width: max-content;
    }

    nav > ul > li {
        flex-shrink: 0;
    }

    nav > ul > li > a,
    nav > ul > li > button {
        width: auto;
        padding: 10px 14px;

        font-size: 0.9rem;
        border-radius: 999px;
    }

    nav > ul > li > a img,
    nav > ul > li > button img {
        width: 14px;
    }

    /* ================= MAIN ================= */
    main {
        grid-column: 1;
        padding: 20px 14px;
    }

    section {
        padding-top: 20px;
    }

    h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    /* ================= FOOTER ================= */
    footer {
        grid-column: 1;
        text-align: center;

        flex-direction: column;
        gap: 8px;

        font-size: 0.75rem;
    }
}

/* =========================================================
   RESPONSIVE – PETITS TÉLÉPHONES
========================================================= */
@media (max-width: 500px) {

    nav > ul > li > a,
    nav > ul > li > button {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    h2 {
        font-size: 1.4rem;
    }
}