/* ==========================================================================
   1. RESET & BASICS
   ========================================================================== */
html {
    scroll-behavior: smooth;   
    overflow-x: hidden; /* Empêche le défilement horizontal à la racine */
    overscroll-behavior-x: none; /* Bloque l'effet élastique gauche/droite sur mobile */
    width: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0d0d0e; /* Anthracite studio profond */
    color: #f4f4f5;            
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Sécurité pour le flou du header et les débordements */
    width: 100%;
    position: relative;
    overscroll-behavior-x: none; 
}

/* ==========================================================================
   2. HEADER & NAVIGATION (VERSION GRADIENT AVEC FONDUS AU NOIR ULTRA-PROGRESSIFS)
   ========================================================================== */
/* Élément de lueur inséré en arrière-plan du header */
.header-bg-glow {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%; 
    
    /* FONDUS PROGRESSIFS : 
       - De 0% à 15% : extinction totale vers le noir de l'arrière-plan.
       - Du centre gauche au centre droit (35% à 75%) : la transition chromatique Bleu -> Violet -> Magenta -> Orange.
       - De 85% à 100% : retour en douceur vers le noir absolu.
    */
    background: linear-gradient(90deg, 
        rgba(13, 13, 14, 0) 0%,         /* Noir/Transparent total à gauche */
        rgba(0, 68, 204, 0.1) 15%,      /* Entrée très discrète du bleu */
        rgba(0, 68, 204, 0.45) 35%,     /* Bleu électrique affirmé */
        rgba(103, 58, 183, 0.35) 50%,   /* Violet mystique central */
        rgba(197, 17, 98, 0.4) 65%,     /* Magenta vibrant */
        rgba(255, 112, 67, 0.45) 80%,    /* Orange ambré bien présent */
        rgba(255, 112, 67, 0.1) 90%,    /* Extinction rapide de l'orange */
        rgba(13, 13, 14, 0) 100%        /* Noir/Transparent total à droite */
    );
    
    /* Le flou à 30px se charge de lisser parfaitement ces transitions */
    filter: blur(30px);
    z-index: -1; 
    pointer-events: none; 
}

header {
    display: flex;
    flex-direction: column;   
    justify-content: center; 
    align-items: center;
    gap: 1.8rem;              
    padding: 3.5rem 2rem 4.5rem 2rem; 
    position: sticky; /* Reste à l'écran sur PC */
    top: 0;
    /* Rendu transparent pour laisser transparaître le dégradé flouté .header-bg-glow juste derrière */
    background-color: rgba(13, 13, 14, 0.15); 
    /* Effet verre dépoli qui fusionne magnifiquement les couleurs du dégradé */
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px); 
    z-index: 1000; /* Assure que le header reste au-dessus de tout le reste */
    transition: padding 0.3s ease, background-color 0.3s ease;
    width: 100%;
}

/* Structure interne du bloc Logo (Alignement horizontal) */
header .logo {
    display: flex;
    align-items: center;
    gap: 40px;                /* Plus d'espace pour séparer le kanji géant des textes */
}

/* Le Kanji "響" - IMPOSANT (Format doublé) */
header .logo-icon {
    font-family: "Yu Mincho", "MS Mincho", 'Noto Sans JP', serif;
    font-weight: 700;
    font-size: 5.8rem;        /* Poussé au maximum pour un effet blason/emblème ultra-puissant */
    color: #ffffff;
    line-height: 0.85;        /* Hauteur de ligne serrée pour éviter de déborder en hauteur */
    opacity: 0.95;
    border-right: 3px solid rgba(255, 255, 255, 0.2); /* Ligne un poil plus épaisse pour équilibrer */
    padding-right: 40px;
}

/* Conteneur des textes du logo */
header .logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* SECTOR 6 - FORMAT MAXI */
header .logo-text .sector6-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 800;
    font-size: 3.2rem;        /* Augmenté massivement pour un rendu cinématique lourd */
    letter-spacing: 6px;      /* Lettres encore plus ouvertes */
    color: #ffffff;
    line-height: 1.0;
    text-transform: uppercase;
}

