/* ========= VARIABLES DE THÈME ========= */
:root {
    --bg: #020617;
    --card-bg: #020617;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border-subtle: rgba(148,163,184,0.3);
    --border-strong: rgba(148,163,184,0.7);
    --accent-gold: #fbbf24;
    --accent-gold-dark: #f97316;
    --accent-primary: #4f46e5;
    --accent-secondary: #0ea5e9;
    --accent-chip: #38bdf8;
    --chip-bg: rgba(15,23,42,0.95);
    --topbar-bg: rgba(15,23,42,0.98);
    --shadow-strong: 0 20px 50px rgba(15,23,42,0.9);
    --shadow-soft: 0 14px 40px rgba(15,23,42,0.85);
    --footer-bg: #020617;

    /* Tailles de texte responsives */
    --fs-body: clamp(14px, 0.9vw, 18px);
    --fs-small: calc(var(--fs-body) * 0.85);
    --fs-title: clamp(1.2rem, 1.4vw + 0.6rem, 1.9rem);
    --fs-hero: clamp(1.9rem, 2.4vw + 0.6rem, 3rem);
}

html, body {
    height: 100%;
}

main {
    min-height: calc(100vh - 220px); /* header + bannière + footer approximatifs */
}

/* MODE CLAIR */
html[data-theme="light"] {
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border-subtle: rgba(148,163,184,0.5);
    --border-strong: rgba(107,114,128,0.9);
    --accent-gold: #f59e0b;
    --accent-gold-dark: #ea580c;
    --accent-primary: #2563eb;
    --accent-secondary: #0ea5e9;
    --accent-chip: #2563eb;
    --chip-bg: #f9fafb;
    --topbar-bg: #ffffff;
    --shadow-strong: 0 16px 40px rgba(15,23,42,0.2);
    --shadow-soft: 0 10px 30px rgba(15,23,42,0.15);
    --footer-bg: #0f172a;
}

/* ========= RESET ========= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: radial-gradient(circle at top left, rgba(56,189,248,0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(249,115,22,0.08), transparent 60%),
                var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: var(--fs-body);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========= HEADER ========= */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;

    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}


[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.85);
}


/* ⚠️ ICI : full-width, plus de max-width */
.topbar-inner {
    width: 100%;
    margin: 0;
    padding: 10px clamp(12px, 2vw, 28px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative; /* pour le menu mobile positionné dessous */
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(251,191,36,0.5);
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h1 {
    font-size: var(--fs-title);
    color: var(--text);
}

.brand-text p {
    font-size: var(--fs-small);
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* NAV DESKTOP PAR DÉFAUT */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a {
    font-size: var(--fs-small);
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text);
    transition: all 0.15s ease;
}

.nav a:hover {
    border-color: var(--accent-primary);
    background: rgba(79,70,229,0.08);
}

.nav a.active {
    background: linear-gradient(135deg,var(--accent-gold),var(--accent-gold-dark));
    color: #111827;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(251,191,36,0.6);
}

.switches {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch,
.lang-switch {
    display: flex;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    overflow: hidden;
}

.theme-btn,
.lang-btn {
    font-size: 0.8rem;
    padding: 5px 9px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    min-width: 36px;
}

.theme-btn.active,
.lang-btn.active {
    background: linear-gradient(135deg,var(--accent-primary),var(--accent-secondary));
    color: #f9fafb;
}

/* ========= HAMBURGER (MENU MOBILE) ========= */

.hamburger {
    display: none;               /* caché par défaut (desktop) */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--chip-bg);
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Animation en croix quand le menu est ouvert */
.hamburger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ========= BANNIÈRE FULL WIDTH ========= */

.site-banner {
    width: 100%;
    background: #F2F2F2; /* même fond que le logo */
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-banner img {
    display: block;
    width: 100%;
    max-width: 1600px;                 /* limite la largeur sur très grands écrans */
    height: auto;
    max-height: min(60vh, 420px);      /* ne dépasse pas 60% de la hauteur de l'écran */
    object-fit: contain;               /* montre tout le logo */
}

/* ========= HERO ========= */

.hero {
    width: 100%;
    margin: 24px 0;
    padding: 0 clamp(12px, 2vw, 28px);
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(0,1.1fr);
    gap: 22px;
    align-items: stretch;
}

.hero-text {
    padding: 18px 18px 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(251,191,36,0.14), transparent 60%),
        radial-gradient(circle at bottom right, rgba(59,130,246,0.14), transparent 55%),
        linear-gradient(145deg,var(--card-bg),var(--card-bg));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #f9fafb;
    background: rgba(15,23,42,0.85);
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid var(--border-strong);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.hero-title {
    font-size: var(--fs-hero);
    background: linear-gradient(135deg,var(--accent-gold),var(--accent-gold-dark),var(--accent-secondary));
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 0.96rem;
    color: var(--text);
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg,var(--accent-gold),var(--accent-gold-dark));
    color: #111827;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(251,191,36,0.5);
}

.btn-secondary {
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 8px 14px;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

.hero-main-image {
    margin-top: 6px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.hero-main-image img {
    width: 100%;
    height: auto;
    max-height: 350px;     /* adapte la hauteur max à ton design */
    object-fit: contain;   /* affiche l’image entière */
    display: block;
}


/* colonne droite */

.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-africa {
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-strong);
}

.hero-africa img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

/* ⚠️ ICI : carte blanche comme la bannière pour la petite image */
.hero-card {
    border-radius: 18px;
    padding: 14px 16px 16px;
    background:
        radial-gradient(circle at top, rgba(56,189,248,0.4), transparent 60%),
        radial-gradient(circle at bottom, rgba(251,191,36,0.35), transparent 55%),
        linear-gradient(145deg,var(--card-bg),var(--card-bg));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-strong);
}


.hero-card-image {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--border-subtle);
}


.hero-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--card-bg); /* pour que le fond autour de l’image soit foncé */
}


