 :root {
            --bs-body-bg: #0a0a0a;
            --bs-body-color: #e0e0e0;
            --brand-orange: #ff6600;
        }
        body {
            background-color: var(--bs-body-bg);
            color: var(--bs-body-color);
            font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
        }
        .text-orange { color: var(--brand-orange) !important; }
        .bg-orange { background-color: var(--brand-orange) !important; }
        .btn-orange {
            background-color: var(--brand-orange);
            color: #000;
            font-weight: 600;
            border: none;
        }
        .btn-orange:hover {
            background-color: #e55c00;
            color: #fff;
        }
        .navbar {
            background-color: rgba(10, 10, 10, 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid #222;
        }
        .nav-link {
            color: #ccc !important;
            transition: color 0.2s;
        }
        .nav-link:hover, .nav-link.active {
            color: var(--brand-orange) !important;
        }
        .hover-orange:hover {
            color: var(--brand-orange) !important;
            transition: color 0.2s ease;
        }

        /* 1. Sur mobile */
        html { font-size: 100%; }

        /* 2. Sur PC */
        @media (min-width: 992px) {
            html { font-size: 90%; }
        }

    /* Styles spécifiques à l'application Simulateur */
    .app-container {
        max-width: 1000px;
        margin: 0 auto;
    }

    /* Le Viseur (Zone d'image) */
    #viseur-ecran {
        position: relative;
        height: 50vh;
        min-height: 280px;
        background-color: #111;
        border: 4px solid #1a1a1a;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
        transition: background-size 0.3s ease, filter 0.1s ease-out;
        background-repeat: no-repeat;
        background-position: center;
        touch-action: none; /* Empêche la page web de scroller quand on cadre au doigt */
    }

    /* Grille et Collimateurs du viseur */
    .viseur-grid {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        border: 1px solid rgba(255,255,255,0.1);
        pointer-events: none;
    }
    .viseur-grid::before, .viseur-grid::after {
        content: '';
        position: absolute;
        background: rgba(255,255,255,0.2);
    }
    .viseur-grid::before { top: 33%; bottom: 33%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2); background: transparent; }
    .viseur-grid::after { left: 33%; right: 33%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,0.2); border-right: 1px solid rgba(255,255,255,0.2); background: transparent; }

    .collimateur-central {
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 40px; height: 30px;
        border: 2px solid rgba(255, 0, 0, 0.6);
        border-radius: 4px;
        pointer-events: none;
    }

    /* Surcouche de grain ISO */
    #viseur-bruit {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background-image: radial-gradient(rgba(255,255,255,0.4) 15%, transparent 16%);
        background-size: 3px 3px;
        opacity: 0;
        pointer-events: none;
    }

    /* Affichage OSD (On-Screen Display) façon Reflex */
    .osd-bottom {
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 10px;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(5px);
        padding: 8px 15px;
        border-radius: 6px;
        display: flex;
        justify-content: space-between;
        color: #28f128;
        font-family: 'Courier New', Courier, monospace;
        font-weight: bold;
        font-size: 1.1rem;
    }

    .posemetre {
        display: inline-block;
        letter-spacing: -2px;
    }
    .curseur-posemetre { color: #ff6600; }

    /* --- ADAPTATION MOBILE (Responsive) --- */
    @media (max-width: 768px) {
        #viseur-ecran {
            min-height: 280px;
            height: 40vh;
        }
        .osd-bottom {
            font-size: 0.75rem;
            padding: 5px 8px;
            letter-spacing: -0.5px;
        }
        .posemetre {
            letter-spacing: -1.5px;
        }
    }

    /* 1. L'Histogramme */
    #histogramme-box {
        position: absolute;
        top: 10px; right: 10px;
        width: 100px; height: 50px;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        overflow: hidden;
        backdrop-filter: blur(2px);
    }
    .histo-grid {
        position: absolute; width: 100%; height: 100%;
        display: flex; justify-content: space-between;
    }
    .histo-grid span { width: 1px; background: rgba(255,255,255,0.2); height: 100%; }
    #histo-curve {
        position: absolute; bottom: 0; left: 0;
        width: 100%; height: 80%;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
        clip-path: polygon(0% 100%, 10% 80%, 30% 20%, 50% 10%, 70% 20%, 90% 80%, 100% 100%);
        transition: transform 0.2s ease-out;
    }

    /* 2. Le Rideau de l'obturateur (Noir total) */
    #viseur-obturateur {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background-color: #000;
        z-index: 10;
        display: none;
    }

    /* 3. Le rendu Polaroïd final corrigé */
    #polaroid-box {
        background: #fff;
        padding: 15px 15px 40px 15px;
        border-radius: 2px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        transform: rotate(-2deg);
        display: inline-block;
        width: 100%;
        max-width: 350px;
    }
    #polaroid-image {
        width: 100%;
        aspect-ratio: 3 / 2;
        height: auto;
        background-repeat: no-repeat;
        background-position: center;
        background-color: #111;
        border: 1px solid #ddd;
    }
        
