/* ==========================================================================
   TECHNICURIEUX - CSS GLOBAL
   Architecture : Custom Flat-File CMS
   ========================================================================== */

/* --- 1. VARIABLES (Charte Graphique & Glassmorphism) --- */
:root {
    --tc-primary: #33b5a5;
    --tc-primary-dark: #14715f;
    --tc-accent: #442064;
    --tc-dark: #1d1d1b;
    --tc-gray: #4b5563;
    --tc-light-gray: #f3f4f6;
    --tc-light: #f9fafb;
    --tc-white: #ffffff;
    
    /* Variables effet Glassmorphism macOS */
    --glass-bg-light: rgba(255, 255, 255, 0.65);
    --glass-bg-dark: rgba(29, 29, 27, 0.70);
    --glass-border-light: 1px solid rgba(255, 255, 255, 0.4);
    --glass-border-dark: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: 8px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);

    --font-title: 'Quicksand', sans-serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 35px rgba(51, 181, 165, 0.15);
    --radius: 12px;
}

/* --- 2. RESET & BASES --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--tc-dark); line-height: 1.7; background-color: var(--tc-light); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* --- 3. LAYOUT & UTILITAIRES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; }
.bg-white { background-color: var(--tc-white); }
.bg-light { background-color: var(--tc-light-gray); }

.section-title { font-family: var(--font-title); font-size: 2.5rem; text-align: center; margin-bottom: 70px; color: var(--tc-dark); position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--tc-primary); margin: 20px auto 0; border-radius: 2px; }

.btn-primary { background-color: var(--tc-primary); color: var(--tc-white) !important; padding: 14px 32px; border-radius: 50px; font-weight: 600; display: inline-block; border: 2px solid var(--tc-primary); box-shadow: var(--shadow-md); cursor: pointer; }
.btn-primary:hover { background-color: var(--tc-primary-dark); border-color: var(--tc-primary-dark); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-outline { background-color: transparent; color: var(--tc-primary) !important; padding: 14px 32px; border-radius: 50px; font-weight: 600; display: inline-block; border: 2px solid var(--tc-primary); cursor: pointer; }
.btn-outline:hover { background-color: var(--tc-primary); color: var(--tc-white) !important; }

/* --- 4. HEADER & NAVIGATION --- */
header { 
    background-color: var(--glass-bg-light); 
    -webkit-backdrop-filter: blur(var(--glass-blur)); 
    backdrop-filter: blur(var(--glass-blur)); 
    border-bottom: var(--glass-border-light);
    box-shadow: var(--glass-shadow); 
    position: -webkit-sticky; 
    position: sticky; 
    top: 0; 
    z-index: 900; 
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo a { font-family: var(--font-title); font-size: 1.5rem; font-weight: bold; color: var(--tc-primary-dark); display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }
.main-nav > ul { display: flex; gap: 32px; align-items: center; }
.main-nav a { font-weight: 500; font-size: 0.95rem; color: var(--tc-gray); }
.main-nav a:hover { color: var(--tc-primary); }
.main-nav .btn-primary { color: var(--tc-white); padding: 10px 24px; box-shadow: none; }

.burger-toggle { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; background: transparent; border: none; cursor: pointer; }
.burger-toggle span { display: block; width: 100%; height: 3px; background-color: var(--tc-primary-dark); border-radius: 3px; transition: all 0.3s ease; }

/* --- 5. HERO SECTION --- */
.hero-section {
    position: relative;
    padding: 140px 0 120px;
    background-color: var(--tc-dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--tc-white);
    text-align: center;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(29,29,27,0.92) 0%, rgba(42,42,40,0.85) 100%);
    opacity: 0; 
    animation: heroBgBlur 1s ease-in-out 1s both;
}

