/* ETS FOUNDYK & CO - Style System 2026 */

:root {
    /* Palette extraite du logo ETS FOUNDYK */
    --navy: #1E3170;           /* Bleu navy profond — fonds sombres */
    --navy-dark: #0F2251;      /* Navy ultra foncé — headers, footer bg */
    --blue-royal: #1B3B8A;     /* Bleu royal — couleur principale du texte logo */
    --turquoise: #5BC5B8;      /* Turquoise/menthe — accent principal (du symbole) */
    --turquoise-light: #89D8CE;/* Turquoise clair — accents secondaires */
    --turquoise-pastel: #E8F4F2;/* Menthe pastel — fonds de section clairs */
    --gold: #E8A838;           /* Or chaud — CTA, boutons d'action (contraste) */
    --gold-hover: #D4952E;     /* Or foncé — hover sur boutons */

    /* Aliases pour compatibilité */
    --primary-blue: #1E3170;
    --primary-orange: #5BC5B8;
    --orange: #5BC5B8;
    --f-navy: #1E3170;
    --container-padding: 1.5rem;
}

/* Expertises S3 - Column Expansion */
@media (min-width: 1024px) {
    .reveal-col:hover {
        flex: 2.5;
    }
}

/* Méthodologie M3 - Ligne SVG */
#blueprint-line {
    transition: stroke-dashoffset 2s ease-in-out;
}

/* Animations additionnelles */
.hero-frame {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-frame:hover {
    transform: scale(1.01);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--blue-royal);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--turquoise);
}

.parallax-image {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    transform: translateY(var(--parallax-offset, 0));
    opacity: 1;
    will-change: transform;
}

/* --- CORRECTION SECTION PARTENAIRES --- */
.section-partners-p4 {
    background-color: var(--navy) !important;
}

.partner-item {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-item:hover {
    transform: translateY(-10px);
}

/* Forçage des polices pour la section Trust */
.section-partners-p4 h2 {
    font-family: 'Playfair Display', serif !important;
    color: #FFFFFF !important;
}

.section-partners-p4 h4 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
}

.section-partners-p4 p {
    font-family: 'Inter', sans-serif !important;
    color: var(--turquoise) !important;
}

/* --- COMPLÉMENT POUR LA SECTION DARK RIBBON (P4) --- */

.bg-marine {
    background-color: var(--primary-blue) !important;
}

.dark-ribbon {
    position: relative;
    overflow: hidden;
}

