:root {
    --bleu-ciel: #e8f1fe;
    --bleu-fonce: #0056d2;
    --text-color: #2c3e50;
    --bg-light: #f9fbfd;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition:
        transform 0.6s ease,
        opacity 0.6s ease,
        background 0.3s ease;
}
.mobile-nav {
    display: none;
}
@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
}

header.visible {
    opacity: 1;
    transform: translateY(0);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}
.logo:hover {
    color: #000;
    transform: translateY(-1px);
}
.logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}
@media (max-width: 768px) {
    .logo {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
        letter-spacing: -0.5px;
        font-weight: 800;
    }
    .logo img {
        width: 28px;
        height: 28px;
    }
}
.logo:hover img {
    transform: scale(1.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.menu-toggle {
    display: none;
    margin-left: auto;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
    transform: scale(1.08);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    background: var(--bleu-fonce);
    border-radius: 3px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle::before {
    top: 14px;
}

.menu-toggle span {
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

.menu-toggle::after {
    bottom: 14px;
}

/* Hamburger to X animation when menu opens */
header.open .menu-toggle::before {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background: var(--bleu-fonce);
}

header.open .menu-toggle span {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

header.open .menu-toggle::after {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
    background: var(--bleu-fonce);
}

nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    transition: color 0.25s ease;
    white-space: nowrap;
}
nav a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    background: var(--bleu-fonce);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    opacity: 0.9;
}
nav a.active,
nav a:hover {
    color: var(--bleu-fonce);
}
nav a.active::after,
nav a:hover::after {
    transform: scaleX(1);
}

/* ========================================
   MOBILE-FIRST FULLSCREEN NAVIGATION
   Optimized for Touch & Thumb-Friendly
   ======================================== */

@media (max-width: 768px) {
    /* ===== PROFESSIONAL & AESTHETIC MOBILE NAVIGATION ===== */

    /* Header styles remain consistent */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 65px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        background: rgba(255, 255, 255, 0.85);
        /* backdrop-filter is removed to prevent clipping position:fixed menu */
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
        z-index: 1000;
        transition: background-color 0.3s ease;
    }

    header.open {
        background: transparent;
        box-shadow: none;
    }

    /* Change hamburger color for dark background */
    header.open .menu-toggle::before,
    header.open .menu-toggle::after {
        background: #ffffff;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        z-index: 1001;
    }

    /* Hide desktop nav on mobile */
    header > nav {
        display: none;
    }

    /* Sophisticated Dark Overlay */
    body > nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: #002147; /* Dark blue from footer */
        z-index: 999;
        opacity: 0;
        transform: translateY(-10px);
        transition:
            opacity 0.35s ease,
            transform 0.35s ease;
    }

    header.open + nav {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    /* Elegant, Left-Aligned Menu Items */
    body > nav a {
        position: relative;
        width: 100%;
        max-width: 320px; /* More contained width */
        display: flex;
        align-items: center;
        padding: 20px 0;
        margin: 0;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.7); /* Softer white for text */
        font-size: 1.75rem;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
        transition: color 0.3s ease;
        opacity: 0;
        transform: translateY(15px);
    }

    body > nav a:first-of-type {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Staggered Animation for Menu Items */
    header.open + nav a {
        opacity: 1;
        transform: translateY(0);
        transition:
            opacity 0.4s ease,
            transform 0.4s ease;
    }

    header.open + nav a:nth-child(1) {
        transition-delay: 0.15s;
    }
    header.open + nav a:nth-child(2) {
        transition-delay: 0.2s;
    }
    header.open + nav a:nth-child(3) {
        transition-delay: 0.25s;
    }
    header.open + nav a:nth-child(4) {
        transition-delay: 0.3s;
    }
    header.open + nav a:nth-child(5) {
        transition-delay: 0.35s;
    }
    header.open + nav a:nth-child(6) {
        transition-delay: 0.4s;
    }

    /* Professional Hover/Active State with Animated Indicator */
    body > nav a::before {
        content: "";
        position: absolute;
        left: -20px;
        top: 50%;
        height: 0%;
        width: 3px;
        background-color: var(--bleu-fonce);
        border-radius: 2px;
        transform: translateY(-50%);
        transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    body > nav a.active,
    body > nav a:hover,
    body > nav a:focus {
        color: #ffffff; /* Bright white on hover */
        background-color: transparent;
    }

    body > nav a.active::before,
    body > nav a:hover::before,
    body > nav a:focus::before {
        height: 60%; /* Reveal indicator */
    }

    /* Body Scroll Lock */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        touch-action: none;
    }

    /* Adjustments for smaller screens */
    @media (max-width: 480px) {
        body > nav a {
            font-size: 1.5rem;
            max-width: 280px;
        }
    }
}

/* INTRO */
.intro {
    max-width: 900px;
    margin: 80px auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}
.intro.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ENTREPRISES */
.entreprises {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.card-content {
    flex: 1;
}
.card-content h3 {
    color: var(--bleu-fonce);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
}
.card-content p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #555;
}

/* SCHEMA CERCLE - CORRIGÉ */
.schema {
    max-width: 900px;
    margin: 80px auto 40px;
    text-align: center;
    position: relative;
    padding: 20px;
}

.schema h2 {
    margin-bottom: 30px;
    color: var(--bleu-fonce);
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
}

.circle-container {
    position: relative;
    margin: 0 auto;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 2px dashed var(--bleu-fonce);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.center-logo {
    background: var(--bleu-fonce);
    color: white;
    border-radius: 50%;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-align: center;
    padding: 10px;
    line-height: 1.3;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* ENTITÉS - POSITIONNEMENT CORRIGÉ */
.entite {
    position: absolute;
    background: white;
    border: 2px solid var(--bleu-fonce);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    line-height: 1.3;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.entite:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--bleu-ciel);
}

/* Positionnement corrigé des entités */
.entite1 {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.entite2 {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.entite3 {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

.entite4 {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
}

/* DESCRIPTIONS - POSITIONNEMENT CORRIGÉ */
.explication {
    position: absolute;
    width: 160px;
    font-size: 12px;
    color: #555;
    background: var(--bg-light);
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 5; /* Z-index inférieur à celui des entités */
}

/* Positionnement corrigé des explications */
.exp1 {
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.exp2 {
    top: 50%;
    right: -180px;
    transform: translateY(-50%);
}

.exp3 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.exp4 {
    top: 50%;
    left: -180px;
    transform: translateY(-50%);
}

/* TEXTE SYNERGIE */
.synergie {
    max-width: 900px;
    margin: 30px auto 60px;
    padding: 25px;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    text-align: justify;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.synergie strong {
    color: var(--bleu-fonce);
}

.footer {
    background-color: #002147;
    color: #ffffff;
    padding: 60px 20px 20px;
    font-size: 15px;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.footer-logo img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.footer-logo span {
    font-size: 20px;
}

.footer-tagline {
    margin: 0;
    color: #cce5ff;
    opacity: 0.9;
}

.footer-social {
    display: inline-flex;
    gap: 12px;
    margin-top: 6px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.footer-social a:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    stroke: none;
}

.footer-columns {
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 28px;
}

.footer-col {
    min-width: 240px;
}

.footer-col h4 {
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #e6f0ff;
}

.footer-col li svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #cce5ff;
    stroke-width: 1.6;
    flex: 0 0 18px;
    margin-top: 3px;
}

.footer-col li a {
    color: #cce5ff;
}

.footer-col li strong {
    color: #ffffff;
    font-weight: 600;
}

.footer-col h3,
.footer-col h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 1px;
}

.footer p {
    margin: 8px 0;
    line-height: 1.6;
}

.footer a {
    color: #cce5ff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    color: #cbd5e1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom-links {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-main {
        padding: 0 16px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }

    .footer-col {
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 16px 0;
    }
}

@media (max-width: 600px) {
    .circle-container {
        height: 350px;
    }

    .circle {
        width: 240px;
        height: 240px;
    }

    .entite {
        width: 80px;
        height: 80px;
        font-size: 10px;
    }

    .center-logo {
        width: 100px;
        height: 100px;
        font-size: 13px;
    }

    .exp2 {
        right: -130px;
    }
    .exp4 {
        left: -130px;
    }

    .exp1 {
        top: -30px;
    }
    .exp3 {
        bottom: -30px;
    }
}