@keyframes heroBgBlur {
    0% { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
    100% { opacity: 1; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    animation: heroTextFade 1s ease-in-out 1s both;
}

@keyframes heroTextFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-title { font-family: var(--font-title); font-size: 3.5rem; margin-bottom: 24px; line-height: 1.2; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.25rem; margin-bottom: 40px; color: #e5e7eb; max-width: 800px; margin-inline: auto; font-weight: 300; }
.partnership-badge { background-color: rgba(51, 181, 165, 0.15); border: 1px solid rgba(51, 181, 165, 0.4); color: var(--tc-primary); padding: 12px 24px; border-radius: 50px; display: inline-block; margin-bottom: 48px; font-size: 1rem; font-weight: 500; }
.partnership-badge strong { color: var(--tc-white); }
.hero-actions { display: flex; gap: 20px; justify-content: center; }

/* --- 6. SECTION CMS MAISON --- */
.cms-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.cms-text p { margin-bottom: 24px; font-size: 1.1rem; color: var(--tc-gray); }

.code-window { 
    background-color: #1e1e1e; 
    border-radius: var(--radius); 
    padding: 24px; 
    box-shadow: var(--shadow-lg); 
    font-family: var(--font-mono); 
    color: #d4d4d4; 
    overflow-x: auto; 
}
.code-window .top-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.code-window .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background-color: #ff5f56; } .dot.yellow { background-color: #ffbd2e; } .dot.green { background-color: #27c93f; }
.code-window code { font-size: 0.95rem; line-height: 1.6; display: block; }
.code-comment { color: #6a9955; } .code-keyword { color: #569cd6; } .code-string { color: #ce9178; }

.pagespeed-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.15rem;
    color: var(--tc-dark);
    font-family: var(--font-title);
    font-weight: 700;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}
.pagespeed-link:hover { 
    color: var(--tc-primary); 
    transform: translateY(-2px);
}
.pagespeed-link svg { 
    width: 28px; 
    height: 28px; 
    stroke: #0cce6a; 
}

/* --- 7. EXPERTISES --- */
.expertises-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.expertise-card { 
    position: relative; 
    overflow: hidden; 
    background-color: var(--tc-white);
    background-size: cover; 
    background-position: center; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow-md); 
    transition: all 0.3s ease; 
    min-height: 320px; 
    display: flex; 
    align-items: flex-end; 
    justify-content: flex-start; 
}
.expertise-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to bottom left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 80%);
    z-index: 1; 
}
.expertise-content { position: relative; z-index: 2; padding: 32px; width: 100%; text-align: left; max-width: 800px; }
.expertise-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.expertise-card h3 { margin-bottom: 12px; color: var(--tc-primary-dark); font-family: var(--font-title); font-size: 1.5rem; font-weight: 700; }
.expertise-card p { color: var(--tc-dark); font-size: 1.1rem; margin: 0; font-weight: 600; }

/* --- 8. A PROPOS --- */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: center; }
.about-img { display: block; margin: 0 auto; width: 100%; max-width: 450px; aspect-ratio: 1; background-color: var(--tc-light-gray); border-radius: var(--radius); object-fit: cover; box-shadow: 20px 20px 0px var(--tc-primary); }
.about-content h2.section-title { text-align: left; margin-bottom: 30px; }
.about-content h2.section-title::after { margin: 15px 0 0 0; }
.about-content p { margin-bottom: 20px; color: var(--tc-gray); font-size: 1.1rem; }
.skills-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.skills-list li { display: flex; align-items: center; gap: 12px; color: var(--tc-dark); font-weight: 500; }
.skills-list li::before { content: '✓'; color: var(--tc-white); background-color: var(--tc-primary); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; flex-shrink: 0; }

/* --- 10. CONTACT --- */
.contact-section { text-align: center; }
.contact-card { 
    background: var(--tc-dark); 
    color: var(--tc-white); 
    padding: 80px 40px; 
    border-radius: 20px; 
    max-width: 900px; 
    margin: 0 auto; 
    box-shadow: var(--shadow-lg); 
}
.contact-card h2 { font-family: var(--font-title); font-size: 2.5rem; margin-bottom: 24px; }
.contact-card p { margin-bottom: 40px; font-size: 1.15rem; color: #d1d5db; max-width: 600px; margin-inline: auto; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: #ccc; font-weight: 500; font-size: 0.95rem; }
.form-control { 
    width: 100%; 
    padding: 14px; 
    background: #222; 
    border: 1px solid #444; 
    color: #fff; 
    border-radius: 8px; 
    font-family: inherit; 
    font-size: 1rem; 
    transition: border-color 0.3s; 
}
.form-control:focus { outline: none; border-color: var(--tc-primary); }
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

/* --- 11. FOOTER --- */
footer { background-color: var(--tc-white); padding: 40px 0; text-align: center; color: var(--tc-gray); font-size: 0.9rem; border-top: 1px solid var(--tc-light-gray); }
footer a { color: var(--tc-primary); font-weight: 500; }
footer a:hover { color: var(--tc-primary-dark); text-decoration: underline; }

/* --- 12. RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .cms-grid, .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .hero-title { font-size: 2.8rem; }
    .burger-toggle { display: flex; z-index: 1001; }
    .main-nav { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background-color: var(--tc-white); display: flex; justify-content: center; align-items: center; transition: right 0.4s ease; z-index: 1000; }
    .main-nav.active { right: 0; }
    .main-nav > ul { flex-direction: column; align-items: center; gap: 40px; padding: 0; }
    .main-nav a { font-size: 1.2rem; }
    .burger-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .burger-toggle.active span:nth-child(2) { opacity: 0; }
    .burger-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    /* Réintégration du flou sur mobile pour les expertises */
    .expertise-card::before {
        background: var(--glass-bg-light);
        -webkit-backdrop-filter: blur(var(--glass-blur));
        backdrop-filter: blur(var(--glass-blur));
    }
}

