/* =========================================================
   Dubocage – feuille de style principale
   ========================================================= */
:root {
    /* Identité 2026 : bleu Dubocage + bleu nuit des visuels */
    --navy: #125490;
    --navy-900: #00182a;
    --navy-800: #06304e;
    --navy-600: #1d6fb8;
    --navy-100: #d4e4f3;
    --navy-50: #eef5fc;
    --accent: #1d6fb8;
    --accent-600: #155a98;
    --accent-50: #e8f1fa;
    --accent-light: #8cc4f2;
    --ink: #0f1c2b;
    --text: #283647;
    --muted: #5a6778;
    --line: #dfe6ee;
    --bg: #ffffff;
    --bg-alt: #f3f6f9;
    --success: #137a43;
    --danger: #b3261e;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Barlow Semi Condensed", "Arial Narrow", "Inter", sans-serif;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgb(0 24 42 / .06);
    --shadow: 0 1px 2px rgb(0 24 42 / .05), 0 10px 30px rgb(0 24 42 / .09);
    --shadow-lg: 0 20px 50px rgb(0 24 42 / .2);
    --container: 1240px;
    --gutter: clamp(16px, 3.5vw, 32px);
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: -.01em;
    margin: 0 0 .5em;
    font-weight: 700;
    text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); }
h2, .h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.35rem); }
h3, .h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.h4, h4 { font-size: 1.15rem; }
h1 a, h2 a, h3 a { color: inherit; text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover { color: var(--accent-600); }
p { margin: 0 0 1em; }
address { font-style: normal; }
small { font-size: .82em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.rounded { border-radius: var(--radius); }

.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico-sm { width: .95em; height: .95em; }
.ico-lg { width: 34px; height: 34px; }
.ico-xl { width: 56px; height: 56px; }

.eyebrow {
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent-600); margin: 0 0 .7rem;
}
.eyebrow-light { color: var(--accent-light); }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 70ch; }

