/* =============================================
   Conteneurs Maritimes — Custom CSS
   Charte alignée sur conteneurdumetal.fr :
   thème CLAIR (fond blanc), accent VERT #507817,
   titres serif Merriweather, texte Lato.
   Exécution premium, moderne et soignée.
   ============================================= */

:root {
    --green: #507817;
    --green-dark: #3c5a11;
    --green-light: #6f9c22;
    --green-soft: #eef3e7;
    --ink: #1f2421;
    --muted: #5b6660;
    --bg: #ffffff;
    --bg-alt: #f6f7f4;
    --line: #e6e8e3;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--ink);
}

/* ============ Inputs (light) ============ */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23507817' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}

/* =================================================
   HEADER / NAV
   ================================================= */
.site-header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-link {
    position: relative;
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--green); }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    background: #fff;
}
.mobile-menu.open { display: block; }

/* =================================================
   BOUTONS
   ================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.6rem;
    transition: all 0.25s ease;
    cursor: pointer;
    line-height: 1;
}
.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 10px 30px -12px rgba(80, 120, 23, 0.7);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--line);
    color: var(--ink);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-white {
    background: #fff;
    color: var(--ink);
}
.btn-white:hover { background: var(--green-soft); }

/* =================================================
   HERO — vidéo qui s'ouvre au scroll (scroll-expand)
   Le scroll de la page est verrouillé tant que la vidéo
   n'est pas entièrement ouverte : cf. main.js.
   ================================================= */
body.se-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

.se-hero {
    position: relative;
    min-height: 100dvh;
    background: #14180f;
    overflow-x: hidden;
    overflow-x: clip;
}

.se-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    height: 100dvh;
    will-change: opacity;
}
.se-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.se-bg-veil {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 12, 0.45);
}

.se-accent-line,
.hero-accent-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    z-index: 3;
    background: var(--green);
}

.se-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
}

.se-media {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 400px;
    max-width: 95vw;
    max-height: 85vh;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    will-change: width, height;
}
.se-media-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    pointer-events: none;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.se-media-veil {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.5;
}

.se-caption {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 100vw;
    text-align: center;
    pointer-events: none;
}
.se-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.5rem;
    will-change: transform;
}
.se-hint {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9fcf4d;
    will-change: transform;
}

.se-titlebox {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-inline: 1.25rem;
    pointer-events: none;
}
.se-title {
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: clamp(2.25rem, 7vw, 4.5rem);
    line-height: 1.08;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.se-word {
    display: block;
    will-change: transform;
}
.se-word + .se-word { color: #9fcf4d; }

.se-content {
    position: relative;
    z-index: 2;
    padding: 3rem 1.25rem 5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}
.se-content.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .se-content { transition: none; }
}

/* Bandeau de page intérieur (pages sans vidéo) */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--green-soft);
    border-bottom: 1px solid var(--line);
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(80,120,23,0.12) 1px, transparent 0);
    background-size: 22px 22px;
    pointer-events: none;
}

/* =================================================
   FADE UP
   ================================================= */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 0.9s cubic-bezier(0.25, 0.4, 0.25, 1) forwards;
    animation-delay: calc(0.3s + var(--delay, 0s));
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* =================================================
   CARTES PRODUITS / SERVICES
   ================================================= */
.card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform 0.45s cubic-bezier(0.25, 0.4, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(80, 120, 23, 0.4);
    box-shadow: 0 24px 50px -28px rgba(31, 36, 33, 0.45);
}
.card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.card:hover .card-image img { transform: scale(1.06); }

.card-content { padding: 1.5rem; }

.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.card-title {
    font-family: 'Merriweather', serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--ink);
}
.card-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.specs {
    list-style: none;
    margin: 0.75rem 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
}
.specs li {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: var(--green-dark);
    background: var(--green-soft);
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* =================================================
   PLACEHOLDER D'IMAGE (intérieurs à intégrer)
   ================================================= */
.img-ph {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    text-align: center;
    padding: 1.25rem;
    overflow: hidden;
}
.img-ph::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.18) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.5;
}
.img-ph svg { position: relative; opacity: 0.95; }
.img-ph .ph-label { position: relative; font-weight: 700; font-size: 0.95rem; }
.img-ph .ph-note { position: relative; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.8; }

/* =================================================
   SLIDER AVANT / APRÈS
   ================================================= */
