/* ==========================================================================
   CRMNC — Site public
   Design system commun : en-tête, pied de page, sections, boutons, formulaires
   ========================================================================== */

:root {
    --navy-950: #071629;
    --navy-900: #0b2140;
    --navy-800: #112c53;
    --navy-700: #1a3d6e;
    --teal: #16a3b5;
    --teal-600: #118797;
    --teal-50: #e7f6f8;
    --gold: #b89a62;
    --gold-soft: #efe6d4;

    --ink: #142035;
    --body: #3d4a5f;
    --mute: #6b778b;
    --line: #e2e6ee;
    --paper: #f7f6f2;
    --surface: #ffffff;
    --ok: #15803d;
    --bad: #c53030;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(11, 33, 64, .06), 0 1px 3px rgba(11, 33, 64, .05);
    --shadow: 0 10px 30px -12px rgba(11, 33, 64, .18);
    --shadow-lg: 0 30px 60px -20px rgba(11, 33, 64, .28);

    --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --header-h: 76px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body.pub {
    margin: 0;
    background: var(--surface);
    color: var(--body);
    font: 400 16px/1.65 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums;
    text-rendering: optimizeLegibility;
}
.pub h1, .pub h2, .pub h3, .pub h4 {
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin: 0;
}
.pub h5, .pub h6 { font-family: var(--font-sans); color: var(--ink); }
.pub p { margin: 0; }
.pub a { color: var(--teal-600); text-decoration: none; transition: color .2s var(--ease); }
.pub a:hover { color: var(--navy-800); }
.pub img { max-width: 100%; }
.pub ::selection { background: var(--teal); color: #fff; }
.pub :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.pub main { display: block; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 600 12px/1 var(--font-sans);
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--teal-600);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow.on-dark { color: #8fdbe5; }

.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }
.section-paper { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 16px; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--mute); }

/* ---------- Buttons ---------- */
.btn-pub {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 50px; padding: 0 26px;
    border-radius: 999px; border: 1.5px solid transparent;
    font: 600 15px/1 var(--font-sans); letter-spacing: .01em;
    cursor: pointer; white-space: nowrap; user-select: none;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease), transform .15s var(--ease);
}
.btn-pub:active { transform: translateY(1px); }
.btn-pub i { font-size: 1.1em; line-height: 1; transition: transform .2s var(--ease); }
.btn-pub:hover i.bi-arrow-right { transform: translateX(3px); }
.btn-pub:hover i.bi-arrow-left { transform: translateX(-3px); }
.btn-pub.sm { height: 42px; padding: 0 20px; font-size: 14px; }
.btn-pub.lg { height: 56px; padding: 0 32px; font-size: 16px; }
.btn-pub[disabled], .btn-pub.is-disabled { opacity: .45; pointer-events: none; }

