:root {
    --blue: #0b5cad;
    --blue-dark: #083b70;
    --blue-soft: #e8f1fb;
    --orange: #f2761d;
    --text: #1d2733;
    --muted: #5d6b7a;
    --bg: #ffffff;
    --line: #dbe4ee;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(8, 59, 112, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; color: var(--blue-dark); }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1em; }
h3 { margin: .3em 0; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; }
.section.alt { background: var(--blue-soft); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; }
.prose { max-width: 760px; }

/* Boutons */
.btn { display: inline-block; padding: .75em 1.5em; border: 2px solid var(--orange); border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); background: #d9620c; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .15); }
.btn-sm { padding: .4em 1em; font-size: .9rem; }
.btn-danger { background: #c0392b; border-color: #c0392b; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--blue-dark); text-decoration: none; }
.brand img { border-radius: 50%; }
#menu { display: flex; align-items: center; gap: 22px; }
#menu > a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
#menu > a:not(.btn):hover { color: var(--blue); }
#menu .btn-ghost { color: var(--blue); }
#menu form { margin: 0; }
.burger { display: none; font-size: 1.6rem; background: none; border: 0; cursor: pointer; color: var(--blue-dark); }
@media (max-width: 860px) {
    .burger { display: block; }
    #menu { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; padding: 16px; background: #fff; border-bottom: 1px solid var(--line); }
    #menu.open { display: flex; }
}

/* Hero */
.hero { --hero: none; position: relative; color: #fff; padding: 110px 0 120px; background: linear-gradient(120deg, rgba(8, 59, 112, .92), rgba(11, 92, 173, .75)), var(--hero) center / cover, var(--blue-dark); }
.hero h1 { color: #fff; max-width: 780px; }
.hero .lead { max-width: 640px; opacity: .95; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: #ffd2b0; font-weight: 700; }

/* Cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); color: inherit; text-decoration: none; margin-bottom: 24px; }
.grid .card { margin: 0; }
a.card { transition: transform .2s; }
a.card:hover { transform: translateY(-4px); }
.icon { font-size: 2.2rem; line-height: 1; }
.card.chantier { padding: 0; overflow: hidden; }
.card.chantier img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card.chantier div { padding: 16px 20px; }

/* Avantages */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.perks li { display: flex; gap: 16px; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.perks p { margin: .2em 0 0; color: var(--muted); }

/* Certifications */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.logos figure { margin: 0; text-align: center; width: 160px; }
.logos img { height: 80px; width: 100%; object-fit: contain; }
.logos figcaption { font-size: .9rem; color: var(--muted); }

/* Partenaires : défilement infini, en pause au survol */
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { display: flex; flex-shrink: 0; gap: 64px; padding: 0 32px; margin: 0; list-style: none; align-items: center; min-width: 100%; justify-content: space-around; animation: scroll 30s linear infinite; }
.marquee:hover ul, .marquee:focus-within ul { animation-play-state: paused; }
.marquee img { height: 70px; width: 150px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: .3s; }
.marquee img:hover { filter: none; opacity: 1; }
@keyframes scroll { to { transform: translateX(-100%); } }
/* Animations désactivées dans le système : défilement ralenti plutôt qu'arrêté (le doublon resterait visible) */
@media (prefers-reduced-motion: reduce) { .marquee ul { animation-duration: 90s; } }

/* Carte */
.map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 24px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; transition: opacity .2s; }
.gallery img:hover { opacity: .85; }
#lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; overflow: visible; }
#lightbox::backdrop { background: rgba(0, 0, 0, .88); }
#lightbox img { max-width: 95vw; max-height: 90vh; display: block; border-radius: 6px; }
#lightbox button { position: fixed; background: rgba(255, 255, 255, .15); color: #fff; border: 0; font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
[data-lb=prev] { left: 16px; top: 50%; }
[data-lb=next] { right: 16px; top: 50%; }
[data-lb=close] { right: 16px; top: 16px; }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form.narrow { max-width: 420px; margin: 40px auto; }
.form h2 { margin: 24px 0 0; font-size: 1.3rem; border-top: 1px solid var(--line); padding-top: 20px; }
.form label, .field { display: grid; gap: 6px; font-weight: 600; }
.form small { margin-top: -10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
input, textarea { font: inherit; padding: 10px 12px; border: 1px solid #b9c7d6; border-radius: 8px; width: 100%; font-weight: 400; }
input:focus, textarea:focus { outline: 3px solid rgba(11, 92, 173, .25); border-color: var(--blue); }
input[type=checkbox] { width: auto; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; background: #e6f6ec; color: #1e6b3a; }
.alert.error { background: #fdecea; color: #a52a1f; }
ul.alert { padding-left: 32px; }

/* Pied de page */
.footer { background: var(--blue-dark); color: #d5e3f2; padding: 48px 0 16px; }
.footer a { color: #fff; }
.footer strong { color: #fff; font-size: 1.2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.footer p { margin: .3em 0; }
.copy { text-align: center; font-size: .85rem; opacity: .7; margin-top: 32px; }

/* Administration */
.admin { background: #f4f7fb; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .thumb { width: 90px; font-size: 1.8rem; }
.table .thumb img { width: 72px; height: 54px; object-fit: contain; }
.table .actions { justify-content: flex-end; }
.table form { margin: 0; }
.badge { background: #eee; border-radius: 6px; padding: 2px 8px; font-size: .8rem; margin-left: 6px; }
.preview { max-height: 120px; width: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs label { font-weight: 400; font-size: .85rem; }
.thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; }
progress { width: 100%; height: 14px; }

/* Captcha */
.captcha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha img { border-radius: 8px; border: 1px solid var(--line); }
#captcha { max-width: 200px; text-transform: uppercase; letter-spacing: .2em; }