/* Texture technique en arrière-plan */
.dark-ribbon::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background-image: radial-gradient(var(--turquoise) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Couleurs spécifiques demandées par l'utilisateur */
.text-orange-industrial {
    color: var(--primary-orange) !important;
}

.logo-item {
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.logo-item:hover {
    transform: translateY(-8px);
}

.logo-item .text-white {
    color: white !important;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

/* Surtitre blanc stylisé */
.dark-ribbon .tracking-wider {
    letter-spacing: 0.4em !important;
    color: white !important;
    font-weight: 800;
}

/* ============ SECTION EXPERTISES S3 - VERSION FINALE ============ */

.expertises-reveal-container {
    display: flex;
    width: 100%;
    height: 650px;
    gap: 0;
    overflow: hidden;
    background: var(--primary-blue);
}

.hover-reveal-column {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Image de fond */
.column-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Overlay sombre progressif (assure que le texte blanc ressort) */
.column-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(15, 33, 81, 0.1) 0%,
        rgba(15, 33, 81, 0.6) 50%,
        rgba(15, 33, 81, 0.95) 100%);
    z-index: 2;
}

.hover-reveal-column:hover .column-bg {
    transform: scale(1.1);
}

/* --- RESPONSIVE DESKTOP --- */
@media (min-width: 1024px) {
    .hover-reveal-column:hover {
        flex: 2.5; 
    }

    /* TITRES BLANCS ET TAILLE RÉDUITE SUR DESKTOP */
    .hover-reveal-column .reveal-content-wrapper h3 {
        /* Taille ajustée : plus équilibrée que le 4rem précédent */
        font-size: 2.8rem !important; 
        color: #FFFFFF !important; /* Retour au blanc pur */
        line-height: 1.1;
        margin-bottom: 20px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: -0.01em;
    }
}

/* --- CONTENU INTÉRIEUR --- */
.reveal-content-wrapper {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Style des titres par défaut (Mobile) */
.reveal-content-wrapper h3 {
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    transition: all 0.5s ease;
}

/* ICÔNES EN ORANGE (sauf celles des containers) */
.reveal-content-wrapper .reveal-content i.fas {
    color: var(--primary-orange);
}

.reveal-content {
    max-height: 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    overflow: hidden;
}

.hover-reveal-column:hover .reveal-content {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

/* Style des listes techniques */
.reveal-content ul li {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* --- MOBILE FALLBACK --- */
@media (max-width: 1023px) {
    .expertises-reveal-container {
        flex-direction: column;
        height: auto;
    }
    .hover-reveal-column {
        height: auto;
        min-height: 400px;
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .reveal-content-wrapper {
        padding: 30px 24px;
    }
    .reveal-content-wrapper h3 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    /* Sur mobile : tout le contenu est visible (pas de hover) */
    .reveal-content {
        max-height: none;
        opacity: 1;
        transform: translateY(0);
        overflow: visible;
    }
    .column-overlay {
        background: linear-gradient(to bottom,
            rgba(15, 33, 81, 0.2) 0%,
            rgba(15, 33, 81, 0.75) 40%,
            rgba(15, 33, 81, 0.95) 100%);
    }
}

/* ============ SECTION MÉTHODOLOGIE M3 - RE-DESIGN ============ */

#methodologie {
    background-color: var(--navy);
}

/* Grille blueprint plus fine */
.blueprint-grid {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(91, 197, 184, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 197, 184, 0.3) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Cartes techniques style "Fiche de calcul" */
.blueprint-card {
    position: relative;
    background: rgba(15, 33, 81, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 0; /* Aspect plan industriel plus carré */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mires aux coins (Crosshairs) */
.blueprint-card::before, .blueprint-card::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--orange);
    opacity: 0;
    transition: all 0.5s ease;
}
.blueprint-card::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.blueprint-card::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }

.blueprint-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
}

.blueprint-card:hover::before, .blueprint-card:hover::after {
    opacity: 1;
    transform: scale(1.2);
}

/* Ligne SVG animée */
.path-connection {
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 3s ease-in-out;
}

.line-draw-active .path-connection {
    stroke-dashoffset: 0;
}

.step-label {
    font-family: 'Montserrat', sans-serif;
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

/* ============ SECTION RÉALISATIONS R5 : BENTO GRID ============ */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 1.5rem;
}

/* Variantes de tailles des tuiles */
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide  { grid-column: span 2; grid-row: span 1; }
.bento-tall  { grid-column: span 1; grid-row: span 2; }
.bento-square { grid-column: span 1; grid-row: span 1; }

.bento-item {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover {
    transform: scale(0.98);
}

/* Tuile avec image de fond */
.bento-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.8s ease;
}

.bento-item:hover .bento-bg-img {
    transform: scale(1.1);
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 33, 81, 0.2), rgba(15, 33, 81, 0.85));
    z-index: 2;
}

.bento-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

/* Chiffres massifs (Montserrat) */
.bento-stat {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

/* Tuile "Glass" (Blanc translucide) */
.bento-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
        grid-auto-rows: auto;
        gap: 1rem;
    }
    .bento-item {
        min-height: 220px;
        border-radius: 1.2rem;
    }
    .bento-stat {
        font-size: 3rem !important;
    }
    .bento-content {
        padding: 1.5rem;
    }
    /* Desactiver le hover scale sur tactile */
    .bento-item:hover {
        transform: none;
    }
    .bento-item:hover .bento-bg-img {
        transform: none;
    }
}

/* Desactiver tous les hover cosmetiques sur tactile */
@media (hover: none) and (pointer: coarse) {
    .bento-item:hover { transform: none; }
    .bento-item:hover .bento-bg-img { transform: none; }
    .blueprint-card:hover { transform: none; border-color: rgba(255,255,255,0.1); }
    .blueprint-card:hover::before,
    .blueprint-card:hover::after { opacity: 0; }
    .hero-frame:hover { transform: none; }
    .partner-item:hover { transform: none; }
    .logo-item:hover { transform: none; }
}

/* ============ FUSION ENGAGEMENT & EXPERTISE ============ */

#engagement-expertise {
    background-color: var(--navy);
}