.hero-card p {
    font-size: 0.86rem;
    color: #111827; /* plus lisible sur blanc */
    opacity: 0.95;
    margin-bottom: 4px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.hero-tag {
    font-size: 0.78rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--text);
    border: 1px solid var(--border-strong);
}

/* ========= SECTIONS ========= */

.section {
    width: 100%;
    margin: 0 0 18px;
    padding: 0 clamp(12px, 2vw, 28px);
}

.card {
    background:
        radial-gradient(circle at top left, rgba(148,163,184,0.2), transparent 60%),
        linear-gradient(145deg,var(--card-bg),var(--card-bg));
    border-radius: 20px;
    padding: 20px 18px 22px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.card-title {
    font-size: var(--fs-title);
    margin-bottom: 8px;
}

.card p {
    font-size: 0.92rem;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 6px;
}

/* ABOUT – 2 CARTES SÉPARÉES */

.about-section {
    display: grid;
    grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
    gap: 14px;
}

.about-image-card img {
    width: 100%;
    display: block;
    border-radius: 14px;
    object-fit: cover;
}

/* ========= DOMAINES (avec carrousel) ========= */

.domains-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

/* Carte d'un domaine */
.domain-item {
    background: var(--chip-bg);
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    display: flex;
    flex-direction: column;
}

/* Zone image / slider */
.domain-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;   /* hauteur auto, pas de découpe violente */
    overflow: hidden;
}

/* Toutes les images du slider (superposées, invisibles par défaut) */
.domain-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Image visible */
.domain-slider img.active {
    opacity: 1;
}

/* Texte en dessous de l'image */
.domain-content {
    padding: 12px 12px 14px;
}

.domain-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.domain-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text);
}


/* ENGAGEMENT */

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid var(--border-strong);
}

/* CONTACT */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
    gap: 16px;
    margin-top: 8px;
}

.contact-list {
    list-style: none;
    font-size: 0.9rem;
}

.contact-list a {
    color: var(--accent-chip);
}

.contact-form {
    border-radius: 14px;
    padding: 10px 12px;
    background: var(--chip-bg);
    border: 1px dashed var(--border-strong);
    font-size: 0.86rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.form-row input,
.contact-form textarea {
    flex: 1;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: #020617;
    color: var(--text);
    font-size: 0.86rem;
}

html[data-theme="light"] .form-row input,
html[data-theme="light"] .contact-form textarea {
    background: #ffffff;
}

.contact-form textarea {
    width: 100%;
    resize: vertical;
}

.contact-form button {
    margin-top: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    font-size: 0.86rem;
    background: linear-gradient(135deg,var(--accent-primary),var(--accent-secondary));
    color: #f9fafb;
}

.form-note {
    font-size: 0.76rem;
    margin-top: 4px;
    color: var(--muted);
}

/* FOOTER */

.footer {
    margin-top: 18px;
    border-top: 1px solid var(--border-subtle);
    background: var(--footer-bg);
}

.footer-inner {
    width: 100%;
    margin: 0;
    padding: 14px clamp(12px, 2vw, 28px) 18px;
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,0.9fr);
    gap: 16px;
    font-size: var(--fs-small);
    color: #e5e7eb;
}

.footer-col-title {
    font-size: 0.9rem;
    color: #f9fafb;
    margin-bottom: 4px;
}

.footer-links {
    list-style: none;
}

