/* --- CONFIGURATION GÉNÉRALE --- */
.project-page { 
    background-color: var(--bg-color);
    color: var(--text-color); 
    transition: background-color 0.4s ease, color 0.4s ease;
}

.project-body { 
    padding-top: 180px; 
}

/* Grille Suisse : 12 colonnes */
.project-intro-header, .project-section, .full-img-container {
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 5vw;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* --- HEADER FLOTTANT (UI Elements) --- */
.project-page .floating-ui .ui-element {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    background: var(--glass-bg);
}

.moon-icon { display: none !important; }
.dark-mode-active .sun-icon { display: none !important; }
.dark-mode-active .moon-icon { 
    display: block !important; 
    color: var(--accent); 
}

/* --- EN-TÊTE DU PROJET --- */
.project-intro-header { 
    margin-bottom: 80px; 
}

.project-intro-header h1 { 
    grid-column: 1 / 11;
    font-family: var(--font-title); 
    font-size: clamp(3.5rem, 8vw, 6.5rem); 
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.85;
    animation: slideUpTitle 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideUpTitle {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PUCES DE COULEUR (MORPHING) --- */
.morph-detail {
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    display: inline-block;
    margin-right: 12px;
    border-radius: 50%;
    animation: morphDetail 4s infinite alternate ease-in-out;
}

@keyframes morphDetail {
    0% { border-radius: 50%; transform: scale(1); }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(1.3) rotate(45deg); }
}

/* --- SECTIONS DE TEXTE --- */
.project-section { 
    margin-bottom: 60px; 
    align-items: start; 
}

.section-label {
    grid-column: 1 / 5; 
    font-family: var(--font-title);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    padding-top: 1.1rem;
}

.section-content { 
    grid-column: 5 / 13; 
}

.section-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    max-width: 750px;
    color: var(--text-muted);
    transition: color 0.4s ease;
}

.project-section:hover .section-content p { 
    color: var(--text-color); 
}

/* --- VISUELS --- */
.full-img-container { 
    display: block; 
    margin-bottom: 60px; 
    overflow: hidden; 
    border-radius: 60px; 
    background: transparent;
}

.full-img { 
    width: 100%; 
    height: auto;
    border-radius: 60px; 
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform: scale(1.05);
}

.full-img-container.active .full-img { 
    transform: scale(1); 
}

/* --- FOOTER & NAVIGATION --- */
.project-footer {
    padding: 100px 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid var(--glass-border);
}

.next-link {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.next-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.next-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* --- ANIMATIONS DE RÉVÉLATION --- */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: 1.2s cubic-bezier(0.19, 1, 0.22, 1); 
}

.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

/* TABLETTE (769px - 1024px) */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .project-body { padding-top: 140px; }
    
    .project-intro-header { margin-bottom: 60px; }
    
    .project-intro-header h1 { 
        grid-column: 1 / 13;
        font-size: clamp(3rem, 7vw, 5.5rem);
    }
    
    .project-section {
        margin-bottom: 50px;
    }
    
    .section-label {
        grid-column: 1 / 4;
        font-size: 0.7rem;
    }
    
    .section-content {
        grid-column: 4 / 13;
    }
    
    .section-content p {
        font-size: 1.2rem;
    }
    
    .full-img-container {
        border-radius: 40px;
        margin-bottom: 50px;
    }
    
    .full-img {
        border-radius: 40px;
    }
    
    .project-footer {
        padding: 80px 5vw;
    }
    
    .next-link {
        font-size: clamp(1.8rem, 4.5vw, 3rem);
    }
}

/* MOBILE (max 768px) */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .project-body { 
        padding-top: 100px; 
    }
    
    .project-intro-header, .project-section { 
        display: block; 
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .project-intro-header { margin-bottom: 50px; }
    
    .project-intro-header h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
        line-height: 0.9;
    }
    
    .section-label { 
        margin-bottom: 15px; 
        padding-top: 0;
        font-size: 0.65rem;
    }
    
    .section-content p {
        font-size: 1.05rem;
        line-height: 1.5;
    }
    
    .full-img-container, .full-img { 
        border-radius: 20px; 
        margin-bottom: 40px;
    }
    
    .project-footer {
        padding: 60px 20px;
    }
    
    .next-link {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }
    
    /* Spécifique aux images inline dans les projets */
    .reveal[style*="display: flex"] {
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 20px !important;
    }
    
    .reveal[style*="display: flex"] > div {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* TRÈS PETIT MOBILE (max 480px) */
@media (max-width: 480px) {
    .project-body { padding-top: 90px; }
    
    .project-intro-header, .project-section {
        padding: 0 15px;
    }
    
    .project-intro-header h1 {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }
    
    .section-label {
        font-size: 0.6rem;
        letter-spacing: 0.2em;
    }
    
    .section-content p {
        font-size: 0.95rem;
    }
    
    .full-img-container {
        margin-bottom: 30px;
    }
    
    .project-footer {
        padding: 50px 15px;
    }
    
    .next-link {
        font-size: clamp(1.3rem, 7vw, 2rem);
    }
}