/* AUDIO LAB - AJUSTÉ AU DISPOSITIF GÉANT */
header .logo-text span:last-child {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300; 
    font-size: 1.15rem;       /* Plus grand pour rester proportionnel au titre */
    letter-spacing: 16.5px;   /* Écartement large pour s'aligner parfaitement sous le grand SECTOR 6 */
    color: #a0a0a0; 
    margin-top: 12px;
    text-transform: uppercase;
}

/* Menu de navigation - TAILLE PRÉCÉDENTE CONSERVÉE */
header nav ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 3rem;                
    list-style: none;
    flex-wrap: nowrap; /* Empêche nativement le retour à la ligne */
}

nav ul li a {
    color: #b0b0b5;           /* Gris clair lumineux pour contrasté avec le fond mouvant */
    text-decoration: none;    
    font-size: 1.15rem;       
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;      
    /* Ombre discrète mais puissante pour détacher le texte des images en arrière-plan */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); 
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffffff;           
}

/* ==========================================================================
   3. STRUCTURES & SECTIONS GENERALES
   ========================================================================== */
.section-title {
    font-family: 'Syncopate', sans-serif; 
    font-size: 2rem;               
    font-weight: 800;              
    text-transform: uppercase;     
    letter-spacing: 4px;           
    color: #ffffff;
    text-align: center;            
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: #a1a1aa;     
    margin: 1rem auto 0 auto;      
    opacity: 0.5;
}

/* Hero Section */
.hero {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    max-width: 900px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    color: #a1a1aa;
}

/* ==========================================================================
   3b. BLOC MANIFESTE FILOSOPHIQUE BILINGUE (HAUTEUR D'ÉCRAN RE-STABILISÉE)
   ========================================================================== */
.services-manifesto {
    text-align: center;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 950px;            
    margin: 0 auto;
    margin-top: -120px; 
    padding: 0 30px;
    box-sizing: border-box;
}

/* 1. L'accroche principale : impactante et aérée */
.services-manifesto .manifesto-en {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.45rem;           
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 5px;        
    line-height: 1.5;
    margin-bottom: 16px; 
    text-transform: uppercase;
}

/* 2. Le sous-titre japonais : plus grand et plus lumineux */
.services-manifesto .manifesto-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.6rem;           
    font-weight: 300;            
    color: #a1a1aa;              
    letter-spacing: 6px;         
    margin-top: 10px;
    margin-bottom: 60px; 
}

/* 3. Le paragraphe introductif : lisible, posé et élégamment séparé */
.services-manifesto .manifesto-intro {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.25rem;           
    font-weight: 300;            
    line-height: 1.8;            
    color: #d4d4d8;              
    letter-spacing: 0.6px;
    max-width: 760px;            
    margin: 0 auto;
    position: relative;
    padding-top: 40px;          
}

/* Ligne de séparation géométrique minimale */
.services-manifesto .manifesto-intro::before {
    content: '';
    display: block;
    width: 35px; 
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================================================
   4. SECTION SERVICES (OUR EXPERTISE)
   ========================================================================== */
section#services,
.services {
    width: 100%;
    max-width: 1800px;   
    margin: 140px auto 100px auto; /* Marge globale nettoyée */  
    padding: 0 25px;     
    scroll-margin-top: 180px; /* Ajusté pour le scroll mobile */
}

section#services .section-title {
    margin-top: 0rem;              
    margin-bottom: 3rem;           
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem;
    width: 100%;
    margin-top: 40px;    
}

.service-card {
    padding: 2.5rem 1.5rem;               
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #ffffff;
}

.service-card p {
    color: #a1a1aa;
    font-size: 0.95rem;
}

