/* CONCEPTION, CRÉATION, RÉALISATION : MATHIAS GRUNENWALD
    Code écrit manuellement ligne par ligne sous VS Code.
    © 2026 - contact@mathias-grunenwald.fr 
    https://mathias-grunenwald.fr/
*/

:root {
    --raw-red: #e63946;
    --raw-black: #0d0d0d;
    --raw-grey: #1a1a1a;
    --raw-white: #f1faee;
}

/* --- 1. BASE & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.raw-theme {
    background-color: var(--raw-black);
    color: var(--raw-white);
    font-family: 'JetBrains Mono', monospace;
    overflow-x: hidden;
}

/* Effet de ligne de scan (déjanté) */
.scanline {
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(230, 57, 70, 0.1), transparent);
    position: fixed;
    top: -100px;
    left: 0;
    z-index: 1000;
    pointer-events: none;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% {
        top: -100px;
    }

    100% {
        top: 100%;
    }
}

.wrapper {
    padding: 40px 20px;
    max-width: 1000px;
    margin: auto;
}

/* --- 2. TYPOGRAPHIE & TITRES --- */
.stamped-label {
    display: inline-block;
    border: 3px solid var(--raw-red);
    color: var(--raw-red);
    padding: 5px 15px;
    font-weight: 800;
    transform: rotate(-5deg);
    margin-bottom: 20px;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 8vw, 4.5rem);
    line-height: 0.9;
    margin-bottom: 10px;
}

/* --- 3. GRILLE BENTO --- */
.bento-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.bento-box {
    background: var(--raw-grey);
    padding: 30px;
    border: 1px solid #333;
    position: relative;
    transition: 0.3s;
}

.bento-box:hover {
    border-color: var(--raw-red);
    background: #222;
}

/* Style spécifique pour le bloc militaire (Priorité) */
.military-master {
    grid-column: span 2;
    border-left: 10px solid var(--raw-red);
    background: linear-gradient(135deg, #1a1a1a 0%, #1e2110 100%);
}

.creative-full {
    grid-column: span 2;
}

.box-label {
    font-size: 0.7rem;
    color: var(--raw-red);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- 4. LE FOOTER "DÉJANTÉ" --- */
.raw-footer-v2 {
    display: block;
    /* Sécurité centrage */
    margin: 80px auto 40px auto;
    /* Centrage horizontal forcé (auto gauche/droite) */
    padding: 30px;
    background: #000;
    border: 1px solid #333;
    border-top: 2px solid var(--raw-red);
    font-family: 'JetBrains Mono', monospace;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    width: 100%;
    max-width: 1000px;
    /* Aligné sur la largeur du wrapper */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 98% 100%, 0 100%);
    box-sizing: border-box;
}

.console-logs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.log-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.matrix-barcode {
    font-size: 1.5rem;
    color: var(--raw-red);
    text-align: center;
    letter-spacing: 5px;
    margin-top: 25px;
    font-weight: 800;
    display: block;
    width: 100%;
}

/* --- 5. CONFIGURATION RESPONSIVE --- */

/* TABLETTES */
@media (max-width: 992px) {
    .wrapper {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2.8rem;
    }
}

/* SMARTPHONES (PORTRAIT) */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        text-align: center;
        display: block;
        width: 100%;
    }

    .bento-container {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .military-master,
    .creative-full,
    .bento-box {
        grid-column: span 1 !important;
        padding: 20px !important;
    }

    .military-master h2 {
        font-size: 1.5rem;
    }

    .stamped-label {
        display: block;
        text-align: center;
        margin: 0 auto 15px auto;
        width: fit-content;
    }

    .raw-footer-v2 {
        padding: 20px;
        margin-top: 40px;
        width: calc(100% - 40px) !important;
        /* Calibrage précis pour le centrage mobile */
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .log-entry {
        font-size: 0.65rem;
        white-space: normal;
    }

    .matrix-barcode {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
}

/* MODE PAYSAGE (LANDSCAPE) */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        overflow-y: auto;
    }

    .wrapper {
        padding-top: 10px;
    }

    .dossier-header {
        margin-bottom: 15px;
        text-align: center;
    }

    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 5px;
    }

    .stamped-label {
        font-size: 0.6rem;
        padding: 2px 8px;
        margin-bottom: 8px;
    }

    .bento-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .military-master,
    .creative-full {
        grid-column: span 2 !important;
        padding: 15px !important;
    }

    .bento-box h2 {
        font-size: 1rem;
    }

    .bento-box p {
        font-size: 0.8rem;
    }
}