/* ---------------------------------------------------------------- Boutons */
.btn {
    --b-bg: var(--navy); --b-fg: #fff; --b-bd: var(--navy);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .6rem 1.15rem;
    font: 600 .95rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
    color: var(--b-fg); background: var(--b-bg); border: 2px solid var(--b-bd); border-radius: 999px;
    cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { color: var(--b-fg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn-primary:hover { --b-bg: var(--navy-600); --b-bd: var(--navy-600); }
.btn-accent { --b-bg: var(--accent); --b-bd: var(--accent); }
.btn-accent:hover { --b-bg: var(--accent-600); --b-bd: var(--accent-600); }
.btn-outline { --b-bg: transparent; --b-fg: var(--navy); --b-bd: var(--navy-100); }
.btn-outline:hover { --b-bd: var(--navy); --b-fg: var(--navy); }
.btn-light { --b-bg: #fff; --b-fg: var(--navy); --b-bd: #fff; }
.btn-light:hover { --b-fg: var(--accent-600); }
.btn-ghost-light { --b-bg: rgb(255 255 255 / .08); --b-fg: #fff; --b-bd: rgb(255 255 255 / .45); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { --b-bg: rgb(255 255 255 / .18); --b-bd: #fff; }
.btn-sm { min-height: 36px; padding: .4rem .9rem; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--navy-600); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--danger); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.link-arrow .ico { transition: transform .15s; }
.link-arrow:hover .ico { transform: translateX(3px); }
.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; font-size: 1.4rem;
}
.icon-btn:hover { border-color: var(--navy); }

/* ---------------------------------------------------------------- Bandeau supérieur */
.topbar { background: var(--navy-900); color: #b9cbde; font-size: .84rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.topbar-links { display: flex; align-items: center; gap: 1.4rem; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { color: var(--accent-light); }
.topbar a { white-space: nowrap; }
.topbar-extranet { font-weight: 600; }

/* ---------------------------------------------------------------- En-tête */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand img { width: 230px; height: auto; }
.main-nav { flex: 1; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav-link {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .55rem .8rem; border-radius: 999px; border: 0; background: none; cursor: pointer;
    font: 600 .97rem/1.2 var(--font); color: var(--ink); text-decoration: none;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--navy-50); color: var(--navy); }
.nav-link.is-active { color: var(--navy); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.mega-toggle .ico { transition: transform .2s; }
.mega-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav-mobile-only { display: none; }
.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.devis-btn { position: relative; }
.devis-count {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: #fff; color: var(--accent-600); font-size: .78rem; font-weight: 800;
}
.devis-count[hidden] { display: none; }
.devis-btn.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.nav-toggle { display: none; }

/* Méga-menu */
.mega {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
    max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
.has-mega.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { display: grid; grid-template-columns: 1fr 1.25fr 260px; gap: 2.2rem; padding-block: 1.8rem 2rem; }
.mega-title { display: inline-block; font: 700 1.35rem/1.2 var(--font-head); color: var(--navy); text-decoration: none; margin-bottom: 1rem; }
.mega-groups { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.8rem; }
.mega-groups > li { break-inside: avoid; margin-bottom: 1.1rem; }
.mega-group { font-weight: 700; color: var(--ink); text-decoration: none; font-size: .95rem; }
.mega-group:hover { color: var(--accent-600); }
.mega-items { list-style: none; margin: .3rem 0 0; padding: 0; }
.mega-items a { display: block; padding: .12rem 0; color: var(--muted); text-decoration: none; font-size: .88rem; }
.mega-items a:hover { color: var(--navy); }
.mega-items .more { color: var(--navy-600); font-weight: 600; }
.mega-aside { background: var(--navy-50); border-radius: var(--radius); padding: 1.4rem; align-self: start; }
.mega-aside-title { font: 700 1.2rem/1.2 var(--font-head); color: var(--navy); margin-bottom: .4rem; }
.mega-aside p { font-size: .92rem; }
.mega-phone { display: block; margin-top: .9rem; font-weight: 700; font-size: 1.1rem; color: var(--navy); text-decoration: none; }

/* Recherche */
.search-panel { border-top: 1px solid var(--line); background: #fff; padding-block: 1rem 1.2rem; box-shadow: var(--shadow); }
.search-form {
    position: relative; display: flex; align-items: center; gap: .5rem;
    background: #fff; border: 2px solid var(--navy-100); border-radius: 999px; padding: .3rem .3rem .3rem 1rem;
}
.search-form:focus-within { border-color: var(--navy); }
.search-form > .ico { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; font: 1rem var(--font); padding: .55rem .2rem; background: transparent; color: var(--ink); }
.search-form input::-webkit-search-cancel-button { cursor: pointer; }
.search-form-page { max-width: 720px; margin-top: 1.2rem; }
.search-results:empty { display: none; }
.search-results {
    margin-top: .6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    max-height: min(60vh, 460px); overflow-y: auto; padding: .35rem;
}
.search-results a {
    display: flex; flex-direction: column; gap: .1rem; padding: .6rem .8rem; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--ink);
}
.search-results a:hover, .search-results a.is-selected { background: var(--navy-50); }
.search-results .r-title { font-weight: 600; }
.search-results .r-path { font-size: .8rem; color: var(--muted); }
.search-results .r-code { display: inline-block; font: 700 .75rem var(--font); color: var(--accent-600); background: var(--accent-50); border-radius: 4px; padding: .05rem .4rem; margin-right: .35rem; }
.search-results mark { background: #d4e7f8; color: inherit; border-radius: 2px; }
.search-results .r-empty { padding: .8rem; color: var(--muted); font-size: .92rem; }
.search-results .r-all { font-weight: 600; color: var(--navy-600); border-top: 1px solid var(--line); border-radius: 0; margin-top: .2rem; }

/* Fil d'Ariane */
.breadcrumb { padding-top: 1.1rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; font-size: .86rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; color: #9fb0c2; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- Sections */
.section { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.section-tight { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem); }
.section-alt { background: var(--bg-alt); }
.section-navy { background: radial-gradient(1200px 500px at 90% -10%, #1d6fb8 0%, transparent 60%), var(--navy-900); color: #cfdcea; }
.section-navy h2 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 2.2rem; }
.section-head-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; }
.page-head { padding-top: clamp(1.5rem, 1rem + 2vw, 2.8rem); padding-bottom: .5rem; }
.page-head h1 { margin-bottom: .35em; }

/* ---------------------------------------------------------------- Accueil */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; min-height: clamp(560px, 78vh, 760px); display: flex; align-items: center; }
.hero-bg, .cat-head-bg { filter: grayscale(1) contrast(1.08) brightness(1.05); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.hero::after, .cat-head.has-photo::after { content: ""; position: absolute; inset: 0; z-index: -2; background: #1d6fb8; mix-blend-mode: multiply; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(95deg, rgb(0 24 42 / .92) 0%, rgb(6 48 78 / .78) 42%, rgb(6 48 78 / .25) 75%, rgb(6 48 78 / .1) 100%),
        linear-gradient(0deg, rgb(0 24 42 / .55), transparent 40%);
}
.hero-inner { padding-block: 4rem 5rem; }
.hero h1 { color: #fff; max-width: 17ch; font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.3rem); }
.hero h1 .accent { color: var(--accent-light); }
.hero .eyebrow { color: var(--accent-light); }
.hero-signature { font-size: .9rem; letter-spacing: .28em; }
.hero-lead { max-width: 58ch; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: #dbe6f1; margin-bottom: 1.8rem; }
.hero-search { max-width: 640px; border: 0; box-shadow: var(--shadow-lg); padding: .35rem .35rem .35rem 1.1rem; }
.hero-search input { font-size: 1.05rem; padding-block: .75rem; }
.hero-search .search-results { position: absolute; left: 0; right: 0; top: calc(100% + .4rem); z-index: 5; margin: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

.stats { background: var(--navy); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.8rem 1.4rem; border-left: 1px solid rgb(255 255 255 / .12); display: flex; flex-direction: column; gap: .2rem; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value { font: 700 clamp(2rem, 1.5rem + 1.6vw, 2.8rem)/1 var(--font-head); color: var(--accent-light); }
.stat-label { font-size: .92rem; color: #b9cbde; }

.family-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.family-card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.family-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.family-media { display: block; aspect-ratio: 16 / 7; overflow: hidden; }
.family-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.family-card:hover .family-media img { transform: scale(1.04); }
.family-body { padding: 1.5rem 1.6rem 1.7rem; }
.family-body h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: .1rem; }
.chip-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    display: inline-block; padding: .4rem .85rem; border-radius: 999px; background: var(--navy-50); color: var(--navy);
    font-size: .88rem; font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.chip:hover { background: #fff; border-color: var(--navy); color: var(--navy); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.split-reverse .split-media { order: 2; }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow); }
.split-media .map-img { aspect-ratio: auto; object-fit: contain; background: #fff; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; display: grid; gap: .75rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: .2em; width: 1.3rem; height: 1.3rem; border-radius: 999px;
    background: var(--accent-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231d6fb8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.service {
    display: block; padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
    text-decoration: none; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service:hover { color: var(--text); border-color: var(--navy-100); box-shadow: var(--shadow); transform: translateY(-2px); }
.service .ico { color: var(--accent); margin-bottom: 1rem; }
.service h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.service p { font-size: .93rem; color: var(--muted); margin: 0; }

.timeline {
    list-style: none; margin: 0; padding: 0 0 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
    gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #1d6fb8 transparent;
}
.timeline-item { scroll-snap-align: start; position: relative; padding: 2.2rem 1.4rem 0 0; }
.timeline-item::before { content: ""; position: absolute; top: .55rem; left: 0; right: 0; height: 2px; background: rgb(255 255 255 / .18); }
.timeline-item::after { content: ""; position: absolute; top: .15rem; left: 0; width: 12px; height: 12px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 0 5px rgb(29 111 184 / .35); }
.timeline-year { display: block; font: 700 1.8rem/1 var(--font-head); color: #fff; margin-bottom: .5rem; }
.timeline-item p { font-size: .92rem; color: #b9cbde; margin: 0; }

.mini-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1.2rem 0 1.6rem; font-size: .92rem; }
.mini-contacts a { font-weight: 700; text-decoration: none; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.news-list { display: grid; gap: 1rem; max-width: 860px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.news-body { padding: 1.3rem 1.5rem 1.5rem; }
.news-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-media img { transform: scale(1.04); }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 0; }
.badge-li { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; color: #0a66c2; background: #e8f1fa; border-radius: 999px; padding: .15rem .55rem; }
.badge-li .ico { width: .9em; height: .9em; }
.news-grid-page { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.li-body p { white-space: normal; }
.li-gallery .fig img { max-height: 420px; }
.footer-social { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; margin-top: .4rem; }
.alert-ok { background: #e6f4ec; color: #0f5a32; border: 1px solid #b8dfc8; }
.li-login { max-width: 460px; display: grid; gap: 1rem; }
.li-status dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0 0 1.5rem; }
.li-status dt { font-weight: 700; color: var(--ink); }
.li-status dd { margin: 0; overflow-wrap: anywhere; }
.li-status .ok { color: var(--success); font-weight: 700; }
.li-status .ko { color: var(--danger); font-weight: 700; }
.li-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.li-journal { font-size: .88rem; color: var(--muted); padding-left: 1.2rem; }
.news-meta time, .news-card time { font-size: .82rem; font-weight: 600; color: var(--accent-600); text-transform: uppercase; letter-spacing: .06em; }
.news-card h2, .news-card h3 { font-size: 1.3rem; margin: .4rem 0 .5rem; }
.news-card p { color: var(--muted); margin: 0; }

.cta-band { background: linear-gradient(110deg, var(--navy-800), var(--navy-600)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .25rem; }
.cta-band p { color: #cddbea; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------------------------------------------------------------- Catalogue */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.product-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.product-card:hover { color: var(--ink); border-color: var(--navy-100); box-shadow: var(--shadow); transform: translateY(-3px); }
.product-media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem; overflow: hidden; }
.product-media img { max-height: 100%; width: auto; object-fit: contain; }
.product-card.has-photo .product-media { padding: 0; }
.product-card.has-photo .product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.product-card.has-photo:hover .product-media img { transform: scale(1.05); }
.product-media.is-empty { background: var(--bg-alt); color: #b6bacb; }
.product-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; }
.product-title { font-weight: 700; line-height: 1.3; }
.product-meta { font-size: .82rem; color: var(--muted); }

.cat-head { position: relative; isolation: isolate; background: var(--navy-900); color: #fff; overflow: hidden; margin-top: 1rem; }
.cat-head-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.cat-head.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 24 42 / .94) 0%, rgb(0 24 42 / .8) 55%, rgb(0 24 42 / .35) 100%); }
.cat-head-inner { padding-block: clamp(2.2rem, 1.5rem + 3vw, 4rem); }
.cat-head h1 { color: #fff; margin-bottom: .3em; }
.cat-head .lead { color: #cddbea; }
.cat-intro { max-width: 860px; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
.cat-intro h2 { color: var(--ink); }
.cat-intro-top { max-width: 860px; color: var(--muted); margin-top: 1rem; }

.fiche-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; padding-block: 1.2rem 3.5rem; align-items: start; }
.fiche-head { margin-bottom: 1.4rem; }
.fiche-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }
.fiche-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.fiche-hint { display: flex; align-items: center; gap: .5rem; margin: 1.1rem 0 0; padding: .7rem 1rem; background: var(--accent-50); border-radius: var(--radius-sm); font-size: .92rem; color: var(--navy-800); }
.fiche-note { margin-top: 2rem; font-size: .82rem; color: var(--muted); }

.table-tools {
    position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; display: flex; align-items: center; gap: .6rem;
    background: #fff; border: 2px solid var(--navy-100); border-radius: 999px; padding: .3rem 1rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm);
}
.table-tools:focus-within { border-color: var(--navy); }
.table-tools .ico { color: var(--muted); }
.table-tools input { flex: 1; min-width: 0; border: 0; outline: 0; font: 1rem var(--font); padding: .5rem 0; }
.table-count { font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* Contenu des fiches */
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2rem; }
.prose h3 {
    font-family: var(--font); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--navy); margin: 2rem 0 .6rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.prose h4 { font-size: 1.05rem; margin: 1.3rem 0 .4rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .3rem; }
.prose li::marker { color: var(--accent); }
.fiche-content { overflow-wrap: anywhere; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem 2rem; background: var(--bg-alt); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1.5rem; }
.spec-col > :first-child, .spec-col > h3:first-child { margin-top: 0; padding-top: 0; border: 0; }

.table-wrap {
    position: relative; overflow-x: auto; margin: 1rem 0 1.8rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-sm);
    background:
        linear-gradient(to right, #fff 30%, rgb(255 255 255 / 0)) left / 40px 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgb(255 255 255 / 0)) right / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgb(10 15 40 / .16), transparent) left / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgb(10 15 40 / .16), transparent) right / 14px 100% no-repeat scroll,
        #fff;
}
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .5rem .7rem; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th {
    position: sticky; top: 0; z-index: 1; background: var(--navy); color: #fff; font-weight: 600; font-size: .8rem;
    letter-spacing: .02em; line-height: 1.25; white-space: normal; border-bottom: 1px solid rgb(255 255 255 / .15); border-left: 1px solid rgb(255 255 255 / .1);
}
table.data thead th:first-child { border-left: 0; }
table.data thead th:empty { background: var(--navy); }
table.data tbody tr:nth-child(even) td { background: #f6f9fc; }
table.data tbody tr:hover td { background: var(--navy-50); }
table.data tbody td:first-child { font-weight: 700; color: var(--ink); }
table.data tr.subhead th { background: var(--navy-50); color: var(--navy); font-size: .8rem; font-weight: 700; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td[rowspan], table.data td[colspan] { white-space: normal; }
table.data tr.is-ref td { background: var(--accent-50) !important; box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
table.data tr.is-hidden { display: none; }
.code-btn {
    display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .45rem .2rem .55rem;
    font: 700 .86rem/1.2 var(--font); font-variant-numeric: tabular-nums; color: var(--navy);
    background: #fff; border: 1px solid var(--navy-100); border-radius: 6px; cursor: pointer; transition: all .15s;
}
.code-btn .ico { width: .85em; height: .85em; color: var(--accent); }
.code-btn:hover { border-color: var(--accent); color: var(--accent-600); }
.code-btn.is-added { background: var(--navy); border-color: var(--navy); color: #fff; }
.code-btn.is-added .ico { color: #fff; }
.no-results { padding: 1rem 1.2rem; background: var(--bg-alt); border-radius: var(--radius-sm); color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin: 1rem 0 1.8rem; }
.fig { margin: 1rem 0 1.5rem; }
.fiche-content > .fig { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
.gallery .fig { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.fig img { margin-inline: auto; max-height: 260px; width: auto; cursor: zoom-in; }
.fig figcaption { font-size: .8rem; color: var(--muted); text-align: center; font-weight: 600; }

.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--bg-alt); border-radius: var(--radius); }
.empty-state .ico { color: #b6bacb; margin: 0 auto 1rem; }

.fiche-aside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 1rem; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; font-size: .93rem; }
.aside-contact { background: var(--navy-50); border-color: transparent; }
.aside-title { font: 700 1.2rem/1.2 var(--font-head); color: var(--ink); margin-bottom: .5rem; }
.aside-title a { color: inherit; text-decoration: none; }
.aside-phone { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; font-weight: 700; font-size: 1.1rem; color: var(--navy); text-decoration: none; }
.aside-phone.big { font-size: 1.4rem; margin-top: 0; }
.aside-link { display: block; margin-top: .8rem; font-weight: 600; text-decoration: none; font-size: .9rem; }
.aside-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.aside-list a { display: block; padding: .35rem .6rem; margin-inline: -.6rem; border-radius: 6px; text-decoration: none; color: var(--text); font-size: .9rem; line-height: 1.35; }
.aside-list a:hover { background: var(--bg-alt); color: var(--navy); }
.aside-list a[aria-current] { background: var(--navy); color: #fff; font-weight: 600; }
.aside-tip { border-style: dashed; }

.result-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; max-width: 860px; }
.result-list a { display: flex; flex-direction: column; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; }
.result-list a:hover { border-color: var(--navy); }
.result-title { font-weight: 700; color: var(--ink); }
.result-path { font-size: .85rem; color: var(--muted); }

/* ---------------------------------------------------------------- Pages */
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.service-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.2rem; }
.split-body .service-block:last-child, .two-cols .service-block { margin-bottom: 0; }
.service-block .ico { color: var(--accent); margin-bottom: .8rem; }
.service-block h2 { font-size: 1.6rem; margin-top: 0; }
.service-block h2 small { font: 500 .9rem var(--font); color: var(--muted); }

.implant-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; }
.implant-map { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; margin-top: 1.2rem; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.site-photo { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.site-body { padding: 1.4rem 1.5rem 1.6rem; }
.site-body h2, .site-body h3 { font-size: 1.45rem; }
.site-card-main { box-shadow: var(--shadow); }
.contact-lines { list-style: none; padding: 0; margin: 1rem 0 1.2rem; display: grid; gap: .45rem; }
.contact-lines li { display: flex; align-items: center; gap: .55rem; }
.contact-lines .ico { color: var(--accent); }
.contact-lines a { font-weight: 600; text-decoration: none; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.sector { display: flex; flex-direction: column; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.sector:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.sector-name { font: 700 1.2rem/1.2 var(--font-head); color: var(--ink); }
.sector-mail { font-size: .84rem; color: var(--navy-600); overflow-wrap: anywhere; }

.article { max-width: 860px; padding-block: 1.5rem 4rem; }
.article time { font-size: .85rem; font-weight: 600; color: var(--accent-600); text-transform: uppercase; letter-spacing: .06em; }
.article h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.article-body { font-size: 1.1rem; }
.sitemap-page ul ul { margin-top: .3rem; }

/* ---------------------------------------------------------------- Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 2rem; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(1.3rem, 1rem + 1.5vw, 2.2rem); box-shadow: var(--shadow-sm); }
.contact-aside { display: grid; gap: 1rem; }
.segmented { border: 0; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.segmented legend { font-weight: 700; color: var(--ink); margin-bottom: .6rem; padding: 0; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: inline-block; padding: .55rem 1rem; border: 2px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.segmented input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; margin-bottom: 1.6rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field textarea, .devis-items input {
    width: 100%; font: 1rem var(--font); color: var(--ink); background: #fff;
    border: 1.5px solid #cfd4e1; border-radius: var(--radius-sm); padding: .7rem .85rem; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus, .devis-items input:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgb(29 111 184 / .15); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .86rem; margin: 0; }
.field-hp { position: absolute; left: -9999px; }
.req { color: var(--accent-600); }
.checkbox { display: flex !important; align-items: flex-start; gap: .6rem; font-weight: 400 !important; font-size: .9rem !important; }
.checkbox input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--navy); flex: none; }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.3rem; font-weight: 500; }
.alert-error { background: #fdecea; color: #8c1d18; border: 1px solid #f5c2bd; }

.devis-box { border: 2px solid var(--navy-100); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.6rem; background: var(--navy-50); }
.devis-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.devis-box-head h2 { margin: 0; }
.devis-count-inline { color: var(--accent-600); }
.devis-items { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .5rem; }
.devis-items li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: .6rem; align-items: center; background: #fff; border-radius: var(--radius-sm); padding: .6rem .7rem; }
.devis-item-title { font-weight: 600; color: var(--ink); line-height: 1.3; }
.devis-item-title .r-code { display: inline-block; font-size: .78rem; font-weight: 700; color: #fff; background: var(--navy); border-radius: 4px; padding: .05rem .4rem; margin-right: .35rem; }
.devis-item-detail { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.devis-items input { padding: .45rem .6rem; font-size: .92rem; }
.devis-items .icon-btn { width: 36px; height: 36px; font-size: 1rem; color: var(--muted); }
.devis-items .icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.merci { text-align: center; padding-block: 4rem 5rem; }
.merci .lead { margin-inline: auto; }
.merci-icon { width: 96px; height: 96px; border-radius: 999px; background: #e3f4ea; color: var(--success); display: grid; place-items: center; margin: 0 auto 1.4rem; }
.notfound { padding-bottom: 4rem; }

/* ---------------------------------------------------------------- Pied de page */
.site-footer { background: var(--navy-900); color: #a9bdd1; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr .9fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-brand img { width: 250px; margin-bottom: 1.4rem; }
.footer-brand address { margin-bottom: 1rem; }
.site-footer a { color: #e3ebf4; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); }
.footer-title { font: 700 1.1rem/1.2 var(--font-head); color: #fff; margin-bottom: .8rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.1rem; font-size: .84rem; }
.footer-bottom nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Divers */
.lightbox { border: 0; padding: 1rem; border-radius: var(--radius); max-width: min(92vw, 900px); box-shadow: var(--shadow-lg); }
.lightbox::backdrop { background: rgb(0 24 42 / .8); }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; }
.lightbox-caption { text-align: center; margin: .6rem 0 0; color: var(--muted); font-weight: 600; }
.lightbox-close { position: absolute; top: .5rem; right: .5rem; }
.toast {
    position: fixed; left: 50%; bottom: 1.5rem; z-index: 300; transform: translate(-50%, 150%);
    background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow-lg);
    font-size: .93rem; font-weight: 500; transition: transform .25s, opacity .25s, visibility .25s; max-width: calc(100vw - 2rem);
    opacity: 0; visibility: hidden;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { color: var(--accent-light); font-weight: 700; margin-left: .5rem; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
    .brand img { width: 190px; }
    .nav-link { padding: .5rem .6rem; font-size: .93rem; }
    .mega-inner { grid-template-columns: 1fr 1.2fr; }
    .mega-aside { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1023px) {
    :root { --header-h: 66px; }
    .nav-toggle { display: inline-grid; }
    .devis-label { display: none; }
    .devis-btn { padding-inline: .8rem; }
    .main-nav {
        position: absolute; left: 0; right: 0; top: 100%; z-index: 90; background: #fff; overflow-y: auto;
        height: calc(100dvh - var(--header-h)); border-top: 1px solid var(--line);
        padding: .5rem var(--gutter) 4rem; transform: translateX(100%); transition: transform .25s, visibility .25s; visibility: hidden;
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .main-nav { transform: none; visibility: visible; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-list > li { border-bottom: 1px solid var(--line); }
    .nav-link { width: 100%; justify-content: space-between; padding: 1rem .2rem; border-radius: 0; font-size: 1.05rem; }
    .nav-link.is-active { box-shadow: none; color: var(--accent-600); }
    .nav-mobile-only { display: block; }
    .mega { position: static; box-shadow: none; border: 0; max-height: none; display: none; opacity: 1; visibility: visible; transform: none; }
    .has-mega.is-open .mega { display: block; }
    .mega-inner { grid-template-columns: 1fr; padding: 0 0 1rem; gap: 1.2rem; }
    .mega-groups { columns: 1; }
    .mega-items { display: none; }
    .mega-title { font-size: 1.15rem; margin-bottom: .5rem; }
    .mega-groups > li { margin-bottom: .45rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: 0; padding: 1.3rem 0; border-top: 1px solid rgb(255 255 255 / .12); }
    .stat:nth-child(-n+2) { border-top: 0; }
    .family-grid, .split, .two-cols, .implant-grid, .news-grid { grid-template-columns: 1fr; }
    .split-reverse .split-media { order: 0; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .fiche-layout, .contact-layout { grid-template-columns: 1fr; }
    .fiche-aside { position: static; }
    .table-tools { top: calc(var(--header-h) + 6px); }
}
@media (max-width: 640px) {
    .hide-sm, .topbar-tagline, .topbar .hide-sm { display: none; }
    .topbar-links { gap: 1.2rem; }
    .topbar-inner { justify-content: center; }
    .brand img { width: 160px; }
    .header-inner { gap: .6rem; }
    .hero { min-height: 0; }
    .hero-inner { padding-block: 3rem 3.5rem; }
    .hero-search { border-radius: var(--radius); flex-wrap: wrap; padding: .5rem; }
    .hero-search > .ico { display: none; }
    .hero-search input { flex-basis: 100%; padding-inline: .5rem; }
    .hero-search .btn { width: 100%; }
    .service-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
    .product-body { padding: .7rem .8rem .9rem; font-size: .92rem; }
    .devis-items li { grid-template-columns: 1fr 90px 36px; }
    .search-form .btn { padding-inline: .9rem; }
    table.data { font-size: .84rem; }
    table.data th, table.data td { padding: .45rem .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- Impression */
@media print {
    .topbar, .site-header, .breadcrumb, .fiche-aside, .fiche-actions, .fiche-hint, .table-tools, .cta-band, .site-footer, .toast { display: none !important; }
    body { font-size: 10pt; color: #000; }
    .fiche-layout { display: block; padding: 0; }
    .container { max-width: none; padding: 0; }
    .table-wrap { overflow: visible; box-shadow: none; border: 0; background: none; }
    table.data thead th { background: #ddd !important; color: #000; position: static; }
    table.data tr { break-inside: avoid; }
    .code-btn { border: 0; padding: 0; background: none; color: #000; }
    .code-btn .ico { display: none; }
    a[href]::after { content: none; }
}