/* Couleurs des cartes d'expertise */
.services-grid .service-card:nth-child(1) { background-color: #08111a; border: 1px solid #10263b; }
.services-grid .service-card:nth-child(1):hover { background-color: #0c1a29; border-color: #245585; box-shadow: 0 10px 30px rgba(16, 38, 59, 0.5); }

.services-grid .service-card:nth-child(2) { background-color: #120d1c; border: 1px solid #241938; }
.services-grid .service-card:nth-child(2):hover { background-color: #1a1329; border-color: #513780; box-shadow: 0 10px 30px rgba(36, 25, 56, 0.5); }

.services-grid .service-card:nth-child(3) { background-color: #170b14; border: 1px solid #33152c; }
.services-grid .service-card:nth-child(3):hover { background-color: #24111f; border-color: #702e61; box-shadow: 0 10px 30px rgba(51, 21, 44, 0.5); }

.services-grid .service-card:nth-child(4) { background-color: #0b1612; border: 1px solid #163224; }
.services-grid .service-card:nth-child(4):hover { background-color: #0f1e19; border-color: #2b6146; box-shadow: 0 10px 30px rgba(22, 50, 36, 0.5); }

/* ==========================================================================
   5. SECTION PORTFOLIO (OUR TEAM WORKED ON)
   ========================================================================== */
section#portfolio, 
.portfolio {
    width: 100%;
    max-width: 1800px;   
    margin: 250px auto 100px auto; /* COPIE EXACTE : Même logique, mais plus d'espace au-dessus */  
    padding: 0 25px;  
    scroll-margin-top: 180px;    
}

/* Alignement et espacement du trait strictement identique à Expertise */
section#portfolio .section-title {
    margin-top: 0rem;              
    margin-bottom: 3rem;           
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;      
    width: 100%;
}

.video-container.visual-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 22px;     
}

.video-container.visual-facade img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; 
    transition: transform 0.4s ease;
}

.project-card:hover .visual-facade img {
    transform: scale(1.03);
}

.video-container.visual-facade iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 3; 
}

.visual-facade .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 45px;
    background-color: rgba(239, 68, 68, 0.9); 
    border-radius: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.visual-facade:hover .play-button {
    background-color: #ef4444;
    transform: translate(-50%, -50%) scale(1.08);
}

.visual-facade .play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #ffffff;
}

.project-card h3 {
    font-size: 1.25rem;      
    font-weight: 400;        
    margin: 0 0 18px 0;      
    color: #ffffff;
    text-align: center;      
    line-height: 1.3;
}

.project-card ul {
    list-style-type: disc;
    padding-left: 18px;      
    margin: 0;
    align-self: stretch;     
    text-align: left;        
}

.project-card ul li {
    font-size: 0.8rem;       
    line-height: 1.6;        
    color: #9c9c9c;          
    margin-bottom: 6px;      
}

.project-card ul li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   6. SECTION LOGOS OUTILS (TECH STACK)
   ========================================================================== */
.tech-stack-section {
    padding: 80px 20px 20px 20px; 
    background-color: transparent; 
    text-align: center;
}

.tech-logos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 50px;                     
    max-width: 1300px;             
    margin: 60px auto 40px auto !important; 
    align-items: center;
    justify-content: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.65;                 
}

.tech-item:hover {
    transform: translateY(-6px);   
    opacity: 1;                    
}

.tech-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.tech-item img {
    width: 100%;
    max-width: 150px;        
    height: 65px;            
    object-fit: contain;     
    filter: brightness(0) invert(1); 
    margin-bottom: 10px;
}

/* ==========================================================================
   7. CONTACT & FOOTER
   ========================================================================== */
section#contact,
#contact {
    width: 100%;
    max-width: 900px;
    margin: 140px auto 100px auto !important; 
    padding: 0 40px;         
    text-align: center !important; 
    display: flex;
    flex-direction: column;
    align-items: center;           
    justify-content: center;
    scroll-margin-top: 240px;
}

#contact h2 {
    font-family: 'Syncopate', sans-serif; 
    font-size: 2.2rem;       
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 20px;
    color: #ffffff;
}

