/* --- CONFIGURATION --- */
:root {
    --bg-dark: #0f0505;
    --bg-gradient-start: #2c0005; 
    --bg-gradient-end: #5a0015;   
    --accent-pink: #ff4d6d;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    
    /* Pour la carte d'infos blanche */
    --card-bg: #ffffff;
    --card-text: #333333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-white);
    background: radial-gradient(circle at top center, var(--bg-gradient-end), var(--bg-dark) 70%);
    background-color: var(--bg-dark);
    line-height: 1.6;
    padding-bottom: 50px;
}

/* --- BOUTON RETOUR --- */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
    z-index: 10;
}
.back-button:hover { color: var(--accent-pink); }

/* --- HERO SECTION --- */
.project-hero {
    height: 60vh; /* Prend 60% de la hauteur de l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    /* Image de fond optionnelle, assombrie */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://via.placeholder.com/1920x1080'); 
    background-size: cover;
    background-position: center;
}

.project-tag {
    display: inline-block;
    background-color: var(--accent-pink);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.project-tagline {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* --- CONTENEUR PRINCIPAL --- */
.case-study {
    max-width: 900px; /* Largeur de lecture confortable */
    margin: -50px auto 0; /* Remonte légèrement sur le Hero */
    padding: 0 20px;
    position: relative;
}

/* --- CARTE INFOS (Style "Expériences" blanc) --- */
.info-card {
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 60px;
}

.info-item {
    flex: 1;
    min-width: 150px;
}

.info-item h3 {
    font-size: 0.9rem;
    color: var(--accent-pink);
    margin-bottom: 5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item p, .info-item a {
    font-weight: 600;
    font-size: 1rem;
    color: #222;
    text-decoration: none;
}

.info-item a:hover { text-decoration: underline; }

/* --- CONTENU TEXTE --- */
.content-block {
    margin-bottom: 60px;
}

.content-block h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-pink); /* Titres en rose/rouge */
}

.content-block p {
    font-size: 1.1rem;
    color: #ddd;
    margin-bottom: 20px;
}

/* --- GALERIE MOODBOARD --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* --- VIDEO --- */
.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
}

.fake-video {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    background: #111;
}

.fake-video i { font-size: 3rem; margin-bottom: 10px; }

iframe { width: 100%; height: 100%; border: none; }

/* --- FOOTER --- */
footer {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 50px;
}
footer a { color: var(--text-gray); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .project-hero { height: 50vh; }
    .hero-content h1 { font-size: 2.5rem; }
    .info-card { flex-direction: column; }
    .back-button { top: 20px; left: 20px; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 5px;}
}

/* --- SECTION RENDU FINAL --- */

.final-render {
    text-align: center;
    margin-bottom: 100px;
}

/* --- LE LAPTOP (CSS PUR) --- */
.laptop-wrapper {
    max-width: 800px;
    margin: 40px auto 60px;
    position: relative;
}

/* L'écran (La partie noire autour de l'image) */
.laptop-screen {
    background-color: #111;
    border-radius: 12px 12px 0 0;
    padding: 3%; /* Bordure noire de l'écran */
    box-shadow: 0 0 0 2px #333; /* Contour gris subtil */
    position: relative;
}

/* La zone visible de l'image (Fenêtre) */
.laptop-screen {
    /* On définit une hauteur fixe pour simuler la fenêtre */
    height: 450px; 
    overflow-y: auto; /* Permet de scroller l'image à l'intérieur ! */
    overflow-x: hidden;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--accent-pink) #222;
}

/* Personnalisation de la barre de défilement (Chrome/Safari) */
.laptop-screen::-webkit-scrollbar {
    width: 8px;
}
.laptop-screen::-webkit-scrollbar-track {
    background: #222;
}
.laptop-screen::-webkit-scrollbar-thumb {
    background-color: var(--accent-pink);
    border-radius: 4px;
}

/* L'image à l'intérieur */
.laptop-screen img {
    display: block;
    width: 100%;
    height: auto;
}

/* La base du clavier (le bas du laptop) */
.laptop-base {
    background-color: #222; /* Gris foncé métallique */
    height: 25px;
    width: 110%; /* Plus large que l'écran */
    margin-left: -5%; /* Centrer la base */
    border-radius: 0 0 15px 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); /* Ombre portée au sol */
}

/* Petite encoche pour ouvrir le laptop (détail purement esthétique) */
.laptop-base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background-color: #333;
    border-radius: 0 0 5px 5px;
}

/* --- VERSION MOBILE --- */
.mobile-previews h3 {
    margin: 40px 0 20px;
    font-size: 1.5rem;
    color: var(--text-white);
}

.mobile-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.mobile-frame {
    width: 200px; /* Taille réaliste mobile */
    border-radius: 20px;
    border: 8px solid #222; /* Bordure téléphone */
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.mobile-frame:hover {
    transform: translateY(-10px);
}

/* --- MODAL IMAGES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Fond un peu plus sombre */
    
    /* Centrage parfait avec Flexbox */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Classe pour bloquer le scroll du body */
body.modal-open {
    overflow: hidden;
}

.modal-content {
    margin: 0;
    display: block;
    max-width: 90%;
    max-height: 75vh; /* Un peu moins haut pour laisser de la place au texte */
    border-radius: 10px;
    animation-name: zoom;
    animation-duration: 0.6s;
    object-fit: contain;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001; /* S'assure qu'elle est au-dessus */
}

.close-modal:hover {
    color: var(--accent-pink);
}

#caption {
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 1.1rem;
}

/* Curseur sur les images de la galerie */
.gallery-item img {
    cursor: pointer;
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}