/* CONCEPTION, CRÉATION, RÉALISATION : MATHIAS GRUNENWALD
    Code écrit manuellement ligne par ligne sous VS Code.
    © 2026 - contact@mathias-grunenwald.fr
    "Esthétique du Silence"
*/

/* ============================================================
   0. CONFIGURATION DE BASE & POLICES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;400;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* CORRECTIF : Libère le scroll sur laptop */
    justify-content: flex-start;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* RESET ACCESSIBILITÉ & CLIC MOBILE */
a,
button,
.grid-item,
.btn,
*:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

*:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ============================================================
   1. ANIMATIONS CINÉMA
   ============================================================ */
@keyframes apparitionCinema {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes apparitionDouce {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================
   2. HEADER & NAVIGATION (BURGER PROPRE)
   ============================================================ */
@media screen and (min-width: 769px) {
    header {
        text-align: center;
        margin-bottom: 20px;
        padding-top: 40px;
        /* Air en haut identique à l'index */
        z-index: 10;
    }

    /* ON RÉINJECTE LA BARRE ICI */
    header::after {
        content: "";
        display: block;
        width: 60px;
        height: 1px;
        background-color: #333;
        margin: 20px auto 30px;
        /* 20px sous le titre, 30px au-dessus du menu */
    }

    .atelier-hub {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

h1 {
    font-weight: 200;
    font-size: 2.8em;
    letter-spacing: 15px;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(to bottom, #ffffff 10%, #888888 50%, #333333 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 span {
    font-weight: 700;
    letter-spacing: 12px;
}

.menu {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 0 !important;
    /* On met à 0 car header::after fait déjà le job de 30px */
}

.btn {
    text-decoration: none;
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 10px 15px;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.menu-burger {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* ============================================================
   3. L'ATELIER (GRILLE & CARTES)
   ============================================================ */
.atelier-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 90%;
    max-width: 1100px;
    margin: 60px auto;
    padding-bottom: 100px;
    animation: apparitionDouce 1.5s ease-out;
}

.atelier-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 40px 30px;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.atelier-card:hover {
    border-color: #444;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.atelier-card i {
    color: #666;
    margin-bottom: 20px;
    width: 24px;
    height: 24px;
    display: block;
}

.atelier-card h3 {
    font-size: 1.1em;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 400;
}

.atelier-card p {
    color: #aaa;
    font-size: 0.85em;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 200;
}

.atelier-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.7em;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    align-self: flex-start;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.atelier-link:hover {
    border-color: #ffffff;
    color: #888;
}

/* ============================================================
   4. SYSTEME DE MODALE
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #0d0d0d;
    margin: 50px auto;
    padding: 40px 30px;
    border: 1px solid #1a1a1a;
    width: 85%;
    max-width: 550px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #555;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: white;
}

.modal-h3 {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    color: #fff;
}

/* ============================================================
   5. DÉCOR & FOOTER (HARMONISÉ AVEC L'ACCUEIL)
   ============================================================ */
.glow-1 {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(130px);
    opacity: 0.25;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 75%);
    width: 900px;
    height: 900px;
    top: -350px;
    left: -350px;
}

/* CORRECTIF : Texte vertical stable à droite */
.side-decor {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #555;
    font-size: 0.65em;
    letter-spacing: 6px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.site-footer {
    width: 100%;
    padding: 60px 0 40px 0;
    margin-top: 50px;
    background-color: #000;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* CORRECTIF : Couleur harmonisée avec l'accueil */
.footer-content p {
    font-size: 0.6em;
    letter-spacing: 4px;
    color: #444;
    text-transform: uppercase;
    margin: 0;
    transition: color 0.3s ease;
}

.footer-content p:hover {
    color: #fff;
}

.footer-line {
    width: 30px;
    height: 1px;
    background-color: #222;
}

.footer-tagline {
    font-weight: 200 !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #888 !important;
    transition: color 0.3s ease;
}

.footer-tagline:hover {
    color: #ffffff !important;
}

/* ============================================================
   6. ADAPTATION MOBILE (PORTRAIT)
   ============================================================ */
@media screen and (max-width: 768px) {
    body {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        display: block !important;
        padding-top: 120px !important;
        /* Calé sur l'index */
    }

    header {
        text-align: center;
        width: 100%;
        margin-bottom: 20px !important;
        display: block !important;
        padding-top: 70px !important;
    }

    h1 {
        font-size: 1.5em !important;
        letter-spacing: 7px !important;
        margin: 0 auto !important;
        /* On garde les 50px de sécurité sur les côtés comme sur le CSS général */
        padding: 0 50px !important;
        line-height: 1.2;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    header::after {
        content: "";
        display: block !important;
        width: 40px !important;
        height: 1px !important;
        background-color: #333 !important;
        /* 15px sous le titre / 20px au-dessus du menu burger ou contenu */
        margin: 15px auto 50px !important;
    }

    /* Le burger doit être identique partout */
    .menu-burger {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        z-index: 4000 !important;
        background: rgba(0, 0, 0, 0.8) !important;
        border: 1px solid #333;
        border-radius: 5px;
        justify-content: center !important;
        align-items: center !important;
    }

    .menu-burger span {
        display: block !important;
        width: 25px !important;
        height: 2px !important;
        background-color: #ffffff !important;
    }

    .menu {
        display: none !important;
        position: fixed !important;
        /* On force l'ancrage absolu aux 4 coins pour ignorer le padding du body */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100vw !important;
        /* vw au lieu de % pour être sûr */
        height: 100vh !important;
        background: #000000 !important;

        /* CENTRAGE ABSOLU */
        display: none;
        /* Changé en flex par .menu.active */
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;

        /* RESET TOTAL des espaces */
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        z-index: 5000 !important;
        /* On passe au-dessus de TOUT */
    }

    /* On s'assure que les liens eux-mêmes n'ont pas de marges qui poussent */
    .menu .btn {
        margin: 0 !important;
        padding: 15px 0 !important;
        /* On gère l'espace interne seulement */
    }

    .menu.active {
        display: flex !important;
    }

    .modal-content {
        margin: 80px auto 40px auto;
        width: 90%;
        max-height: 70vh;
    }
}

@media screen and (max-height: 500px) and (orientation: landscape) {

    /* On descend le contenu pour laisser passer le burger */
    body {
        display: block !important;
        padding-top: 70px !important;
    }

    header {
        text-align: center !important;
        padding-top: 20px !important;
    }

    /* On force l'apparition de la barre */
    header::after {
        content: "" !important;
        display: block !important;
        width: 40px !important;
        height: 1px !important;
        background-color: #444 !important;
        margin: 15px auto 20px !important;
        visibility: visible !important;
    }

    /* On active le burger et on cache le menu texte */
    .menu {
        display: none !important;
    }

    .menu-burger {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 9999 !important;
    }

    .menu-burger span {
        display: block !important;
        width: 25px !important;
        height: 2px !important;
        background-color: #fff !important;
        margin: 3px auto !important;
    }

    /* On s'assure que les cartes de l'atelier sont bien espacées */
    .atelier-hub {
        margin-top: 20px !important;
        gap: 15px !important;
    }
}