.ba {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    user-select: none;
    touch-action: none;
}
.ba > .ba-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.ba > .ba-layer img, .ba > .ba-layer .img-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba .ba-after { z-index: 1; }
.ba .ba-before { z-index: 2; width: 50%; border-right: 3px solid #fff; overflow: hidden; }
/* L'image "avant" garde la largeur totale du slider (fixée en JS) puis est rognée par le calque,
   pour rester à la même échelle que l'image "après". max-width:none neutralise le preflight Tailwind. */
.ba .ba-before img { max-width: none; }
.ba .ba-tag {
    position: absolute;
    bottom: 0.85rem;
    z-index: 4;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0,0,0,0.55);
    color: #fff;
    backdrop-filter: blur(4px);
}
.ba .ba-tag-before { left: 0.85rem; }
.ba .ba-tag-after { right: 0.85rem; }
.ba .ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 3;
    width: 44px;
    margin-left: -22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
}
.ba .ba-handle .knob {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: #fff;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

/* =================================================
   RÉASSURANCE
   ================================================= */
.reass-block {
    padding: 1.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.reass-block:hover {
    border-color: rgba(80, 120, 23, 0.4);
    box-shadow: 0 18px 40px -28px rgba(31, 36, 33, 0.4);
}
.reass-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 0.8rem;
    background: var(--green-soft);
    color: var(--green);
    margin-bottom: 1.25rem;
}
.reass-title {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--ink);
}
.reass-desc {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* =================================================
   ÉTAPES PROCESS
   ================================================= */
.step-num {
    font-family: 'Merriweather', serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(80, 120, 23, 0.3);
}

/* =================================================
   FORMULAIRE
   ================================================= */
.form-step { display: none; animation: stepFade 0.45s cubic-bezier(0.25, 0.4, 0.25, 1); }
.form-step.active { display: block; }
@keyframes stepFade {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

.form-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-input {
    width: 100%;
    padding: 0.9rem 1.05rem;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 0.7rem;
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder { color: #9aa39d; }
.form-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(80, 120, 23, 0.12);
}
.form-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.choice-grid { display: grid; gap: 0.75rem; }
.choice-card {
    position: relative;
    cursor: pointer;
    border: 1.5px solid var(--line);
    border-radius: 0.8rem;
    padding: 1.05rem 1.2rem;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.choice-card:hover { border-color: var(--green-light); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .choice-title { font-weight: 700; color: var(--ink); display: block; }
.choice-card .choice-sub { font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; display: block; }
.choice-card:has(input:checked) {
    border-color: var(--green);
    background: var(--green-soft);
    box-shadow: 0 0 0 3px rgba(80, 120, 23, 0.14);
}

/* =================================================
   ACCORDÉON (détails location)
   ================================================= */
.acc {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
}
.acc > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 0 0.35rem;
    font-weight: 700;
    color: var(--green-dark);
    font-size: 0.9rem;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .chev { transition: transform 0.25s ease; flex-shrink: 0; }
.acc[open] > summary .chev { transform: rotate(180deg); }
.acc-body { padding-bottom: 0.5rem; animation: stepFade 0.35s ease; }
.acc-body h4 {
    font-weight: 700;
    color: var(--ink);
    margin: 1rem 0 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.acc-body p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.acc-list { list-style: none; padding: 0; margin: 0; }
.acc-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.88rem;
    color: var(--ink);
}
.acc-list li:last-child { border-bottom: none; }
.acc-list li .muted { color: var(--muted); text-align: right; white-space: nowrap; }
.acc-list li .price { color: var(--green-dark); font-weight: 700; white-space: nowrap; }
.acc-opts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.acc-opts li {
    font-size: 0.78rem;
    color: var(--green-dark);
    background: var(--green-soft);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-weight: 600;
}
.acc-note {
    margin-top: 0.9rem;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--muted);
    background: var(--bg-alt);
    border-left: 3px solid var(--green-light);
    padding: 0.6rem 0.8rem;
    border-radius: 0 0.4rem 0.4rem 0;
}

/* =================================================
   AVIS CLIENTS
   ================================================= */
.testi {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.testi:hover {
    border-color: rgba(80, 120, 23, 0.4);
    box-shadow: 0 18px 40px -28px rgba(31, 36, 33, 0.4);
    transform: translateY(-4px);
}
.testi-stars { display: flex; gap: 0.15rem; color: #f0a500; margin-bottom: 0.9rem; }
.testi-quote {
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.65;
    flex: 1;
}
.testi-quote::before { content: "“"; color: var(--green-light); font-weight: 700; }
.testi-quote::after { content: "”"; color: var(--green-light); font-weight: 700; }
.testi-author { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.testi-avatar {
    width: 42px; height: 42px;
    border-radius: 9999px;
    background: var(--green-soft);
    color: var(--green-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
    flex-shrink: 0;
}
.testi-name { font-weight: 700; color: var(--ink); font-size: 0.92rem; line-height: 1.2; }
.testi-meta { font-size: 0.78rem; color: var(--muted); }

/* =================================================
   GALERIE RÉALISATIONS
   ================================================= */
.gallery { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.geo {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.geo:hover {
    transform: translateY(-5px);
    border-color: rgba(80, 120, 23, 0.4);
    box-shadow: 0 24px 50px -28px rgba(31, 36, 33, 0.45);
}
.geo-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.geo-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.25,0.4,0.25,1); }
.geo:hover .geo-img img { transform: scale(1.06); }
.geo-badge {
    position: absolute;
    top: 0.85rem; left: 0.85rem;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(80, 120, 23, 0.92);
    color: #fff;
    backdrop-filter: blur(4px);
}
.geo-body { padding: 1.25rem 1.35rem 1.4rem; }
.geo-title { font-family: 'Merriweather', serif; font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 0.35rem; }
.geo-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.geo-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.geo-meta span {
    font-size: 0.72rem;
    color: var(--green-dark);
    background: var(--green-soft);
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* =================================================
   FAQ (réutilise .acc, variante autonome)
   ================================================= */
.faq-item {
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: #fff;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item[open] { border-color: rgba(80, 120, 23, 0.45); box-shadow: 0 10px 30px -22px rgba(31,36,33,0.4); }
.faq-item > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .chev { transition: transform 0.25s ease; flex-shrink: 0; color: var(--green); }
.faq-item[open] > summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 1.35rem 1.25rem; color: var(--muted); line-height: 1.65; animation: stepFade 0.35s ease; }

/* =================================================
   BOUTONS DE CONTACT FLOTTANTS
   ================================================= */
.fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.fab-btn {
    width: 52px; height: 52px;
    border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px -6px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-btn:hover { transform: scale(1.08); }
.fab-tel { background: var(--green); }
@media (min-width: 1024px) { .fab { right: 1.5rem; bottom: 1.5rem; } }

/* =================================================
   UTILITIES
   ================================================= */
section[id] { scroll-margin-top: 84px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 9999px; background: var(--green); }

@media (prefers-reduced-motion: reduce) {
    .fade-up { animation: none !important; opacity: 1 !important; transform: none !important; }
}

::selection { background: rgba(80, 120, 23, 0.25); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: #cfd6c8; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-light); }