@media (max-width: 768px) {
    section { padding: 70px 0; }
    .hero-section { padding: 100px 0 80px; background-attachment: scroll; }
    .hero-title { font-size: 2.2rem; }
    .hero-actions { flex-direction: column; }
    .skills-list { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .main-nav > ul { display: none; }
    .main-nav.active > ul { display: flex; }
    
    /* Masquage du titre du formulaire de contact sur mobile */
    .contact-card h2 { display: none; }
}

/* --- CAROUSEL REWORK --- */
.carousel-container { overflow: hidden; width: 100%; position: relative; padding: 40px 0; -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); }
.carousel-track { display: flex; align-items: flex-start; width: max-content; gap: 60px; padding-right: 60px; animation: scroll 50s linear infinite; }
.carousel-track.track-reverse { animation: scroll-reverse 50s linear infinite; }
.carousel-logo { height: 60px; width: 100px; object-fit: contain; opacity: 0.9; transition: all 0.3s ease; flex-shrink: 0; }
.carousel-logo:hover { opacity: 1; transform: scale(1.05); }

@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scroll-reverse { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* --- RESPONSIVE ENGAGEMENTS CARDS --- */
.engagements-container {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--tc-light-gray);
}
.engagements-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    list-style: none;
    padding: 0;
}
.engagements-list li {
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border-light);
    border-radius: var(--radius);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.engagements-list li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.85);
}
.engagements-list li svg {
    margin-bottom: 15px;
    width: 48px;
    height: 48px;
}
.engagements-list li span {
    font-size: 0.95rem;
    color: var(--tc-gray);
    line-height: 1.6;
}
.engagements-list li strong {
    display: block;
    color: var(--tc-primary-dark);
    font-family: var(--font-title);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .engagements-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .engagements-list { grid-template-columns: repeat(4, 1fr); }
}

/* --- 13. ANIMATIONS AU SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(var(--glass-blur));
    transition: opacity 1s ease-in-out, transform 1s ease-in-out, filter 1s ease-in-out;
}

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

/* ==========================================
   MENU DROPDOWN SOLUTIONS
   ========================================== */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 240px;
    z-index: 100;
    list-style: none;
    margin: 0;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a.sub-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #444; 
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: left; 
}

/* Les fameux Bullet points dynamiques */
.dropdown-menu li a.sub-nav-link::before {
    content: "•";
    color: var(--tc-primary);
    font-size: 1.5rem;
    line-height: 0;
    margin-right: 12px;
}

.dropdown-menu li a.sub-nav-link:hover {
    background-color: #f5f5f5;
    color: var(--tc-primary); 
}

/* --- Comportement Desktop (Hover) --- */
@media (min-width: 993px) {
    .has-dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInDropdown 0.3s ease forwards;
    }
}

/* --- Comportement Mobile (Clic) --- */
@media (max-width: 992px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        padding-left: 0;
        padding-top: 15px;
        display: none; 
        min-width: 100%;
        transform: none; 
    }
    
    .dropdown-menu.active {
        display: block;
        animation: fadeInDropdownMobile 0.3s ease forwards;
    }
    
    .dropdown-menu li a.sub-nav-link {
        padding: 12px 0;
        font-size: 1.05rem;
        color: var(--tc-dark);
        justify-content: center; /* Centrage global pour le mobile */
    }
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeInDropdownMobile {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}