/* =====================================================================
   ACCUEIL.CSS — styles de la page d'accueil (index.php)
   ===================================================================== */

/* =========================================================
   BASE
   ========================================================= */

:root {
    --blue-dark: #1e3a8a;
    --blue: #3b82f6;
    --blue-hover: #1e40af;
    --yellow: #facc15;
}


html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: Arial, sans-serif;

    min-height: 100vh;

    overflow-x: hidden;

    background: url('https://www.fredpeuriere.com/anims/fond.png')
                no-repeat
                center center
                fixed;

    background-size: cover;

    position: relative;
    z-index: 0;
}


/* Voile blanc sur le fond */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    background-color: rgba(255, 255, 255, 0.85);

    z-index: -1;
}

.intro-title {

    font-size: 19px;

    font-weight: 700;

    color: var(--blue-dark);

    margin-bottom: 12px;
}

/* =========================================================
   CONTENEUR PRINCIPAL
   ========================================================= */

.main-container {

    width: 90%;
    max-width: 1100px;

    margin: auto;

    padding: 30px 20px;
}


/* =========================================================
   SECTION UNIQUE
   ========================================================= */

.content-section {

    margin: 40px 0;

    padding: 40px 30px 50px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.45);

    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.04),
        0 30px 60px rgba(0, 0, 0, 0.08);

    backdrop-filter: blur(5px);
}


/* =========================================================
   TITRE
   ========================================================= */

.section-header {

    font-size: 30px;

    font-weight: 700;

    text-align: right;

    color: var(--blue-dark);

    margin-bottom: 35px;

    padding-bottom: 12px;

    border-bottom: 1px solid var(--blue);
}


/* =========================================================
   INTRODUCTION
   ========================================================= */

.intro {

    text-align: center;

    max-width: 750px;

    margin: 0 auto 40px;

    color: #334155;

    font-size: 17px;

    line-height: 1.6;
}


/* =========================================================
   GRILLE DES CARTES
   ========================================================= */

.grid-container {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


/* =========================================================
   CARTE
   ========================================================= */

.grid-item {

    background: rgba(255, 255, 255, 0.88);

    border-radius: 18px;

    padding: 22px;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 12px;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.08);

    transition:
        transform .5s ease,
        box-shadow .5s ease;

    cursor: pointer;

    text-decoration: none;

    color: inherit;

    position: relative;

    overflow: hidden;
}


.grid-item:hover {

    transform: scale(1.06);

    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.18);
}


/* =========================================================
   TITRE DES CARTES
   ========================================================= */

.title-block {

    text-align: center;

    margin: 10px 0;
}


.caption {

    font-size: 23px;

    font-weight: 800;

    color: var(--blue-dark);

    text-align: center;
}


.title-block p {

    margin-top: 5px;

    font-size: 15px;

    color: #475569;
}


/* =========================================================
   PETITES CARTES D'EXERCICES
   ========================================================= */

.exercices {

    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.exercice {

    display: block;

    width: 100%;

    background: #f1f5f9;

    border-left: 4px solid var(--blue);

    border-radius: 6px;

    padding: 9px 11px;

    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

    color: inherit;
}


.exercice:hover {

    background: #e0e7ff;

    transform: translateX(3px);
}


.exercice-title {

    font-size: 14px;

    font-weight: 700;

    color: var(--blue-hover);
}


.exercice-desc {

    font-size: 13px;

    color: #334155;

    line-height: 1.4;

    margin-top: 3px;
}


/* =========================================================
   BADGE NOUVEAU
   ========================================================= */

.badge-nouveau {

    position: absolute;

    top: 22px;
    right: -34px;

    background: #ef4444;

    color: white;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;

    padding: 4px 40px;

    transform: rotate(45deg);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.2);

    pointer-events: none;

    z-index: 2;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {

    text-align: center;

    padding: 25px;

    color: #64748b;

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .grid-container {

        grid-template-columns:
            repeat(2, 1fr);
    }
}


@media (max-width: 600px) {

    body {

        background: #f8fafc;
    }


    body::before {

        display: none;
    }


    .main-container {

        width: 100%;

        padding: 15px;
    }


    .content-section {

        margin: 20px 0;

        padding: 25px 15px 35px;

        border-radius: 20px;

        background: transparent;

        box-shadow: none;
    }


    .section-header {

        font-size: 24px;

        margin-bottom: 25px;
    }


    .intro {

        font-size: 16px;

        margin-bottom: 30px;
    }


    .grid-container {

        grid-template-columns: 1fr;

        gap: 15px;
    }


    .grid-item {

        padding: 20px;
    }


    .grid-item:hover {

        transform: scale(1.02);
    }


    .caption {

        font-size: 21px;
    }
}


/* =========================================================
   CHAPITRES À VENIR
   ========================================================= */

.exercice.a-venir {
    cursor: default;
    opacity: 0.6;
    border-left-color: #94a3b8;
}

.exercice.a-venir:hover {
    background: #f1f5f9;
    transform: none;
}

.bientot {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    vertical-align: 1px;
}