#contact p:not(:last-of-type) {
    font-size: 1.15rem;
    color: #a1a1aa;          
    margin-bottom: 40px; 
    font-weight: 300;
    letter-spacing: 0.5px;
}

#contact .email-link {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.1rem;       
    font-weight: 500;
    color: #ffffff !important; 
    text-decoration: none;   
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.25); 
    padding: 16px 40px;
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact .email-link:hover {
    color: #0d0d0e !important; 
    background-color: #ffffff;  
    border-color: #ffffff;
    transform: translateY(-2px); 
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1); 
}

footer {
    width: 100%;
    margin-bottom: 50px;
}

footer p {
    font-size: 0.8rem;
    color: #444446; 
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase; 
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 45px 25px;
    }
    .portfolio {
        padding: 0 30px;
    }
    .tech-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    header {
        position: sticky !important; /* Maintient fermement le header visible */
        top: 0 !important;
        background-color: rgba(13, 13, 14, 0.85); /* Un peu plus opaque pour le scroll mobile */
        padding: 1.6rem 1.2rem 1.8rem 1.2rem !important; /* Format large et affirmé demandé */
        gap: 1.4rem !important; 
        width: 100%;
    }
    
    header .logo {
        display: flex !important;
        flex-direction: row !important;
        gap: 25px !important;
        justify-content: center !important;
        width: 100%;
    }

    header .logo-icon {
        font-size: 3.4rem !important; /* Impact visuel du Kanji restauré */
        padding-right: 25px !important;
        border-right: 3px solid rgba(255, 255, 255, 0.2) !important;
    }

    header .logo-text .sector6-title {
        font-size: 1.8rem !important;
        letter-spacing: 3px !important;
    }

    header .logo-text span:last-child {
        font-size: 0.8rem !important;
        letter-spacing: 5px !important;
        margin-top: 4px !important;
    }

    /* CORRECTION ICI : "header nav ul" sans point pour hériter de la priorité */
    header nav ul {
        gap: 1.4rem !important; /* Écartement serré et harmonieux sur une ligne */
        flex-wrap: nowrap !important; /* Interdiction formelle de passer à la ligne */
        display: flex !important;
        flex-direction: row !important;
    }
    
    header nav ul li a {
        font-size: 0.85rem !important; 
        letter-spacing: 1px !important;
    }
    
    .services-manifesto {
        min-height: auto;
        padding: 60px 20px;
        margin-top: 0;
    }
    .services-manifesto .manifesto-en { font-size: 1.1rem; }
    .services-manifesto .manifesto-jp { font-size: 1.2rem; margin-bottom: 30px; }
    .services-manifesto .manifesto-intro { font-size: 1rem; }
}

@media (max-width: 650px) {
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .portfolio {
        margin: 50px auto;
        padding: 0 20px;
    }
    .tech-logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Optimisation stricte pour les smartphones (écrans types iPhone / Android) */
@media (max-width: 480px) {
    header {
        padding: 1.4rem 1rem 1.5rem 1rem !important; /* Hauteur confortable */
        gap: 1rem !important;
    }

    header .logo {
        gap: 18px !important;
    }
    header .logo-icon {
        font-size: 2.8rem !important; /* Taille imposante préservée */
        padding-right: 18px !important;
    }
    header .logo-text .sector6-title {
        font-size: 1.45rem !important;
        letter-spacing: 2px !important;
    }
    header .logo-text span:last-child {
        font-size: 0.68rem !important;
        letter-spacing: 3.5px !important;
        margin-top: 3px !important;
    }
    
    header nav ul {
        gap: 0.9rem !important; /* Rapprochement précis des 4 liens pour le format compact */
    }
    header nav ul li a {
        font-size: 0.75rem !important; 
        letter-spacing: 0.5px !important;
    }
}