/*
 * humidite-devis.fr : thème repris de l'ancien site (bleu / vert doux sur fond blanc), porté sur les
 * classes émises par le moteur. Chargé après site.css (voir design.stylesheets de la niche).
 * Mobile d'abord, aucune police ni ressource externe.
 */

:root {
    --primary: #1d6fb8;
    --primary-dark: #155a96;
    --accent: #278263;
    --accent-dark: #1f6a50;
    --bg-soft: #eef4f9;
    --bg-soft2: #e7f3ee;
    --muted: #5b6b7c;
    --heading: #14233a;
    --radius: 14px;
    --shadow: 0 6px 22px rgb(20 60 100 / 8%);
    --maxw: 1140px;
    --color-bg: #fff;
    --color-surface: #fff;
    --color-ink: #213044;
    --color-ink-muted: #5b6b7c;
    --color-border: #d8e3ee;
    --color-border-strong: #9db4c9;
    --color-accent: #1d6fb8;
    --color-primary: #278263;
    --color-primary-hover: #1f6a50;
    --color-primary-ink: #fff;
    --color-brand-mark: #eef4f9;
    --color-brand-mark-ink: #1d6fb8;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-family: var(--font-heading);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 5rem;
}

body {
    background: #fff;
    color: var(--color-ink);
    font-family: var(--font-heading);
    font-size: 17px;
    line-height: 1.6;
}

a {
    color: var(--primary);
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.25;
}

h1 {
    font-size: 1.85rem;
}

h2 {
    margin: 0 0 .6em;
    font-size: 1.4rem;
}

h3 {
    margin: 1.2em 0 .4em;
    font-size: 1.12rem;
}

:focus-visible {
    outline: 3px solid #f2b705;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    z-index: 100;
    border-radius: 8px;
    background: #fff;
    padding: 8px 14px;
    color: var(--heading);
    font-weight: 700;
}

/* ---- En-tête ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--color-border);
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(6px);
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    width: min(100% - 2.25rem, var(--maxw));
    min-height: 62px;
    margin: 0 auto;
    padding: 6px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--heading);
    font-size: 1.12rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    flex: none;
    width: 30px;
    height: 30px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 16px;
    font-size: .95rem;
    font-weight: 600;
}

.site-nav a {
    padding: 6px 2px;
    color: var(--color-ink);
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.site-nav .nav-cta {
    border-radius: 999px;
    background: var(--accent);
    padding: 8px 16px;
    color: #fff;
}

.site-nav .nav-cta:hover {
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 42rem) {
    .site-header-inner {
        flex-wrap: nowrap;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .brand {
        padding: 8px 0 2px;
    }

    .site-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 8px;
        font-size: .9rem;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav .nav-cta {
        margin-left: auto;
        padding: 7px 14px;
    }
}

/* ---- Gabarit ---- */

.page-shell {
    width: min(100% - 2.25rem, var(--maxw));
    padding: 0 0 3rem;
}

.content-main {
    gap: 0;
}

.content-main > * {
    margin-top: 0;
    margin-bottom: 0;
}

.breadcrumbs {
    padding: .65rem 0;
    color: var(--muted);
    font-size: .85rem;
}

.breadcrumbs a {
    color: var(--primary);
}

/* Fil d'Ariane et bandeau d'ouverture pleine largeur sur les pages de contenu et l'accueil. */
.content-page .breadcrumbs {
    box-shadow: 0 0 0 100vmax var(--bg-soft);
    background: var(--bg-soft);
    clip-path: inset(0 -100vmax);
}

.hero {
    max-width: none;
    margin: 0;
}

.content-page .hero,
.home-intro,
.home-actions,
.home-proof {
    box-shadow: 0 0 0 100vmax #1a64a9;
    background: #1a64a9;
    clip-path: inset(0 -100vmax);
    color: #fff;
}

.content-page .hero {
    padding: 2rem 0 1.4rem;
}

.content-page .hero h1,
.geo-page .hero h1 {
    margin: 0;
    color: #fff;
}

.hero p {
    max-width: 40rem;
    color: #dbeafc;
    font-size: 1.12rem;
}

.geo-page .hero {
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, #1d6fb8 0%, #155a96 100%);
    padding: 1.6rem 1.4rem;
    color: #fff;
}

.geo-page .hero p {
    margin: .7em 0 0;
}

.geo-page {
    padding-top: 0;
}

.geo-page .breadcrumbs {
    padding-top: .8rem;
}

.zip-badge {
    background: rgb(255 255 255 / 20%);
    color: #fff;
}

/* ---- Accueil ---- */

.home-intro {
    margin: 0;
    padding: 0 0 .4rem;
    max-width: none;
    color: #dbeafc;
    font-size: 1.12rem;
}

