/* --- Variables & Reset --- (Inchangé) */
:root {
    --bg-color: #f0f8ff;
    --surface-color: #e0f2fe;
    --text-color: #1e293b;
    --text-light: #475569;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    /* Nouvelles variables pour le jeu */
    --game-snake-color: #10b981; /* Vert Émeraude */
    --game-food-color: #ef4444;  /* Rouge vibrant */
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* --- Typographie & Liens --- (Inchangé) */
h1, h2, h3 { margin-bottom: 1rem; }
h2 { text-align: center; font-size: 2.5rem; color: var(--primary-color); margin-bottom: 3rem; }
a { text-decoration: none; color: inherit; }
p { line-height: 1.6; color: var(--text-light); }

/* --- Navigation --- (Inchangé) */
header { position: fixed; top: 0; width: 100%; background-color: rgba(240, 248, 255, 0.9); backdrop-filter: blur(10px); z-index: 1000; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary-color); }

/* --- Sections Générales --- (Inchangé) */
section { min-height: 100vh; padding: 6rem 5% 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: 1200px; margin: 0 auto; }

/* --- Composants (Inchangé) --- */
.btn { display: inline-block; padding: 0.8rem 2rem; background-color: var(--primary-color); color: white; border-radius: 30px; font-weight: 600; margin-top: 1.5rem; transition: background-color 0.3s, transform 0.3s; }
.btn:hover { background-color: var(--primary-hover); transform: translateY(-3px); }
.highlight { color: var(--primary-color); }

/* --- Mise à jour de la grille --- */
.project-grid {
    display: flex;
    flex-direction: column; /* Une carte par ligne */
    gap: 2.5rem;
    width: 100%;
    max-width: 900px; /* Garde la largeur contenue pour l'élégance */
    margin: 0 auto;
}

.project-card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%; /* Prend toute la largeur du parent */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* --- Layout interne du Jeu --- */
.interactive-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-height: 550px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* Espace entre les infos et le canvas */
    width: 100%;
}

.game-info {
    text-align: center;
}

#snakeCanvas {
    background-color: #1e293b;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Responsive */
    height: auto;
    display: none; /* Apparaît au clic */
}

/* État actif */
.interactive-game.playing #snakeCanvas {
    display: block;
}

.interactive-game.playing .game-instruction {
    display: none;
}

.score-container {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

/* États quand le jeu est actif (gérés par JS) */
.interactive-game.playing #snakeCanvas { display: block; }
.interactive-game.playing .game-overlay h3,
.interactive-game.playing .game-instruction { display: none; }
.interactive-game.playing .score-display { display: block; }
.interactive-game.playing .game-overlay { position: absolute; top: 10px; left: 10px; text-align: left; }


/* --- Footer & Animations --- (Inchangé) */
footer { text-align: center; padding: 2rem; background-color: var(--surface-color); margin-top: 4rem; }
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }



/* --- Style du Projet Vidéo --- */
.video-project {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-container video {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

/* Effet de zoom léger au survol */
.video-container:hover video {
    transform: scale(1.02);
}

/* Overlay avec l'icône Play */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.play-icon {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.video-container:hover .play-icon {
    transform: scale(1.2);
    opacity: 1;
}

/* Cacher l'overlay quand la vidéo tourne */
.video-container.is-playing .video-overlay {
    opacity: 0;
    pointer-events: none;
}


.slider-container {
    position: relative;
    width: 100%;
    /* On définit une hauteur minimale pour garder une cohérence visuelle */
    min-height: 615px; 
    /* Ou "aspect-ratio: 4/3;" si vous voulez un format fixe moderne */
    background-color: #1a1a1a; /* Fond sombre pour les photos avec des formats différents */
    overflow: hidden;
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* "contain" permet de voir l'image ENTIÈRE sans la recadrer */
    object-fit: contain; 
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* On stylise les points pour qu'ils ne cachent pas le bas de l'image */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}



.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Boutons de navigation du Carrousel */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    border-radius: 50%;
    transition: 0.3s;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
    background: var(--highlight-color, #007bff);
}

.dot { cursor: pointer; }

/* Style pour le projet Enseigne XXL */
.light-box-preview {
    width: 100%;
    height: 200px;
    background: #050505;
    border-radius: 8px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.led-effect {
    width: 80%;
    height: 10px;
    background: #fff;
    box-shadow: 0 0 20px #fff, 0 0 40px #ff0055, 0 0 60px #ff0055;
    animation: neon-flicker 2s infinite;
}

.download-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #000; /* Noir comme votre thème */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #333;
}





@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}
