/* MDS — Mauritanie Digital Solutions
   Couleurs issues du logo : rouge (M), bleu (D), bleu clair (S). */
:root {
    --red: #C8102E;
    --red-dark: #A30D25;
    --red-soft: #FF6B81;      /* rouge lisible sur fond sombre */
    --blue: #22408C;
    --blue-dark: #1A3170;
    --sky: #7287B8;
    --sky-soft: #B8C5E3;
    --navy: #0D1C42;          /* bleu du logo assombri pour les sections sombres */
    --navy-deep: #081330;
    --ink: #1B2433;
    --muted: #4A5568;
    --line: #E1E7EF;
    --soft: #F3F6FA;
    --white: #FFFFFF;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(13, 28, 66, .08);
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
section[id] { scroll-margin-top: 76px; } /* le header collant ne cache pas le titre de la section */
body { overflow-x: clip; } /* la page ne défile jamais horizontalement */
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--navy); color: var(--white); }

.eyebrow {
    display: inline-block;
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--red);
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--red-soft); }

.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    color: var(--navy);
}
.section-dark .section-title { color: var(--white); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 44rem; margin-bottom: 48px; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head-row .section-head { margin-bottom: 0; }

/* Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 24px;
    border-radius: 8px; border: 1px solid transparent;
    font: 600 16px/1.2 var(--font-body);
    text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-ghost { color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); width: 100%; }
.btn-blue:hover { background: var(--blue-dark); color: var(--white); }
.btn-outline { color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }

/* En-tête */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--navy); text-decoration: none; padding: 8px 0; position: relative; }
.nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
    background: var(--red); transform: scaleX(0); transition: transform .2s;
}
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.nav-toggle {
    display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
    width: 44px; height: 44px; cursor: pointer; color: var(--navy);
}

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(114,135,184,.35), transparent 60%),
        radial-gradient(600px 300px at -10% 110%, rgba(200,16,46,.25), transparent 60%),
        var(--navy);
    color: var(--white);
}
/* Pas de .container ici : toute la largeur, avec une petite marge latérale */
.hero-inner {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px; align-items: center;
    padding: 56px clamp(16px, 3vw, 40px) 120px; /* bas plus grand : le bandeau "one-stop" chevauche */
}
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.1; font-weight: 700; }
.hero h1 .accent { color: var(--red-soft); }
.hero-lead { font-size: 18px; color: #C8D2E0; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Image du hero (seule à droite) */
.hero-visual {
    border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual-default {
    background: var(--white); display: flex; align-items: center; justify-content: center;
    padding: 40px; box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 -6px 0 var(--red);
}
.hero-visual-default img { object-fit: contain; height: auto; max-height: 100%; }

/* Bandeau "Un seul interlocuteur pour" */
.one-stop { background: var(--soft); position: relative; z-index: 2; }
.one-stop-card {
    margin-top: -64px; background: var(--white); border-radius: 16px;
    border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(13,28,66,.12);
    padding: 22px 28px; display: flex; align-items: center; gap: 20px 32px; flex-wrap: wrap;
    border-top: 4px solid var(--red);
}
.one-stop-title { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--navy); white-space: nowrap; }
.one-stop-list {
    list-style: none; margin: 0; padding: 0; flex: 1;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px;
}
.one-stop-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.one-stop-icon {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #E7ECF7; color: var(--blue);
}
.one-stop-list li:nth-child(3n+1) .one-stop-icon { background: #FDECEF; color: var(--red); }
.one-stop-list li:nth-child(3n) .one-stop-icon { background: #EEF1F8; color: var(--sky); }
.one-stop + .section { padding-top: 72px; }
[dir="rtl"] .one-stop-title { font-family: 'IBM Plex Sans Arabic', var(--font-head); }
.brand-bar { display: flex; height: 6px; }
.brand-bar span { flex: 1; }
.brand-bar span:nth-child(1) { background: var(--red); }
.brand-bar span:nth-child(2) { background: var(--blue); }
.brand-bar span:nth-child(3) { background: var(--sky); }

/* Cartes services */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; display: flex; flex-direction: column; gap: 14px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--sky-soft); }
.card h3 { font-size: 21px; color: var(--navy); }
.card p { color: var(--muted); }
.icon-box {
    width: 48px; height: 48px; border-radius: 10px;
    background: var(--blue); color: var(--white);
    display: flex; align-items: center; justify-content: center;
}
.grid-3 > .card:nth-child(3n+1) .icon-box { background: var(--red); }
.grid-3 > .card:nth-child(3n+3) .icon-box { background: var(--sky); }

/* À propos */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 56px; align-items: start; }
.about-text { display: flex; flex-direction: column; gap: 16px; }
.about-text p { color: var(--muted); font-size: 17px; white-space: pre-line; }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-logo {
    border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; padding: 40px;
}
.about-logo img { max-height: 140px; mix-blend-mode: multiply; }
.steps { display: flex; flex-direction: column; gap: 20px; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); }
.step-num {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
    background: var(--red); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.step:nth-child(2) .step-num { background: var(--blue); }
.step:nth-child(3) .step-num { background: var(--sky); }
.step:nth-child(4) .step-num { background: var(--navy); }
.step h3 { font-size: 18px; color: var(--navy); margin-bottom: 4px; }
.step p { color: var(--muted); }

/* Réalisations */
.project {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.project:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: inherit; }
.project-img { aspect-ratio: 16 / 9; background: var(--line); overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project:hover .project-img img { transform: scale(1.04); }
.project-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: rgba(255,255,255,.9); font-family: var(--font-head); font-size: 28px; font-weight: 700;
}
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-cat { font-size: 13px; color: var(--red); font-weight: 600; }
.project h3 { font-size: 19px; color: var(--navy); }
.project p { color: var(--muted); }

.empty {
    border: 1px dashed #A9B6C8; border-radius: var(--radius); padding: 40px;
    text-align: center; color: #5A6B82; background: var(--white);
}

/* Clients */
.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.client {
    background: var(--white); border: 1px solid var(--line); border-radius: 16px;
    min-height: 200px; padding: 24px 20px 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 16px;
    text-decoration: none; position: relative; overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
/* Fine barre aux couleurs du logo en haut de chaque carte */
.client::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--red) 0 33.3%, var(--blue) 33.3% 66.6%, var(--sky) 66.6%);
}
.client-link:hover { border-color: var(--sky); box-shadow: var(--shadow); transform: translateY(-3px); }
.client-logo { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 110px; }
.client-logo img { max-height: 110px; max-width: 100%; object-fit: contain; } /* toujours en couleur */
.client-initials {
    width: 84px; height: 84px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--navy)); color: var(--white);
    font: 700 28px var(--font-head);
}
.client-name {
    font-family: var(--font-head); font-weight: 600; font-size: 16px; line-height: 1.3;
    color: var(--navy); text-align: center;
    padding-top: 12px; border-top: 1px solid var(--line); width: 100%;
}
.client-link:hover .client-name { color: var(--red); }
[dir="rtl"] .client-name { font-family: 'IBM Plex Sans Arabic', var(--font-head); }
@media (max-width: 560px) {
    .client { min-height: 160px; padding: 18px 12px 14px; }
    .client-logo { min-height: 80px; }
    .client-logo img { max-height: 80px; }
    .client-initials { width: 64px; height: 64px; font-size: 22px; }
    .client-name { font-size: 14px; }
}

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 56px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-info > p { color: #C8D2E0; font-size: 17px; }
.contact-list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.contact-list strong { color: var(--sky-soft); }
.contact-list a { color: var(--white); }
.form-card {
    background: var(--white); color: var(--ink); border-radius: 16px; padding: 32px;
    display: flex; flex-direction: column; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
    padding: 12px 14px; border: 1px solid #A9B6C8; border-radius: 8px;
    font: 16px var(--font-body); color: var(--ink); background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,64,140,.18);
}
.field .error { color: var(--red); font-size: 14px; }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
/* Champ anti-spam masqué sans décalage (un left:-9999px élargit la page en arabe/RTL) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.alert-success {
    background: #E8F6EE; color: #17643A; border: 1px solid #BFE6CF;
    border-radius: 10px; padding: 14px 16px; font-weight: 500;
}

/* Page réalisations */
.page-hero { background: var(--navy); color: var(--white); padding: 72px 0; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin-top: 12px; }
.page-hero p { color: #C8D2E0; margin-top: 12px; max-width: 40rem; font-size: 18px; }
.page-hero-full { padding-inline: clamp(16px, 5vw, 64px); }
.breadcrumb { font-size: 14px; color: var(--sky-soft); }
.breadcrumb a { color: var(--sky-soft); }
.detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
.detail-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 32px; }
.prose { color: var(--ink); font-size: 17px; white-space: pre-line; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; background: var(--soft); }
.side-card dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side-card dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }
.side-card dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 40px; list-style: none; padding: 0; }
.pagination a, .pagination span {
    display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center;
    padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); background: var(--white);
}
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination .disabled { opacity: .45; }

