/* ==========================================================================
   CAPPS — socle commun du site (lot 3) : jetons de couleur clair/sombre,
   base, boutons, en-tête, menu mobile, sections, cartes, pied de page,
   barre fixe téléphone et bouton WhatsApp. Utilisé par toutes les pages.
   Sombre via [data-theme="dark"] ou, sans choix mémorisé, prefers-color-scheme.
   ========================================================================== */


:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-2: #f1f1f8;
    --text: #0f172a;
    --muted: #5b6475;
    --line: #e4e4ee;
    --brand: #4f46e5;
    --brand-2: #7c3aed;
    --brand-btn: #4f46e5;
    --brand-soft: #eef0ff;
    --accent: #f59e0b;
    --ok: #059669;
    --danger: #dc2626;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .18);
    --hero-grad: radial-gradient(1200px 500px at 85% -10%, #e0e3ff 0%, transparent 60%),
                 radial-gradient(800px 400px at -10% 10%, #f3e8ff 0%, transparent 55%);
    --header-h: 68px;
    color-scheme: light;
}

/* Sombre : choix explicite */
:root[data-theme="dark"] {
    --bg: #0b0d1a;
    --surface: #121528;
    --surface-2: #181c33;
    --text: #eef0fb;
    --muted: #a3a9c2;
    --line: #262b47;
    --brand: #818cf8;
    --brand-2: #c084fc;
    --brand-btn: #6366f1;
    --brand-soft: #1e2147;
    --accent: #fbbf24;
    --ok: #34d399;
    --danger: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .7);
    --hero-grad: radial-gradient(1200px 500px at 85% -10%, #262a6b 0%, transparent 60%),
                 radial-gradient(800px 400px at -10% 10%, #2d1b4e 0%, transparent 55%);
    color-scheme: dark;
}

/* Sombre : préférence système, sauf si l'utilisateur a choisi le clair */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b0d1a;
        --surface: #121528;
        --surface-2: #181c33;
        --text: #eef0fb;
        --muted: #a3a9c2;
        --line: #262b47;
        --brand: #818cf8;
        --brand-2: #c084fc;
        --brand-btn: #6366f1;
        --brand-soft: #1e2147;
        --accent: #fbbf24;
        --ok: #34d399;
        --danger: #f87171;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .7);
        --hero-grad: radial-gradient(1200px 500px at 85% -10%, #262a6b 0%, transparent 60%),
                     radial-gradient(800px 400px at -10% 10%, #2d1b4e 0%, transparent 55%);
        color-scheme: dark;
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
.v2 *,
.v2 *::before,
.v2 *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body.v2 {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
html[lang="ar"] body.v2 {
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
}

/* Remise à zéro sans spécificité (:where) pour ne pas écraser les composants */
:where(.v2) :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; padding: 0; }
:where(.v2) :where(ul, ol) { list-style: none; }
:where(.v2) a { color: inherit; text-decoration: none; }
:where(.v2) :where(img, video) { max-width: 100%; }
:where(.v2) button { font: inherit; color: inherit; }
.v2 :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.skip {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
    background: var(--brand-btn); color: #fff !important; padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; width: 14px; height: 14px; }
[dir="rtl"] .i.arrow { transform: scaleX(-1); }
/* Lot 4 (D19) : flèches directionnelles des pages en RTL */
[dir="rtl"] .bx-right-arrow-alt, [dir="rtl"] .bx-chevron-right { transform: scaleX(-1); }
[dir="rtl"] .matek-ltr-embed { direction: ltr; unicode-bidi: isolate; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 12px;
    font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center;
    border: 1px solid transparent; white-space: nowrap; cursor: pointer;
    transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-btn); color: #fff; box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .7); }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.full { width: 100%; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-soft);
    padding: 6px 12px; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.mt { margin-top: 14px !important; }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .5px; flex: none; }
.logo img { width: 36px; height: 36px; border-radius: 10px; background: #fff; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.links { display: flex; gap: 22px; white-space: nowrap; font-size: 15px; color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--text); }
.nav .right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.phone .i { width: 15px; height: 15px; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; font-weight: 600; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 0 10px; min-height: 36px; color: var(--muted); cursor: pointer; }
.lang button:hover { color: var(--text); }
.lang button.is-on { background: var(--surface-2); color: var(--text); }

.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
    display: inline-grid; place-items: center; color: var(--muted); background: var(--surface); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); }
.icon-btn .i { width: 17px; height: 17px; }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-btn .sun { display: block; }
    :root:not([data-theme="light"]) .icon-btn .moon { display: none; }
}
.burger { display: none; }
.burger .close { display: none; }
.burger[aria-expanded="true"] .open { display: none; }
.burger[aria-expanded="true"] .close { display: block; }

/* Menu déroulant tablette / téléphone */
.menu-mobile { border-top: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.menu-mobile[hidden] { display: none; }
.menu-mobile .wrap { padding-top: 12px; padding-bottom: 18px; display: grid; gap: 14px; }
.menu-links { display: grid; }
.menu-links a { padding: 12px 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
.menu-tools { display: flex; gap: 10px; align-items: center; }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }


.v2 h1 { font-size: 52px; line-height: 1.08; letter-spacing: -1.2px; font-weight: 800; margin: 18px 0; }
.v2 h1 em {
    font-style: normal; color: var(--brand);
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[lang="ar"] .v2 h1 { letter-spacing: 0; line-height: 1.25; }
.check { color: var(--ok); font-weight: 700; margin-inline-end: 6px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section.pt0 { padding-top: 0; }
.v2 h2 { font-size: 36px; letter-spacing: -.8px; line-height: 1.15; margin-bottom: 12px; font-weight: 700; }
html[lang="ar"] .v2 h2 { letter-spacing: 0; line-height: 1.3; }
.sub { color: var(--muted); max-width: 640px; margin-bottom: 36px; }
.more { margin-top: 18px; font-size: 15px; font-weight: 600; }
.more a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); }
.more a:hover { text-decoration: underline; }
.more .i { width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; }
.card .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.card .ic .i { width: 20px; height: 20px; }
.card h3 { font-size: 17px; margin-bottom: 6px; line-height: 1.3; }
.card p { font-size: 14px; color: var(--muted); }
/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 40px; color: var(--muted); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.foot-brand .logo { color: var(--text); font-size: 18px; margin-bottom: 10px; }
.foot-contact { display: grid; gap: 4px; margin-top: 14px; }
.foot-contact a:hover, .foot-col a:hover, .foot-legal a:hover { color: var(--text); }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-h { color: var(--text); font-weight: 700; margin-bottom: 4px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* Téléphone : barre fixe + WhatsApp (masqués par défaut) */
.mbar, .fab { display: none; }

/* Lot 6 : en-tête à six liens (Documentation). Sous 1440 px, le bouton téléphone de l'en-tête
   n'affiche plus que son icône (le numéro reste lu par les lecteurs d'écran) ; sous 1200 px,
   les liens passent dans le menu. L'en-tête ne déborde jamais. */
.site-header .wrap { max-width: 1400px; }
.links { gap: 18px; }
@media (max-width: 1439px) {
    .nav .right .phone { padding-inline: 10px; }
    .nav .right .phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1279px) {
    .links { display: none; }
    .burger { display: inline-grid; }
}

/* Cookies (cookies.css) : bouton à garder au-dessus de la barre mobile */
.cookiesbox-wrapper { z-index: 15; }

@media (max-width: 1024px) {
    .wrap { padding: 0 28px; }
    .links, .nav .right .phone { display: none; }
    .burger { display: inline-grid; }
    .v2 h1 { font-size: 44px; }
    .foot { grid-template-columns: 1fr 1fr; }
    .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    :root { --header-h: 58px; }
    .wrap { padding: 0 18px; }
    .nav { gap: 12px; }
    .logo { font-size: 18px; }
    .logo img { width: 32px; height: 32px; }
    .nav .right .login, .nav .right .lang, .nav .right .theme { display: none; }
    .v2 h1 { font-size: 33px; letter-spacing: -.6px; margin: 14px 0 12px; }
    .section { padding: 44px 0; }
    .v2 h2 { font-size: 26px; }
    .sub { margin-bottom: 24px; }
    .card { padding: 16px; }
    .foot { grid-template-columns: 1fr 1fr; gap: 24px; }
    .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
    .foot-bottom { flex-direction: column; }
    .menu-actions { grid-template-columns: 1fr; }

    .mbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: var(--surface);
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        border-top: 1px solid var(--line);
    }
    .mbar .btn { flex: 1; min-height: 48px; padding: 0 12px; }
    .mbar .call { flex: 0 0 48px; padding: 0; }
    .fab {
        display: grid; place-items: center; position: fixed; inset-inline-end: 14px; bottom: calc(86px + env(safe-area-inset-bottom));
        width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: var(--shadow); z-index: 30;
    }
    .fab svg { width: 28px; height: 28px; fill: currentColor; }
    .cookiesbox-wrapper { bottom: calc(86px + env(safe-area-inset-bottom)); left: 14px; }
}

@media (max-width: 360px) {
    .v2 h1 { font-size: 29px; }
    .nav .right .trial { padding: 0 10px; }
    .foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .v2 *, .v2 *::before, .v2 *::after { transition: none !important; }
}

/* ==========================================================================
   Pages intérieures refaites (lot 3) — socle de contenu
   Toutes les règles sont limitées à .v2-page : l'accueil n'est pas concerné.
   ========================================================================== */
.v2-page .hidden, .v2-page [hidden] { display: none !important; }
.v2-page .sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.v2-page #loading-screen, .v2-page .back-to-top { display: none !important; }
.v2-page i.fa { display: none; }
.v2-page i.bx { line-height: 1; color: inherit; }

.v2-page main { display: block; overflow-x: clip; }
.v2-page main .container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.v2-page main section { position: relative; }
.v2-page main img { max-width: 100%; height: auto; }
.v2-page main h1 { font-size: 46px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; margin: 14px 0 16px; color: var(--text); }
.v2-page main h2 { font-size: 32px; letter-spacing: -.6px; line-height: 1.18; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.v2-page main h3 { font-size: 19px; line-height: 1.3; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.v2-page main h4 { font-size: 16px; line-height: 1.35; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.v2-page main p { color: var(--muted); }
.v2-page main strong, .v2-page main b { color: var(--text); }
html[lang="ar"] .v2-page main :is(h1, h2) { letter-spacing: 0; line-height: 1.3; }

/* Titres en dégradé (accents historiques) */
.v2-page main :is(.highlight-text, [class*="__accent"], [class*="-accent"], [class*="__highlight"], .text-gradient) {
    color: var(--brand);
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Étiquettes de section historiques (eyebrow) */
.v2-page main :is(.eyebrow-tag, .eyebrow, p.eyebrow) {
    display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0 0 12px;
    font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-soft);
    padding: 6px 12px; border-radius: 999px; text-transform: none; letter-spacing: 0;
}

/* Bandeau d'introduction commun (premier bloc de chaque page) */
.v2-page .v2-hero-band { background: var(--hero-grad); }

/* Boutons historiques harmonisés */
.v2-page :is(.btn-cta, .btn-capps, .btn.btn-primary, .btn.btn-secondary, .btn-outline-primary, .btn-primary--hero, .btn-primary--shine, .btn-secondary--hero, .capps-btn-secondary-action, .btn-cta--vibrant-blue) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line);
    font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none;
    background: var(--surface); color: var(--text); cursor: pointer; box-shadow: none;
    transition: background-color .15s, border-color .15s, transform .15s;
}
.v2-page :is(.btn-cta, .btn-capps, .btn.btn-primary, .btn.btn-secondary, .btn-outline-primary, .btn-primary--hero, .btn-secondary--hero, .capps-btn-secondary-action):hover { border-color: var(--brand); }
.v2-page :is(.btn-cta--primary, .btn-capps--primary, .btn.btn-primary, .btn-primary--hero, .btn-primary--shine, .btn-cta--vibrant-blue) {
    background: var(--brand-btn); border-color: var(--brand-btn); color: #fff;
    box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .7);
}
.v2-page :is(.btn-cta--primary, .btn-capps--primary, .btn.btn-primary, .btn-primary--hero, .btn-primary--shine, .btn-cta--vibrant-blue):hover { background: #4338ca; border-color: #4338ca; }
.v2-page :is(.btn-cta, .btn-capps, .btn) i.bx { font-size: 18px; }

/* Champs de formulaire (pages et fenêtres) */
.v2-page :is(main, .modal) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="url"], input:not([type]), select, textarea) {
    width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font: inherit; font-size: 15px; line-height: 1.4;
}
.v2-page :is(main, .modal) textarea { min-height: 130px; resize: vertical; }
.v2-page :is(main, .modal) :is(input, select, textarea):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.v2-page :is(main, .modal) ::placeholder { color: var(--muted); opacity: .8; }
.v2-page :is(main, .modal) input[type="checkbox"], .v2-page :is(main, .modal) input[type="radio"] { accent-color: var(--brand-btn); width: 18px; height: 18px; }
.v2-page :is(main, .modal) input[type="file"] { width: 100%; font: inherit; font-size: 14px; color: var(--muted); }
.v2-page :is(main, .modal) label { font-size: 14px; font-weight: 600; color: var(--text); }

/* Fenêtres modales (Bootstrap n'est plus chargé : voir site_v2.js) */
.v2-page .modal { position: fixed; inset: 0; z-index: 100; display: none; overflow-y: auto; padding: 24px 16px; }
.v2-page .modal.show { display: block; }
.v2-page .modal-dialog { max-width: 560px; margin: 6vh auto; }
.v2-page .modal-content {
    background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow); overflow: hidden;
}
.v2-page :is(.modal-header, .modal-body, .modal-footer) { padding: 20px 22px; }
.v2-page .modal-header { border-bottom: 1px solid var(--line); }
.v2-page .modal-title { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.v2-page .modal-footer { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.v2-page .modal p { color: var(--muted); margin: 0 0 6px; }
.v2-page .modal a { color: var(--brand); }
.v2-page .modal .btn, .v2-page .modal button.btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.v2-page .modal .portages_cookies_bloc_7 { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
.v2-page .form-check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.v2-page .form-check + .form-check { border-top: 1px solid var(--line); }
.v2-page .form-check-input { margin-top: 3px; flex: none; }
.v2-page .form-check-label p:first-child { color: var(--text); font-weight: 600; }
.v2-page .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.v2-page .modal .close { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.v2-page .modal .area { display: none; }   /* cercles décoratifs animés */
.v2-page .modal .container { padding: 0; max-width: none; }
.v2-page .modal .portages-teams-img { display: block; max-height: 150px; width: auto; margin: 12px auto; }
.v2-page .modal .portages-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-inline-end: 14px; color: var(--brand); font-weight: 600; text-decoration: none; }
.v2-page .modal form > div { margin-bottom: 10px; }
.v2-page .modal .portages_contact_modal_bloc_12 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v2-page .modal .portages-text-contact { display: block; font-weight: 600; margin-bottom: 6px; }
.v2-page .modal .portages_contact_etreRappeler { width: 100%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
@media (max-width: 640px) { .v2-page .modal .portages_contact_modal_bloc_12 { grid-template-columns: 1fr; } }
.v2-modal-backdrop { position: fixed; inset: 0; background: rgba(8, 10, 25, .55); z-index: 99; }
body.v2-modal-open { overflow: hidden; }

/* Préférences cookies : bouton rond discret, en bas à gauche */
.v2-page .cookiesbox-wrapper { position: fixed; left: 20px; bottom: 20px; z-index: 25; width: 44px; height: 44px; }
.v2-page .cookiesbox-toggle {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
    background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 22px;
}
.v2-page .cookiesbox-toggle:hover { color: var(--brand); border-color: var(--brand); }
.v2-page .cookiesbox-toggle p {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; margin: 0;
}

/* Bloc « merci » / attente des formulaires de contact */
.v2-page .thank-you-pop { text-align: center; padding: 24px 12px; }
.v2-page .thank-you-pop i.bx { font-size: 46px; color: var(--ok); }
.v2-page .thank-you-pop h1 { font-size: 22px; margin: 10px 0; }

@media (max-width: 1024px) {
    .v2-page main .container { padding: 0 28px; }
    .v2-page main h1 { font-size: 40px; }
    .v2-page main h2 { font-size: 28px; }
}
@media (max-width: 640px) {
    .v2-page main .container { padding: 0 18px; }
    .v2-page main h1 { font-size: 31px; letter-spacing: -.5px; }
    .v2-page main h2 { font-size: 24px; }
    .v2-page :is(.btn-cta, .btn-capps, .btn.btn-primary, .btn.btn-secondary, .btn-outline-primary, .btn-primary--hero, .btn-secondary--hero, .capps-btn-secondary-action) { min-height: 48px; }
    .v2-page .cookiesbox-wrapper { left: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); }
    .v2-page .modal-dialog { margin: 2vh auto; }
}

/* --------------------------------------------------------------------------
   Pages éditoriales (rendez-vous, mentions légales, confidentialité) :
   bandeau d'introduction, cartes de sections, appel final
   -------------------------------------------------------------------------- */
.v2-page .privacy-hero { background: var(--hero-grad); padding: 64px 0 56px; }
.v2-page .privacy-hero__inner { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.v2-page .privacy-hero__accent-line, .v2-page .privacy-hero__visual { display: none; }   /* maquettes décoratives (aria-hidden) */
.v2-page .privacy-hero__content { max-width: 780px; }
.v2-page .privacy-hero__badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
    color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px;
}
.v2-page main .privacy-hero__text { font-size: 18px; max-width: 680px; }
.v2-page .privacy-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.v2-page .privacy-container { max-width: 1180px; margin: 0 auto; padding: 8px 32px 72px; display: grid; gap: 18px; }
.v2-page .privacy-section { margin: 0; }
.v2-page .privacy-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px;
}
.v2-page main .privacy-section__title { display: flex; align-items: center; gap: 12px; font-size: 24px; margin-bottom: 14px; }
.v2-page .privacy-section__title i.bx {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
    background: var(--brand-soft); color: var(--brand); font-size: 20px;
}
.v2-page main :is(.privacy-card__content, .privacy-card) p { margin: 0 0 10px; font-size: 15.5px; }
.v2-page main .privacy-card__intro { font-size: 16px; max-width: 760px; }
.v2-page main .privacy-card h3:not(.cookie-card__title) { font-size: 17px; margin-top: 16px; }
.v2-page .legal-list { display: grid; gap: 6px; margin: 4px 0 6px; color: var(--muted); }
.v2-page .legal-list li { padding-inline-start: 18px; position: relative; }
.v2-page .legal-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.v2-page .privacy-card ul:not([class]) { display: grid; gap: 6px; padding-inline-start: 20px; list-style: disc; color: var(--muted); margin: 6px 0 10px; }

.v2-page .cookie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.v2-page .cookie-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.v2-page .cookie-card__icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px;
    background: var(--brand-soft); color: var(--brand); font-size: 20px;
}
.v2-page main .cookie-card__title { font-size: 16px; margin-bottom: 6px; }
.v2-page main .cookie-card p { font-size: 14px; margin: 0; }
.v2-page .privacy-card > div:last-child:not([class]) { margin-top: 20px; }

.v2-page .browser-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.v2-page main .browser-item h3 { font-size: 15px; margin: 0 !important; }

.v2-page .privacy-cta {
    background: linear-gradient(135deg, #4338ca, #7c3aed); color: #fff; border-radius: 22px; padding: 40px 44px;
    display: grid; gap: 10px; justify-items: start;
}
.v2-page main .privacy-cta__title { color: #fff; margin: 0; }
.v2-page main .privacy-cta__text { color: rgba(255, 255, 255, .85); max-width: 640px; margin: 0; }
.v2-page .privacy-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.v2-page .privacy-cta .btn-capps--white { background: #fff; color: #3730a3; border-color: #fff; }
.v2-page .privacy-cta :is(.btn-capps--outline-white, .btn-capps--outline, .btn-capps--secondary) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
.v2-page .privacy-cta .btn-capps--primary { background: #fff; color: #3730a3; border-color: #fff; box-shadow: none; }

@media (max-width: 1024px) {
    .v2-page .privacy-hero__inner { padding: 0 28px; }
    .v2-page .privacy-container { padding: 8px 28px 56px; }
}
@media (max-width: 640px) {
    .v2-page .privacy-hero { padding: 32px 0 30px; }
    .v2-page .privacy-hero__inner { padding: 0 18px; }
    .v2-page main .privacy-hero__text { font-size: 16px; }
    .v2-page .privacy-hero__actions > a { flex: 1 1 100%; }
    .v2-page .privacy-container { padding: 4px 18px 44px; gap: 12px; }
    .v2-page .privacy-card { padding: 20px 16px; border-radius: 16px; }
    .v2-page main .privacy-section__title { font-size: 20px; }
    .v2-page .privacy-cta { padding: 28px 20px; }
    .v2-page .privacy-cta__actions > a { flex: 1 1 100%; }
}

/* ==========================================================================
   Lot 5 (D24) : attente de la traduction en anglais et en arabe.
   La classe est posée par l'extrait en tête de chaque page (jamais en français)
   et retirée par common.js dès les traductions appliquées (filet : 4 s).
   ========================================================================== */
html.capps-i18n-wait body { visibility: hidden; }
html.capps-i18n-wait::before {
    content: ""; position: fixed; inset: 0; z-index: 2147483646;
    /* logo sur pastille blanche (le PNG a un fond blanc) : lisible en clair comme en sombre */
    background: url("../../images/capps/logo-capps-30.png") center / 36px 36px no-repeat,
        radial-gradient(circle at center, #fff 0 26px, transparent 27px), var(--bg);
}
html.capps-i18n-wait::after {
    content: ""; position: fixed; top: 50%; left: 50%; z-index: 2147483647;
    width: 64px; height: 64px; margin: -32px 0 0 -32px; box-sizing: border-box;
    border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand);
    animation: capps-i18n-spin .8s linear infinite;
}
@keyframes capps-i18n-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html.capps-i18n-wait::after { animation-duration: 2.4s; } }