.home-intro,
.home-actions,
.home-proof {
    padding-right: 0;
}

.home-actions {
    gap: 12px;
    margin: 0;
    padding: .8rem 0 1.2rem;
}

.home-btn {
    display: inline-block;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    padding: 12px 24px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.home-btn:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.home-btn-alt {
    border-color: #fff;
    background: transparent;
    color: #fff;
}

.home-btn-alt:hover {
    border-color: #fff;
    background: rgb(255 255 255 / 14%);
}

.home-proof {
    gap: 8px 22px;
    margin: 0 0 2rem;
    padding: 1rem 0 1.6rem;
    border-top: 0;
    font-size: .92rem;
    font-weight: 500;
}

.home-proof li {
    color: rgb(255 255 255 / 90%);
}

.home-page .hero {
    padding-top: 2.2rem;
    padding-bottom: .9rem;
}

.home-page .hero h1 {
    max-width: 44rem;
}

.home-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px 0;
}

.home-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    color: var(--color-ink);
}

.home-card:hover {
    border-color: var(--primary);
}

.home-card h3 {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 1.02rem;
}

.home-card span {
    color: var(--muted);
    font-size: .88rem;
    opacity: 1;
}

/* ---- Contenu ---- */

.section {
    padding: 1.6rem 0 .4rem;
}

.section > p,
.section > ul,
.section > ol,
.content-main > p,
.faq details > div {
    max-width: 52rem;
}

.section p,
.content-main > p {
    margin: 0 0 1em;
}

.section ul,
.section ol {
    margin: 0 0 1em;
    padding-left: 1.3rem;
}

.section li + li {
    margin-top: .3em;
}

.content-page .content-main > p:first-of-type {
    margin-top: 1.6rem;
    color: var(--muted);
    font-size: 1.12rem;
}

.home-page .content-main > .home-intro:first-of-type {
    margin-top: 0;
    color: #dbeafc;
}

.content-page .content-main > p:first-of-type + .section:has(> h2:first-child + ul:last-child) {
    margin: 1.2rem 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 18px 20px;
}

.content-page .content-main > p:first-of-type + .section:has(> h2:first-child + ul:last-child) h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.content-page .content-main > p:first-of-type + .section:has(> h2:first-child + ul:last-child) ul {
    margin: 0;
}

.muted {
    color: var(--muted);
    font-size: .88rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.price-table {
    margin: 14px 0;
    font-size: .96rem;
}

.price-table th,
.price-table td {
    border-bottom: 1px solid var(--color-border);
    padding: 11px 12px;
    text-align: left;
}

.price-table th {
    background: var(--bg-soft);
    color: var(--heading);
}

.price-table caption {
    caption-side: bottom;
    margin-top: 8px;
    color: var(--muted);
    font-size: .82rem;
    text-align: left;
}

.seo-block {
    padding-top: 2rem;
}

/* ---- Listes de liens (villes, départements, voir aussi) ---- */

.listing {
    padding: 1.6rem 0 .4rem;
}

.listing h2,
.home-links h2 {
    margin: 0 0 .7rem;
    font-size: 1.15rem;
}

.local-links {
    gap: 8px;
    margin: 10px 0;
}

.local-links a {
    border: 0;
    border-radius: 999px;
    background: var(--bg-soft);
    padding: 7px 14px;
    color: var(--primary);
    font-size: .9rem;
}

.local-links a:hover {
    background: #dcebf7;
    color: var(--primary-dark);
    text-decoration: underline;
}

.home-links {
    padding: 1.6rem 0 .4rem;
}

/* ---- Questions fréquentes ---- */

.faq details {
    margin: 10px 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    padding: 14px 16px;
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--heading);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    color: var(--primary);
    font-weight: 700;
}

.faq details[open] summary::after {
    content: "–";
}

.faq details > div {
    margin-top: 10px;
    color: var(--muted);
}

/* ---- Bloc devis ---- */

.lead-section {
    margin: 2rem 0 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 22px;
    box-shadow: var(--shadow);
}

.lead-section h2 {
    margin-top: 0;
}

.geo-page .quote-form {
    margin-top: 0;
}

.quote-form {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.geo-page > .content-main > .quote-form,
.geo-page .content-main > .quote-form {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 22px;
    box-shadow: var(--shadow);
}

.lead-section .quote-form,
.lead-section {
    color: var(--color-ink);
}

label {
    color: var(--heading);
    font-size: .95rem;
    font-weight: 600;
}

input,
select,
textarea {
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--color-ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--primary);
    outline: 3px solid rgb(29 111 184 / 28%);
    outline-offset: 0;
}

input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent);
}

