/* ==========================================================================
   DSI Consulting – Design system 2.0 (Bootstrap 5 + CSS maison)
   ========================================================================== */

:root {
    /* Couleurs pilotées depuis l'admin (Apparence) : seules --brand-700, --accent, --ink et --radius sont surchargées. */
    --brand-700: #1f3d8a;
    --accent: #f2a93b;
    --ink: #0f172a;
    --brand-950: color-mix(in srgb, var(--brand-700), #000 62%);
    --brand-900: color-mix(in srgb, var(--brand-700), #000 46%);
    --brand-800: color-mix(in srgb, var(--brand-700), #000 20%);
    --brand-600: color-mix(in srgb, var(--brand-700), #fff 14%);
    --brand-100: color-mix(in srgb, var(--brand-700) 12%, #fff);
    --brand-50: color-mix(in srgb, var(--brand-700) 5%, #fff);
    --accent-600: color-mix(in srgb, var(--accent), #000 18%);
    --body: #475569;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --radius: 16px;
    --radius-sm: calc(var(--radius) * .6);
    --radius-lg: calc(var(--radius) * 1.5);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow: 0 10px 30px -10px rgba(15, 31, 74, .18);
    --shadow-lg: 0 30px 60px -20px rgba(15, 31, 74, .28);
    --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-head);
    color: var(--ink);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }
h5 { font-size: 1.05rem; font-weight: 700; }

p { margin-bottom: 1rem; }
a { color: var(--brand-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Layout helpers ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-alt { background: var(--surface-alt); }
.section-brand { background: linear-gradient(135deg, var(--brand-950), var(--brand-800)); color: #cbd5f0; }
.section-brand h1, .section-brand h2, .section-brand h3, .section-brand h4 { color: #fff; }

.eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-head); font-size: .8rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--brand-600);
    margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); }
.section-brand .eyebrow { color: var(--accent); }

.lead-lg { font-size: 1.2rem; color: var(--body); }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.text-ink { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn { font-family: var(--font-head); font-weight: 700; border-radius: 999px; padding: .85rem 1.7rem; font-size: 1rem; transition: all .25s; border-width: 2px; display: inline-flex; align-items: center; gap: .6rem; }
.btn i { transition: transform .25s; font-size: .85em; }
.btn:hover i { transform: translateX(4px); }
.btn-brand { background: var(--brand-700); border-color: var(--brand-700); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 61, 138, .6); }
.btn-brand:hover { background: var(--brand-800); border-color: var(--brand-800); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--brand-950); box-shadow: 0 8px 20px -8px rgba(242, 169, 59, .7); }
.btn-accent:hover { background: var(--accent-600); border-color: var(--accent-600); color: var(--brand-950); transform: translateY(-2px); }
.btn-outline-brand { border-color: var(--brand-700); color: var(--brand-700); background: transparent; }
.btn-outline-brand:hover { background: var(--brand-700); color: #fff; }
.btn-outline-light-2 { border-color: rgba(255, 255, 255, .5); color: #fff; background: transparent; }
.btn-outline-light-2:hover { background: #fff; color: var(--brand-900); border-color: #fff; }
.btn-sm { padding: .55rem 1.2rem; font-size: .9rem; }
.link-arrow { font-family: var(--font-head); font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.link-arrow i { transition: transform .25s; font-size: .8em; }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.site-header .navbar { min-height: var(--header-h); padding: 0; }
.navbar-brand img { height: 40px; width: auto; }
.nav-link { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink) !important; padding: .5rem .85rem !important; border-radius: 999px; position: relative; }
.nav-link:hover { color: var(--brand-600) !important; background: var(--brand-50); }
.nav-link.active { color: var(--brand-700) !important; background: var(--brand-100); }
.header-cta { margin-left: .5rem; }
.navbar-toggler { border: 0; padding: .5rem; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); }
.navbar-toggler:focus { box-shadow: none; }
.offcanvas { max-width: 86vw; }
.offcanvas .nav-link { font-size: 1.15rem; padding: .85rem 1rem !important; border-radius: 12px; }
.header-social a, .footer-social a { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-700); margin-right: .4rem; transition: all .2s; }
.header-social a:hover { background: var(--brand-700); color: #fff; }

/* ---------- Hero (accueil) ---------- */
.hero { position: relative; color: #fff; background: var(--brand-950); overflow: hidden; }
.hero-slide { position: relative; min-height: min(86vh, 760px); display: flex; align-items: center; padding: 96px 0; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11, 21, 54, .92) 0%, rgba(15, 31, 74, .78) 45%, rgba(15, 31, 74, .35) 100%); }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; max-width: 16ch; margin-bottom: 1.25rem; }
.hero h1 .rotating { color: var(--accent); display: inline-block; }
.hero p.hero-sub { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 56ch; color: #dbe4fb; margin-bottom: 2rem; }
.hero-static { background: radial-gradient(1200px 500px at 85% -10%, rgba(43, 82, 181, .55), transparent 60%), linear-gradient(135deg, var(--brand-950), var(--brand-800)); }
.hero .carousel-indicators { margin-bottom: 1.75rem; }
.hero .carousel-indicators [data-bs-target] { width: 34px; height: 4px; border: 0; border-radius: 2px; background: #fff; opacity: .4; }
.hero .carousel-indicators .active { opacity: 1; background: var(--accent); }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 64px; opacity: .8; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2.5rem; font-size: .95rem; color: #c7d3f2; }
.hero-trust span { display: inline-flex; align-items: center; gap: .55rem; }
.hero-trust i { color: var(--accent); }

/* ---------- Page hero (pages internes) ---------- */
.page-hero { position: relative; overflow: hidden; color: #cbd5f0; padding: clamp(64px, 8vw, 110px) 0 clamp(56px, 7vw, 90px); background: radial-gradient(900px 400px at 90% -20%, rgba(43, 82, 181, .6), transparent 60%), linear-gradient(135deg, var(--brand-950), var(--brand-800)); }
.page-hero::after { content: ''; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(242, 169, 59, .12); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); max-width: 22ch; }
.page-hero .eyebrow { color: var(--accent); }
.page-hero p { max-width: 62ch; font-size: 1.15rem; margin: 1.25rem 0 0; color: #cbd5f0; }
.breadcrumb-nav { font-size: .875rem; margin-bottom: 1.5rem; }
.breadcrumb-nav a { color: #9fb3e8; }
.breadcrumb-nav a:hover { color: #fff; }
.breadcrumb-nav span { color: #fff; }
.breadcrumb-nav i { font-size: .6rem; margin: 0 .55rem; color: #6c82c4; }

/* ---------- Cards ---------- */
.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; height: 100%; transition: transform .3s, box-shadow .3s, border-color .3s; }
.card-x:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.icon-box { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-100); color: var(--brand-700); font-size: 1.35rem; margin-bottom: 1.25rem; }
.card-x:hover .icon-box { background: var(--brand-700); color: #fff; }
.card-x h3, .card-x h4 { margin-bottom: .75rem; }
.card-x p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-family: var(--font-head); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); background: var(--brand-100); padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1rem; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 2rem; margin-bottom: .85rem; }
.check-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 0; top: .15rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: var(--brand-950); font-size: .65rem; display: flex; align-items: center; justify-content: center; }
.section-brand .check-list li { color: #dbe4fb; }

/* ---------- Stats ---------- */
.stat { text-align: center; padding: 1.5rem 1rem; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.4rem, 2rem + 2vw, 3.6rem); color: var(--ink); line-height: 1; }
.section-brand .stat-num { color: #fff; }
.stat-num small { font-size: .5em; color: var(--accent); }
.stat-label { margin-top: .5rem; color: var(--muted); font-size: .95rem; }
.section-brand .stat-label { color: #a8b9e6; }

/* ---------- Timeline / steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.5rem; }
.step { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 1.25rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.step-num { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-700); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: .2rem 0 .5rem; font-size: 1.3rem; }
.step p { margin: 0; }
.timeline { position: relative; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.timeline-item { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1.75rem 1.5rem; }
.timeline-year { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--brand-700); line-height: 1; margin-bottom: .75rem; }

/* ---------- Feature split ---------- */
.split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.split-media img { width: 100%; display: block; }
.quote-block { border-left: 4px solid var(--accent); padding: .5rem 0 .5rem 1.5rem; font-size: 1.15rem; color: var(--ink); font-style: italic; }
.letter p { margin-bottom: 1.1rem; }

/* ---------- Consultants ---------- */
.person { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--brand-100); aspect-ratio: 4/5; box-shadow: var(--shadow-sm); transition: box-shadow .3s, transform .3s; }
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.person img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.person:hover img { transform: scale(1.05); }
.person-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.5rem 1.4rem; background: linear-gradient(to top, rgba(11, 21, 54, .92), transparent); color: #fff; }
.person-info h3 { color: #fff; font-size: 1.2rem; margin: 0 0 .15rem; }
.person-info p { margin: 0; font-size: .92rem; color: #cbd5f0; }
.person-link { position: absolute; inset: 0; z-index: 2; }
.person-in { position: absolute; top: 1rem; right: 1rem; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--brand-700); display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(-6px); transition: all .25s; }
.person:hover .person-in, .person:focus-within .person-in { opacity: 1; transform: none; }
.person-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-head); font-size: 4rem; font-weight: 800; color: var(--brand-600); }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; height: 100%; position: relative; }
.testimonial::before { content: '\201C'; position: absolute; top: .5rem; right: 1.5rem; font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--brand-100); }
.testimonial p { position: relative; color: var(--ink); }
.testimonial-who { display: flex; align-items: center; gap: .9rem; margin-top: 1.5rem; }
.testimonial-who img, .avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--brand-100); }
.testimonial-who strong { display: block; color: var(--ink); font-family: var(--font-head); }
.testimonial-who span { font-size: .875rem; color: var(--muted); }
.stars { color: var(--accent); letter-spacing: 2px; font-size: .9rem; margin-bottom: .75rem; }

/* ---------- Blog ---------- */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16/10; background: var(--brand-100); overflow: hidden; display: block; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .85rem; color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.post-meta i { color: var(--accent-600); margin-right: .35rem; }
.post-body h3 { font-size: 1.25rem; margin-bottom: .75rem; }
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--brand-600); }
.post-body .excerpt { flex: 1; }
.article-content { font-size: 1.125rem; line-height: 1.85; color: #334155; }
.article-content h2, .article-content h3 { margin: 2rem 0 1rem; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content blockquote { border-left: 4px solid var(--accent); padding-left: 1.25rem; font-style: italic; color: var(--ink); }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2.5rem; box-shadow: var(--shadow); }
.article-cover img { width: 100%; display: block; }
.sidebar-card { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.pagination { gap: .35rem; justify-content: center; flex-wrap: wrap; }
.page-link { border-radius: 10px !important; border: 1px solid var(--line); color: var(--ink); font-weight: 600; min-width: 42px; text-align: center; }
.page-item.active .page-link { background: var(--brand-700); border-color: var(--brand-700); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px); background: radial-gradient(700px 300px at 100% 0%, rgba(242, 169, 59, .25), transparent 60%), linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #dbe4fb; }
.cta-band h2 { color: #fff; max-width: 20ch; }

/* ---------- Forms ---------- */
.form-control, .form-select { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: 1rem; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.form-control:focus, .form-select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(43, 82, 181, .15); }
.form-control::placeholder { color: #94a3b8; }
textarea.form-control { min-height: 150px; resize: vertical; }
.form-label { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .4rem; }
.field-error { color: #b91c1c; font-size: .85rem; margin-top: .35rem; display: block; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.alert { border-radius: var(--radius-sm); border: 0; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.contact-line { display: flex; gap: 1rem; align-items: flex-start; }
.contact-line .icon-box { margin: 0; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-950); color: #9fb0d9; padding-top: clamp(56px, 7vw, 88px); }
.site-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.25rem; }
.site-footer a { color: #9fb0d9; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.footer-logo { filter: brightness(0) invert(1); height: 40px; width: auto; margin-bottom: 1.25rem; }
.footer-social a { background: rgba(255, 255, 255, .08); color: #fff; }
.footer-social a:hover { background: var(--accent); color: var(--brand-950); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 3rem; padding: 1.5rem 0; font-size: .9rem; }

/* ---------- Cookie banner & back to top ---------- */
.cookie-bar { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2000; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.25rem 1.5rem; display: none; }
.cookie-bar.is-visible { display: block; animation: rise .4s ease; }
.cookie-bar p { font-size: .92rem; margin-bottom: 1rem; }
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1500; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand-700); color: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: var(--brand-950); }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    :root { --header-h: 66px; }
    .hero-slide { min-height: min(78vh, 680px); padding: 72px 0 96px; }
    .hero-overlay { background: linear-gradient(180deg, rgba(11, 21, 54, .85), rgba(15, 31, 74, .75)); }
    .step { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    body { font-size: 1rem; }
    .btn { width: 100%; justify-content: center; }
    .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }
    .card-x { padding: 1.5rem; }
}

@media print {
    .site-header, .site-footer, .cookie-bar, .to-top { display: none !important; }
}

/* ---------- Menu : offcanvas en mobile, barre horizontale en desktop (Bootstrap 5.0 ne le gère pas nativement) ---------- */
@media (min-width: 1200px) {
    .site-header .offcanvas {
        position: static; visibility: visible !important; transform: none !important;
        background: transparent; border: 0; width: auto; max-width: none; flex-grow: 1;
        display: flex; flex-direction: row; transition: none;
    }
    .site-header .offcanvas-body { display: flex; flex-grow: 1; padding: 0; overflow: visible; align-items: center; }
    .site-header .navbar-nav { flex-direction: row; gap: .15rem; }
}
.hero .eyebrow, .page-hero .eyebrow { color: var(--accent); }

.post-thumb-ph { display:flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:2.2rem; color:var(--brand-600); background: linear-gradient(135deg, var(--brand-100), var(--brand-50)); }

.icons-circle .icon-box, .icons-circle .step-num { border-radius: 50%; }