.footer-links li + li {
    margin-top: 3px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    width: 100%;
    margin: 0;
    padding: 0 clamp(12px, 2vw, 28px) 14px;
    font-size: var(--fs-small);
    color: #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* ========= RESPONSIVE GRILLES ========= */

@media (max-width: 950px) {
    .hero {
        grid-template-columns: minmax(0,1fr);
    }
    .about-section {
        grid-template-columns: minmax(0,1fr);
    }
}

@media (max-width: 850px) {
    .contact-grid,
    .footer-inner {
        grid-template-columns: minmax(0,1fr);
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========= MODE MOBILE (NAV + HAMBURGER) ========= */
/* IMPORTANT : À LA FIN POUR ÉCRASER LES RÈGLES .nav PAR DÉFAUT */

@media (max-width: 800px) {

    .topbar-inner {
        align-items: center;
    }

    .nav {
        position: absolute;
        top: 100%;
        right: clamp(12px, 3vw, 40px);
        margin-top: 6px;
        background: var(--card-bg);
        border-radius: 14px;
        border: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-soft);
        padding: 8px 10px;
        display: none; /* caché par défaut en mobile */
        flex-direction: column;
        min-width: 180px;
        z-index: 40;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        border-radius: 8px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .nav a + a {
        margin-top: 4px;
    }

    .hamburger {
        display: flex;   /* bouton visible en mobile */
    }

    .topbar-right {
        gap: 8px;
    }
}

/* ===== Lisibilité de la carte Diamiou International ===== */
/* MODE SOMBRE : texte clair */
html[data-theme="dark"] .hero-card p,
html[data-theme="dark"] .hero-card strong,
html[data-theme="dark"] .hero-card span,
html[data-theme="dark"] .hero-card .hero-tag {
    color: #f9fafb;
}

/* MODE CLAIR : texte foncé */
html[data-theme="light"] .hero-card p,
html[data-theme="light"] .hero-card strong,
html[data-theme="light"] .hero-card span,
html[data-theme="light"] .hero-card .hero-tag {
    color: #111827;
}

/* Optionnel : fond des tags plus doux en clair */
html[data-theme="light"] .hero-card .hero-tag {
    background: #e5e7eb;
    border-color: #cbd5f5;
}


/* ===== Carrousel À PROPOS ===== */
.about-slider {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 14px;
}

.about-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.about-slider img.active {
    opacity: 1;
}


/* ===== SOCIÉTÉS – CARROUSEL 3 CARDS ===== */
.companies-carousel {
    position: relative;
    width: 100%;
    overflow: hidden; /* empêche d'afficher plus de 3 cartes */
    padding: 0 60px; /* espace pour les flèches */
    box-sizing: border-box;
}

/* bande scrollable interne */
.companies-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

/* on affiche 3 cartes exactement */
.company-card {
    flex: 0 0 calc((100% - 32px) / 3); /* 3 cartes seulement */
    scroll-snap-align: start;

    background: var(--chip-bg);
    border-radius: 18px;
    padding: 14px;
    border: 1px solid var(--border-strong);
    transition: 0.2s ease;
}

.company-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold);
}

/* flèches à EXTÉRIEUR, pas sur la carte */
.companies-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;

    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gold);
    color: #111;
    font-size: 1.6rem;
    cursor: pointer;
}

.companies-arrow.left {
    left: 10px;
}

.companies-arrow.right {
    right: 10px;
}

.companies-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

/* images correctement affichées */
.company-cover {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 10px;
}
.company-cover img {
    width: 100%;
    height: 180px;
    object-fit: contain; /* image non coupée */
}

/* NOM ENCADRÉ DORÉ - version plus propre */
.company-name {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--accent-gold);
    background: rgba(10,15,30,0.8);
    color: #fff;
    font-weight: 600;
    text-align: center;
    margin: 8px auto;
    box-shadow: 0 0 12px rgba(255,200,80,.4);
}


html[data-theme="light"] .company-name {
    background: linear-gradient(
        135deg,
        #111827,
        #1f2937
    );
    border-color: #f59e0b;
    color: #fefce8;
}

.company-card:hover .company-name {
    transform: scale(1.03);
    transition: 0.15s ease;
}

/* textes */
.company-desc {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.9;
}

.company-countries {
    font-size: 0.8rem;
    color: var(--accent-chip);
}

/* ---- Flèches du carrousel ---- */

.companies-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: radial-gradient(circle at 30% 20%, var(--accent-gold), var(--accent-gold-dark));
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px rgba(15,23,42,0.9);
    z-index: 10;
}

.companies-arrow.left {
    left: 6px;
}

.companies-arrow.right {
    right: 6px;
}

.companies-arrow:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Sur mobile : 1 carte par vue, toujours scrollable */
@media (max-width: 900px) {
    .company-card {
        flex: 0 0 85%;
        max-width: 85%;
    }
}