/* Style spécifique pour l'accordéon technique */
details summary::-webkit-details-marker {
    display: none;
}

details {
    transition: all 0.3s ease-out;
}

details[open] {
    border-color: var(--orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#engagement-expertise .step-label {
    margin-bottom: 2rem;
}

/* Effet de lueur sur la citation du fondateur */
.blur {
    filter: blur(24px);
}

/* Style Photo DG */
.grayscale {
    filter: grayscale(100%);
}

.grayscale:hover {
    filter: grayscale(0%);
}

#engagement-expertise blockquote {
    font-family: 'Playfair Display', serif; /* Donne un côté institutionnel et sérieux */
    border-left: 3px solid var(--orange);
    padding-left: 1.5rem;
}

/* ============ SECTION 6 - RÉGLAGE FINAL ============ */

#engagement-expertise details summary {
    padding: 1.25rem; /* Taille "parfaite" d'origine */
}

#engagement-expertise details {
    margin-bottom: 0.75rem; /* Espacement serré et pro */
}

#engagement-expertise details[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-orange);
}

/* ============ SECTION CONTACT C3 - MISE À JOUR ALIGNEMENT ============ */

#contact {
    background-color: var(--navy) !important; /* Marine strict */
}

/* On s'assure que le container n'est pas surchargé de padding Tailwind */
#contact .container {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.industrial-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 0;
    font-size: 0.9rem;
    color: var(--navy);
    transition: all 0.3s ease;
}

.industrial-input:focus {
    border-color: var(--turquoise);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(91, 197, 184, 0.1);
}

/* Les mires orange pour le style Bureau d'Études */
#contact .blueprint-card::before, 
#contact .blueprint-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--orange);
    z-index: 5;
}
#contact .blueprint-card::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
#contact .blueprint-card::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* ============ FOOTER - STYLE SYSTEM (NAVY DARK) ============ */

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    padding-left: 0;
}

.footer-link:hover {
    padding-left: 10px;
    color: var(--turquoise);
}

/* ============================================
   ANIMATION INDUSTRIELLE - Section Expertises
   ============================================ */

.industrial-bg-animation {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.15;
    pointer-events: none;
    will-change: opacity;
    contain: strict;
}

/* Grille de base */
.industrial-bg-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(27, 59, 138, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(27, 59, 138, 0.12) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    will-change: transform;
}

/* Lignes diagonales animées */
.industrial-bg-animation::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 100px,
            rgba(91, 197, 184, 0.12) 100px,
            rgba(91, 197, 184, 0.12) 102px
        );
    animation: diagonalMove 15s linear infinite;
    will-change: transform;
}

/* Animation de la grille */
@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Animation des lignes diagonales */
@keyframes diagonalMove {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(100px);
    }
}

/* Points lumineux animés (effet circuits) */
.industrial-bg-animation {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(91, 197, 184, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(27, 59, 138, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(91, 197, 184, 0.08) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
}

/* Animation de pulsation */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.2;
    }
}

/* Responsive - Réduire l'animation sur mobile */
@media (max-width: 768px) {
    .industrial-bg-animation {
        opacity: 0.08;
    }

    .industrial-bg-animation::before {
        animation-duration: 30s;
    }

    .industrial-bg-animation::after {
        animation-duration: 25s;
    }
}

/* ============ MOBILE GLOBAL OPTIMIZATIONS ============ */
@media (max-width: 768px) {

    /* Section Contact */
    #contact .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #contact .blueprint-card {
        padding: 1.5rem;
    }
    .industrial-input {
        font-size: 16px; /* Empeche le zoom auto iOS sur focus */
        padding: 0.75rem;
    }

    /* Section DG / Engagement */
    #engagement-expertise .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #engagement-expertise blockquote {
        font-size: 1rem;
        line-height: 1.6;
    }
    /* Photo DG - toujours en couleur sur mobile (pas de hover) */
    #engagement-expertise img.grayscale {
        filter: none;
    }

    /* Accordeons - plus grands pour le touch */
    #engagement-expertise details summary {
        padding: 1rem;
        min-height: 48px;
    }

    /* Methodologie cards */
    .blueprint-card {
        padding: 1.5rem;
    }

    /* Footer orange */
    footer .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Section map - pleine largeur et visible */
    #contact .h-72 {
        filter: none;
        opacity: 1;
    }
}

