/* ============================================
   NUIT + NUAGES — thème sombre "ciel nocturne"
   Pour utiliser une image IA de ciel à la place :
   remplacez simplement l'URL ci-dessous.
   ============================================ */

:root {
    --sky-top: #04060e;
    --sky-mid: #0a1024;
    --sky-bottom: #101733;
}

body {
    background-color: var(--sky-top);
    color: #EDEDED;
    /* Image de ciel nocturne générée par IA — assombrie et fondue vers le bas
       pour garantir la lisibilité du contenu. Remplacez Assets/sky-night.jpg
       par votre propre image si besoin. */
    background-image:
        linear-gradient(180deg, rgba(4, 6, 14, 0.55) 0%, rgba(4, 6, 14, 0.45) 40%, rgba(10, 16, 36, 0.85) 100%),
        url('Assets/sky-night.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Halo lumineux derrière le hero */
.hero-glow {
    position: absolute;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 120vw);
    height: 500px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(96, 165, 250, 0.16) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

/* Anti-débordement mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

img, video {
    max-width: 100%;
}

@media (max-width: 640px) {
    .hero-glow {
        width: 130vw;
        height: 340px;
        top: -160px;
    }
    body {
        background-attachment: scroll;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--sky-top); }
::-webkit-scrollbar-thumb { background: #2a3350; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a466e; }

/* Fade in animation */
.fade-in { animation: fadeIn 0.6s ease-in-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Nav pilulaire glassmorphism */
.nav-pill {
    background: rgba(13, 18, 38, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Card media container */
.card-media-container {
    aspect-ratio: 16 / 9;
    background-color: #0a0e1c;
    width: 100%;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(60% 60% at 50% 40%, #121a33 0%, #0a0e1c 100%);
}

.card-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .card-media {
    transform: scale(1.05);
}

/* Featured project grid */
.featured-project {
    grid-column: span 1 / span 1;
}

@media (min-width: 768px) {
    .featured-project {
        grid-column: span 2 / span 2;
    }
}

/* Placeholder container */
.placeholder-container {
    aspect-ratio: 16 / 9;
    background-color: #0d1226;
    background:
        radial-gradient(60% 60% at 50% 40%, #121a33 0%, #0d1226 100%);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #5a6488;
    text-align: center;
    padding: 20px;
}

.placeholder-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Portrait video container */
.portrait-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background-color: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portrait-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-video-container .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portrait-video-container:hover .play-overlay {
    opacity: 1;
}

.portrait-video-container .play-overlay svg {
    width: 24px;
    height: 24px;
    fill: #0a0e1c;
    margin-left: 3px;
}
