:root {
    --accent: #0066FF;
    --accent-dim: #004ecc;
    --radius: 6px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #0e0e0e;
    --bg2: #161616;
    --bg3: #1f1f1f;
    --border: rgba(255,255,255,0.08);
    --text: #f0f0f0;
    --text2: #aaa;
    --text3: #666;
    --nav-bg: rgba(14,14,14,0.9);
}

[data-theme="light"] {
    --bg: #f5f4f0;
    --bg2: #ffffff;
    --bg3: #e5e4e0;
    --border: rgba(0,0,0,0.08);
    --text: #111;
    --text2: #555;
    --text3: #aaa;
    --nav-bg: rgba(245,244,240,0.92);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition), color var(--transition);
}

/* BARRE DE NAVIGATION */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 4rem;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2.5rem; }

.nav-links a {
    color: var(--text2);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { color: var(--text); border-color: var(--text3); }

/* BOUTON BURGER MOBiLE (Masqué par défaut) */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Animations du burger quand ouvert (forme une croix) */
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* SECTIONS BASE */
section {
    min-height: 100vh;
    padding: 100px 4rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* HERO / ACCUEIL */
#accueil { padding: 0; overflow: hidden; position: relative; }

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
    width: 100%;
    align-items: center;
}

.hero-left {
    padding: 120px 2rem 60px 4rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 2px; background: var(--accent); }

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.3rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 2.5rem;
}

.hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8rem;
    width: 100%;
}

.hero-desc {
    max-width: 520px;
    font-size: 1rem;
    color: var(--text2);
    line-height: 1.65;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1.1rem 2.2rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
    align-self: flex-start;
}
.hero-cta:hover { background: var(--accent-dim); transform: translateY(-2px); }
.hero-cta-arrow { font-size: 1.1rem; transition: transform var(--transition); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-right { position: relative; width: 100%; height: 100vh; }
.hero-diagonal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(18% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* HEADERS DES SECTIONS */
.s-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 3rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.s-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); }
.s-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.03em; color: var(--text); line-height: 1; }

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.service-card { background: var(--bg); padding: 2.5rem 2rem; transition: background var(--transition); }
.service-card:hover { background: var(--bg2); }
.s-num { font-size: 0.7rem; font-weight: 700; color: var(--accent); margin-bottom: 1.5rem; }
.service-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.8rem; }
.service-card p { font-size: 0.88rem; color: var(--text2); line-height: 1.65; }

/* CLIENTS */
.clients-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.client-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 3.5rem 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; transition: all var(--transition); }
.client-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 35px rgba(0, 102, 255, 0.12); }
.client-logo-circle { width: 110px; height: 110px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); margin-bottom: 1.8rem; }
.client-logo-circle.nestle-white-bg { background: #ffffff; border-color: #ffffff; padding: 12px; }
.client-logo-circle img { width: 100%; height: 100%; object-fit: contain; }
.client-card h3 { font-size: 1.3rem; font-weight: 800; color: var(--text); margin-bottom: 0.8rem; }
.client-card p { font-size: 0.92rem; color: var(--text2); line-height: 1.6; max-width: 360px; }

/* ÉQUIPE & RÔLES */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--border);
}

.role-card {
    padding: 2.8rem 2.5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-card:nth-child(even) { border-right: none; }
.role-card:nth-child(n+3) { border-bottom: none; }

.role-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    transition: width 0.35s ease;
}

.role-card:nth-child(1)::after { background: #0066FF; }
.role-card:nth-child(2)::after { background: #8B5CF6; }
.role-card:nth-child(3)::after { background: #06B6D4; }
.role-card:nth-child(4)::after { background: #EF4444; }

.role-card:hover { background: var(--bg2); }
.role-card:hover::after { width: 100%; }

.role-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.role-index {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text3);
}

.role-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 100px;
}

.role-tag--strategy  { color: #0066FF; background: rgba(0,102,255,0.1); }
.role-tag--engineering { color: #8B5CF6; background: rgba(139,92,246,0.1); }
.role-tag--infra     { color: #06B6D4; background: rgba(6,182,212,0.1); }
.role-tag--security  { color: #EF4444; background: rgba(239,68,68,0.1); }

.role-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.role-card p {
    font-size: 0.88rem;
    color: var(--text2);
    line-height: 1.7;
    flex: 1;
}

.role-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.5rem;
}

.role-skills span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text3);
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

@media (max-width: 768px) {
    .roles-grid { grid-template-columns: 1fr; }
    .role-card { border-right: none; border-bottom: 1px solid var(--border); }
    .role-card:last-child { border-bottom: none; }
}

/* CONTACT */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start; }
.contact-left h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.05; color: var(--text); margin-bottom: 1.5rem; }
.contact-left p { font-size: 0.95rem; color: var(--text2); line-height: 1.7; margin-bottom: 2rem; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
.info-list li { display: flex; flex-direction: column; gap: 2px; }
.info-list .il-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
.info-list .il-value { font-size: 0.92rem; color: var(--text); font-weight: 500; line-height: 1.4; }
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
.field-group input, .field-group textarea { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.9rem; transition: border-color var(--transition), background var(--transition); outline: none; width: 100%; }
.field-group input:focus, .field-group textarea:focus { border-color: var(--accent); background: var(--bg3); }
.field-group textarea { resize: vertical; min-height: 120px; }
.submit-btn { align-self: flex-start; padding: 0.9rem 2rem; background: var(--accent); color: #fff; border: none; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.85rem; border-radius: var(--radius); cursor: pointer; transition: background var(--transition), transform var(--transition); }
.submit-btn:hover { background: var(--accent-dim); transform: translateY(-2px); }

.divider { width: 100%; height: 1px; background: var(--border); }

/* =========================================
   RESPONSIVE DESIGN & INTERFACE MOBILE
========================================= */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; }
    .hero-left { padding: 120px 2rem 40px 2rem; }
    .hero-right { height: 45vh; }
    .hero-diagonal-img { clip-path: polygon(0 12%, 100% 0%, 100% 100%, 0% 100%); }
    nav { padding: 0 2rem; }
    section { padding: 80px 2rem 4rem; }
}

@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 768px) {
    .burger-btn { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 99;
    }

    .nav-links.open { transform: translateY(0); }
    .nav-links a { font-size: 1.4rem; }
    .services-grid { grid-template-columns: 1fr; }
    .clients-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* =========================================
   ANIMATIONS DE LA NOTIFICATION DE CONTACT
========================================= */
@keyframes countdown {
    from { stroke-dashoffset: 62.83; }
    to { stroke-dashoffset: 0; }
}

#timerCircle {
    transition: stroke-dashoffset 0.1s linear;
}

@keyframes popOutWobbly {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.07); /* Micro-gonflement rapide */
        opacity: 1;
    }
    50% {
        transform: scale(0.93); /* Petit effet élastique wobbly */
        opacity: 1;
    }
    100% {
        transform: scale(0); /* Rétraction totale ultra rapide */
        opacity: 0;
    }
}

.status-pop-out {
    animation: popOutWobbly 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: center;
}

/* ── Bouton retour en haut ── */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    filter: brightness(1.2);
}

/* ── Animations au scroll ── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-secondary, #111);
    color: var(--text-muted, #aaa);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary, #fff);
    letter-spacing: -0.5px;
}

.footer-dot {
    color: var(--accent, #2563eb);
}

.footer-tagline {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.footer-nav h4,
.footer-contact h4 {
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a,
.footer-contact a {
    color: var(--text-muted, #aaa);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--accent, #2563eb);
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    max-width: 1100px;
    margin: 1.5rem auto 0;
    text-align: center;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
}