/* Pied de page */
.site-footer { background: var(--navy); /* même fond que la section Contact */ color: #A9B6C8; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding: 56px 0 40px; }
.footer-logo { background: var(--white); border-radius: 10px; padding: 10px 14px; display: inline-block; }
.footer-logo img { height: 44px; }
.site-footer h4 { color: var(--white); font-family: var(--font-head); font-size: 16px; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #C8D2E0; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.site-footer a.social {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--white); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
    transition: background .15s, border-color .15s, transform .15s;
}
.site-footer a.social:hover { transform: translateY(-2px); color: var(--white); border-color: transparent; }
.site-footer a.social-facebook:hover { background: #1877F2; }
.site-footer a.social-twitter:hover { background: #000000; }
.site-footer a.social-whatsapp:hover { background: #25D366; }
.site-footer a.social-linkedin:hover { background: #0A66C2; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 12px; }

.whatsapp-float {
    position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60;
    width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: var(--white);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.whatsapp-float:hover { color: var(--white); transform: scale(1.05); }

/* Animation d'apparition */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
    .detail { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    }
    .nav.open { display: flex; }
    .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav a:not(.btn)::after { display: none; }
    .nav .btn { margin-top: 12px; }
    .brand img { height: 44px; }
}
@media (max-width: 560px) {
    .section { padding: 64px 0; }
    .container { padding: 0 16px; }
    .hero-inner { padding-top: 40px; padding-bottom: 96px; gap: 32px; }
    .form-card, .card { padding: 22px; }
    .one-stop-card { padding: 18px; margin-top: -56px; }
    .one-stop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .one-stop-list li { font-size: 14px; gap: 8px; }
    .one-stop-icon { width: 32px; height: 32px; }
}

/* Sélecteur de langue */
.header-tools { display: none; align-items: center; gap: 8px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px; border-radius: 999px;
    background: var(--soft); border: 1px solid var(--line);
}
.lang-switch .lang-option,
.nav .lang-switch .lang-option {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 999px;
    font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none;
    color: var(--muted); border: 0; position: relative;
    transition: background .15s, color .15s, box-shadow .15s;
}
.lang-switch .lang-option[lang="ar"] .lang-label { font-family: 'IBM Plex Sans Arabic', var(--font-body); font-size: 15px; }
.lang-switch a.lang-option:hover { color: var(--navy); background: var(--white); }
.lang-switch .lang-option.is-active {
    background: var(--blue); color: var(--white);
    box-shadow: 0 2px 6px rgba(34,64,140,.3), inset 0 -2px 0 var(--red);
}
.nav .lang-switch .lang-option::after { display: none; }
.lang-switch .flag {
    flex: 0 0 auto; border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(13,28,66,.15);
}
.lang-switch .lang-option:not(.is-active) .flag { filter: saturate(.75); }
.lang-switch .lang-option:hover .flag { filter: none; }
.lang-switch-compact .lang-option,
.nav .lang-switch-compact .lang-option { padding: 4px 10px 4px 7px; min-height: 38px; gap: 5px; }

/* Logos clients cliquables */
.client-link { cursor: pointer; position: relative; }
.client-link::after {
    content: "↗"; position: absolute; top: 8px; inset-inline-end: 10px;
    font-size: 13px; color: var(--sky); opacity: 0; transition: opacity .2s;
}
.client-link:hover::after { opacity: 1; }

/* Arabe (RTL) */
[dir="rtl"] body, [dir="rtl"] .field input, [dir="rtl"] .field select, [dir="rtl"] .field textarea, [dir="rtl"] .btn {
    font-family: 'IBM Plex Sans Arabic', var(--font-body);
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] .project-placeholder, [dir="rtl"] .client span {
    font-family: 'IBM Plex Sans Arabic', var(--font-head);
    font-weight: 700;
}
[dir="rtl"] .eyebrow, [dir="rtl"] .side-card dt { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .hero h1 { line-height: 1.3; }
[dir="rtl"] .section-title { line-height: 1.35; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
[dir="rtl"] .client-link::after { content: "↖"; }

@media (max-width: 860px) {
    .header-tools { display: flex; }
    /* Mobile : le sélecteur de langue est dans le menu déroulant, avec les autres liens */
    .nav .lang-switch-nav { display: flex; margin-top: 14px; align-self: stretch; }
    .nav .lang-switch-nav .lang-option { flex: 1; justify-content: center; min-height: 44px; border-bottom: 0; padding: 6px 12px; }
}

/* Carrousels horizontaux (réalisations, clients) */
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.carousel {
    --gap: 24px; --per-view: 3;
    display: grid; grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    gap: var(--gap);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 6px 2px 18px; margin: -6px -2px 0;
    scrollbar-width: thin; scrollbar-color: var(--sky) transparent;
}
.carousel > * { scroll-snap-align: start; min-width: 0; }
.carousel .reveal { opacity: 1; transform: none; }
.carousel:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--sky-soft); border-radius: 999px; }
.carousel::-webkit-scrollbar-thumb:hover { background: var(--sky); }
.carousel-clients { --per-view: 4; }

.carousel-nav { display: flex; gap: 8px; }
.carousel-nav[hidden] { display: none; }
.carousel-btn {
    width: 46px; height: 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--white); color: var(--navy); border: 1px solid var(--line);
    cursor: pointer; transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.carousel-btn:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: var(--white); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-prev-icon { transform: scaleX(-1); }
[dir="rtl"] .carousel-prev-icon { transform: none; }

@media (max-width: 1000px) {
    .carousel { --per-view: 2; }
    .carousel-clients { --per-view: 3; }
}
@media (max-width: 640px) {
    .carousel { --gap: 14px; grid-auto-columns: 85%; }
    .carousel-clients { grid-auto-columns: calc((100% - var(--gap)) / 2.2); }
    .carousel-btn { width: 40px; height: 40px; }
}

/* Cartes compactes dans les carrousels de l'accueil : 6 réalisations / 6 clients visibles sur ordinateur */
.carousel { --gap: 16px; --per-view: 6; }
.carousel-clients { --per-view: 6; }

.carousel .project { border-radius: 12px; }
.carousel .project-img { aspect-ratio: 4 / 3; }
.carousel .project-placeholder { font-size: 20px; }
.carousel .project-body { padding: 12px 14px 14px; gap: 4px; }
.carousel .project-cat { font-size: 11.5px; }
.carousel .project h3 { font-size: 15px; line-height: 1.3; }
.carousel .project p {
    font-size: 13px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.carousel .client { min-height: 130px; padding: 16px 10px 12px; gap: 10px; border-radius: 12px; }
.carousel .client::before { height: 3px; }
.carousel .client-logo { min-height: 64px; }
.carousel .client-logo img { max-height: 64px; }
.carousel .client-initials { width: 52px; height: 52px; font-size: 18px; }
.carousel .client-name { font-size: 13px; padding-top: 8px; }

@media (max-width: 1200px) {
    .carousel, .carousel-clients { --per-view: 5; }
}
@media (max-width: 1000px) {
    .carousel, .carousel-clients { --per-view: 4; }
}
@media (max-width: 760px) {
    .carousel, .carousel-clients {
        --per-view: 3;
        grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    }
}
@media (max-width: 560px) {
    .carousel { --gap: 12px; grid-auto-columns: calc((100% - var(--gap)) / 2.15); }
    .carousel-clients { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3.2); }
}