.pub .btn-primary-pub { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -10px rgba(22, 163, 181, .7); }
.pub .btn-primary-pub:hover { background: var(--teal-600); color: #fff; box-shadow: 0 14px 30px -10px rgba(22, 163, 181, .75); }
.pub .btn-navy { background: var(--navy-800); color: #fff; }
.pub .btn-navy:hover { background: var(--navy-900); color: #fff; box-shadow: var(--shadow); }
.pub .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.pub .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.pub .btn-ghost-light { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.pub .btn-ghost-light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.pub .btn-link-pub { background: none; border: 0; padding: 0; height: auto; color: var(--mute); font-weight: 500; }
.pub .btn-link-pub:hover { color: var(--ink); }

/* ---------- Page header (pages internes) ---------- */
.page-hero {
    position: relative; overflow: hidden;
    padding: calc(var(--header-h) + 64px) 0 64px;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(22, 163, 181, .22), transparent 60%),
        radial-gradient(700px 360px at 0% 120%, rgba(184, 154, 98, .16), transparent 60%),
        linear-gradient(160deg, var(--navy-900), var(--navy-800));
    color: #fff;
}
.page-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, #000, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); margin-top: 16px; max-width: 760px; }
.page-hero p { color: rgba(255, 255, 255, .78); font-size: 18px; margin-top: 16px; max-width: 640px; }
.breadcrumb-pub { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255, 255, 255, .6); margin-bottom: 24px; }
.breadcrumb-pub a { color: rgba(255, 255, 255, .8); }
.breadcrumb-pub a:hover { color: #fff; }

/* ---------- Cards ---------- */
.card-pub {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font: 600 14px/1.3 var(--font-sans); color: var(--ink); }
.field .req { color: var(--teal-600); margin-left: 2px; }
.field .opt { color: var(--mute); font-weight: 400; font-size: 13px; margin-left: 4px; }
.field-hint { font-size: 13px; color: var(--mute); }
.field-error { display: none; font-size: 13px; color: var(--bad); }
.field.has-error .field-error { display: block; }
.input-pub {
    display: flex; align-items: center; gap: 10px;
    height: 52px; padding: 0 16px;
    background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.input-pub > i { color: var(--mute); font-size: 18px; flex: none; transition: color .2s; }
.input-pub input {
    flex: 1; min-width: 0; height: 100%;
    border: 0; outline: 0; background: transparent;
    font: 500 15.5px var(--font-sans); color: var(--ink);
}
.input-pub input::placeholder { color: #a3acbb; font-weight: 400; }
.input-pub:hover { border-color: #c9d0dc; }
.input-pub:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(22, 163, 181, .14); }
.input-pub:focus-within > i { color: var(--teal-600); }
.field.has-error .input-pub { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(197, 48, 48, .1); }
.field.is-valid .input-pub > i { color: var(--ok); }

.check-pub { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 15px; color: var(--body); }
.check-pub input { position: absolute; opacity: 0; pointer-events: none; }
.check-pub .box {
    width: 22px; height: 22px; flex: none; margin-top: 1px;
    border-radius: 7px; border: 1.5px solid #c3cad6; background: #fff;
    display: grid; place-items: center; color: #fff; font-size: 14px;
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.check-pub .box i { opacity: 0; transform: scale(.6); transition: .2s var(--ease); }
.check-pub input:checked + .box { background: var(--teal); border-color: var(--teal); }
.check-pub input:checked + .box i { opacity: 1; transform: none; }
.check-pub input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(22, 163, 181, .2); }
.check-pub.has-error .box { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(197, 48, 48, .1); }

/* ---------- Footer ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 700 19px/1 var(--font-serif); letter-spacing: .06em; }
.brand-tag { font: 500 10.5px/1 var(--font-sans); letter-spacing: .2em; text-transform: uppercase; margin-top: 5px; }
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .7); font-size: 15px; }
.site-footer .footer-top { padding: 80px 0 56px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 48px; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: rgba(255, 255, 255, .5); }
.site-footer h4 {
    color: #fff; font: 600 13px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase;
    margin-bottom: 22px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.site-footer a { color: rgba(255, 255, 255, .7); }
.site-footer a:hover { color: #fff; }
.footer-about { margin-top: 20px; line-height: 1.7; max-width: 340px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact i { color: #8fdbe5; font-size: 17px; margin-top: 2px; }
.footer-contact b { color: #fff; font-weight: 600; display: block; font-size: 13px; letter-spacing: .02em; }
.footer-social { display: flex; gap: 10px; margin-top: 24px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .18); font-size: 18px;
    transition: background .2s, border-color .2s;
}
.footer-social a:hover { background: var(--teal); border-color: var(--teal); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 24px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 13.5px; color: rgba(255, 255, 255, .5);
}
@media (max-width: 991px) {
    .site-footer .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 575px) {
    .site-footer .footer-top { grid-template-columns: 1fr; padding: 56px 0 40px; }
}

/* ---------- Back to top ---------- */
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--navy-800); color: #fff !important; font-size: 22px;
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--teal); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .pub *, .pub *::before, .pub *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
    .wrap { padding: 0 16px; }
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 40px; }
    .page-hero { padding: calc(var(--header-h) + 40px) 0 44px; }
    .page-hero p { font-size: 16px; }
}

/* ---------- jquery-confirm, harmonisé ---------- */
.pub .jconfirm .jconfirm-box { border-radius: var(--radius) !important; font-family: var(--font-sans); }
.pub .jconfirm .jconfirm-title { font-family: var(--font-serif) !important; }

/* ---------- Bouton en cours d'envoi ---------- */
.btn-pub.is-loading { pointer-events: none; opacity: .85; }
.btn-pub.is-loading i { display: none; }
.btn-pub.is-loading::after {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: pubSpin .7s linear infinite;
}
@keyframes pubSpin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Sections partagées : expertises, cabinet, méthode, direction, équipe, CTA
   ========================================================================== */

/* ---------- Expertises ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.service-card {
    position: relative; background: #fff; padding: 40px 36px 44px;
    transition: background .35s var(--ease);
}
.service-card::before {
    content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.service-card:hover { background: var(--paper); }
a.service-card { display: block; color: inherit; text-decoration: none; }
a.service-card:hover { color: inherit; }
.service-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--teal-600); }
.service-more i { transition: transform .2s var(--ease); }
a.service-card:hover .service-more i { transform: translateX(4px); }
.service-card:hover::before { transform: scaleX(1); }
.service-num { position: absolute; top: 32px; right: 32px; font: 500 14px/1 var(--font-serif); color: #b7bfcc; letter-spacing: .05em; }
.service-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: grid; place-items: center;
    font-size: 24px; color: var(--teal-600); background: var(--teal-50);
    transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.service-card:hover .service-icon { background: var(--navy-800); color: #fff; transform: translateY(-3px); }
.service-card h3 { font-size: 22px; margin: 26px 0 12px; }
.service-card p { font-size: 15.5px; color: var(--mute); }

@media (max-width: 991px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } .service-card { padding: 32px 24px 36px; } }

/* ---------- Le cabinet ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-visual { position: relative; }
.about-visual img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.about-visual::before {
    content: ""; position: absolute; inset: -18px auto auto -18px; width: 45%; height: 45%;
    border: 1px solid var(--gold); border-radius: var(--radius-lg); z-index: -1;
}
.about-badge {
    position: absolute; right: -24px; bottom: 36px;
    display: flex; gap: 14px; align-items: center;
    background: #fff; padding: 18px 22px; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); max-width: 270px;
}
.about-badge i { font-size: 28px; color: var(--teal); }
.about-badge span { font-size: 13.5px; color: var(--mute); line-height: 1.4; }
.about-badge b { display: block; color: var(--ink); font-size: 15px; }
.about-copy h2 { font-size: clamp(30px, 3.4vw, 42px); margin-top: 16px; }
.lead-pub { font-size: 17.5px; margin-top: 20px !important; color: var(--body); }
.feature-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.feature-list li { display: flex; gap: 16px; }
.feature-list li > i {
    width: 30px; height: 30px; flex: none; margin-top: 2px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--navy-800); color: #fff; font-size: 16px;
}
.feature-list b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.feature-list div { color: var(--mute); font-size: 15.5px; }

@media (max-width: 991px) {
    .about-grid { grid-template-columns: 1fr; gap: 56px; }
    .about-visual { max-width: 560px; }
    .about-badge { right: 16px; }
}

/* ---------- Méthode ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; position: relative; }
.process::before {
    content: ""; position: absolute; top: 28px; left: 28px; right: 28px; height: 1px;
    background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.process li { position: relative; }
.process-step {
    position: relative; z-index: 1;
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 1px solid var(--line);
    font: 600 22px/1 var(--font-serif); color: var(--navy-800);
    box-shadow: 0 0 0 8px #fff;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
}
.process li:hover .process-step { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.process h3 { font-size: 21px; margin: 24px 0 10px; }
.process p { color: var(--mute); font-size: 15.5px; }
@media (max-width: 991px) {
    .process { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
    .process::before { display: none; }
}
@media (max-width: 575px) { .process { grid-template-columns: 1fr; } }

/* ---------- Direction ---------- */
.section-dark {
    position: relative; overflow: hidden;
    background:
        radial-gradient(700px 380px at 100% 0%, rgba(22, 163, 181, .18), transparent 60%),
        linear-gradient(160deg, var(--navy-900), var(--navy-950));
    color: rgba(255, 255, 255, .78);
}
.quote-grid { display: grid; grid-template-columns: 340px 1fr; gap: 80px; align-items: center; }
.quote-portrait { margin: 0; position: relative; }
.quote-portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-lg); filter: saturate(.9); outline: 1px solid rgba(184, 154, 98, .55); outline-offset: 10px; }
.quote-portrait figcaption { margin-top: 28px; }
.quote-portrait figcaption b { display: block; color: #fff; font: 600 19px/1.3 var(--font-serif); }
.quote-portrait figcaption span { font-size: 14px; color: #8fdbe5; letter-spacing: .04em; }
.quote-copy h2 { color: #fff; font-size: clamp(34px, 4vw, 50px); margin-top: 16px; font-style: italic; font-weight: 500; }
.quote-copy blockquote { margin: 28px 0 0; padding-left: 28px; border-left: 2px solid var(--gold); }
.quote-copy blockquote p { font-size: 17px; line-height: 1.8; }
.quote-copy blockquote p + p { margin-top: 16px; }
@media (max-width: 991px) {
    .quote-grid { grid-template-columns: 1fr; gap: 48px; }
    .quote-portrait { max-width: 280px; }
}

/* ---------- Équipe ---------- */
.team-card {
    margin: 0; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 56px 48px 44px; box-shadow: var(--shadow);
    position: relative;
}
.team-card::before {
    content: "“"; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    font: 700 120px/1 var(--font-serif); color: var(--gold-soft);
}
.team-card img { position: relative; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow); }
.team-card blockquote { margin: 26px auto 0; max-width: 620px; font: italic 500 19px/1.7 var(--font-serif); color: var(--ink); }
.team-card figcaption { margin-top: 26px; }
.team-card figcaption b { display: block; color: var(--ink); font-weight: 600; }
.team-card figcaption span { font-size: 14px; color: var(--teal-600); }
@media (max-width: 575px) { .team-card { padding: 48px 22px 36px; } .team-card blockquote { font-size: 17px; } }

/* ---------- Bandeau CTA ---------- */
.cta-band { padding: 0 0 104px; }
.cta-band.on-paper { background: var(--paper); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
.cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    padding: 56px 64px; border-radius: var(--radius-lg);
    background:
        radial-gradient(600px 300px at 100% 100%, rgba(22, 163, 181, .35), transparent 60%),
        linear-gradient(135deg, var(--navy-800), var(--navy-950));
    color: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow-lg);
}
.cta-inner h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin: 14px 0 10px; max-width: 620px; }
.cta-inner .btn-pub { flex: none; }
@media (max-width: 991px) {
    .cta-inner { flex-direction: column; align-items: flex-start; padding: 44px 28px; }
}
@media (max-width: 575px) { .cta-inner .btn-pub, .cta-actions { width: 100%; } .cta-band { padding-bottom: 72px; } }