button[type="submit"] {
    border-radius: 999px;
    padding: 15px 30px;
    font-size: 1.05rem;
}

.consent {
    color: var(--muted);
    font-size: .85rem;
}

.consent a {
    color: var(--primary);
}

.form-errors {
    border-radius: 8px;
}

.delivery-notice {
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    background: var(--bg-soft2);
}

/* ---- Pages géographiques ---- */

.geo-page {
    gap: 2rem;
}

.location-sidebar {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sidebar-title {
    color: var(--primary);
}

.widget-current:hover,
.widget-service-link:hover {
    color: var(--primary);
}

.widget-service-all {
    color: var(--primary);
}

.page-image img {
    border-radius: var(--radius);
}

/* ---- Partenaires ---- */

.partners-back-wrap {
    margin: 1.2rem 0;
}

.partners-back {
    border-radius: 999px;
    background: var(--accent);
    padding: 11px 22px;
    text-decoration: none;
}

.partners-back:hover {
    background: var(--accent-dark);
}

.partners-notice {
    margin-top: 1rem;
}

.partner {
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.partner h2 {
    margin-top: 0;
}

.not-found .listing {
    padding-top: 1.4rem;
}

/* ---- Pied de page ---- */

.site-footer {
    margin-top: 2.5rem;
    background: #14233a;
    padding: 34px 0 18px;
    color: #c4d2e2;
}

.footer-inner,
.footer-bottom {
    width: min(100% - 2.25rem, var(--maxw));
    margin: 0 auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.site-footer .brand {
    color: #fff;
}

.site-footer .brand-mark {
    width: 30px;
    height: 30px;
}

.footer-brand p {
    margin: .8rem 0;
    color: #9fb1c6;
    font-size: .88rem;
}

.footer-cta {
    display: inline-block;
    border-radius: 999px;
    background: var(--accent);
    padding: 9px 18px;
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-cta:hover {
    background: var(--accent-dark);
}

.footer-col h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: .98rem;
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li {
    margin: 6px 0;
}

.site-footer a {
    color: #c4d2e2;
}

.site-footer .footer-cta,
.site-footer .brand {
    color: #fff;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer .link-button {
    color: #c4d2e2;
}

.footer-col a,
.site-footer .link-button {
    font-size: .92rem;
}

.footer-bottom {
    margin-top: 22px;
    border-top: 1px solid #25374f;
    padding-top: 14px;
    color: #8298b2;
    font-size: .82rem;
}

.footer-bottom p {
    margin: 0 0 .4rem;
}

/* ---- Bouton de devis flottant (mobile) : posé par humidite-devis.js ---- */

.sticky-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    border-top: 1px solid var(--color-border);
    background: #fff;
    padding: 10px 14px;
    box-shadow: 0 -4px 18px rgb(20 60 100 / 12%);
    transform: translateY(120%);
    transition: transform .3s ease;
}

.sticky-cta.show {
    transform: translateY(0);
}

.sticky-cta a {
    display: block;
    border-radius: 999px;
    background: var(--accent);
    padding: 12px 22px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .sticky-cta {
        transition: none;
    }
}

/* ---- Bureau ---- */

@media (min-width: 45rem) {
    h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .listing h2,
    .home-links h2 {
        font-size: 1.3rem;
    }

    .home-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .sticky-cta {
        display: none;
    }
}

@media (max-width: 56rem) {
    .location-sidebar {
        margin-top: 0;
    }
}

/* Bandeau d'accueil : les quatre blocs (titre, texte, boutons, preuves) se touchent. */
.content-main > .home-intro,
.content-main > .home-actions,
.content-main > .home-proof {
    margin-top: 0;
    margin-bottom: 0;
}

.content-main > .home-proof + .section {
    padding-top: 2.2rem;
}

/* Recouvrement d'un pixel : pas de liseré entre les blocs du bandeau sur les écrans à décimales. */
.content-main > .home-intro,
.content-main > .home-actions,
.content-main > .home-proof {
    margin-top: -1px;
    padding-top: calc(var(--band-pad, 0px) + 1px);
}

.content-main > .home-actions {
    --band-pad: .8rem;
}

.content-main > .home-proof {
    --band-pad: 1rem;
}

/* Mobile : le bouton de devis reste en haut à droite, les rubriques passent sur la ligne du dessous. */
@media (max-width: 42rem) {
    .site-header-inner {
        position: relative;
    }

    .brand {
        font-size: 1.05rem;
    }

    .site-nav {
        gap: 14px;
        font-size: .88rem;
    }

    .site-nav .nav-cta {
        position: absolute;
        top: 10px;
        right: 0;
        margin: 0;
        padding: 6px 12px;
        font-size: .85rem;
    }
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}
