/* Gazo — site public. CSS écrit à la main, mobile d'abord, sans dépendance. */

:root {
    --brand: #0f7591;
    --brand-dark: #084a5c;
    --brand-soft: #e2f1f5;
    --cheap: #13803b;
    --cheap-soft: #d6f5de;
    --estimate: #6b7378;
    --estimate-soft: #eef0f1;
    --warn-soft: #fff4e0;
    --text: #13212b;
    --muted: #5b6770;
    --line: #dde3e6;
    --bg: #ffffff;
    --bg-alt: #f5f8f9;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(19, 33, 43, .06), 0 8px 24px rgba(19, 33, 43, .08);
    --max: 1120px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand: #5fb3c9;
        --brand-dark: #0b2d38;
        --brand-soft: #12313b;
        --cheap: #5cd68a;
        --cheap-soft: #0e4a26;
        --estimate: #9aa3a8;
        --estimate-soft: #23292d;
        --warn-soft: #3a2a10;
        --text: #e8eef1;
        --muted: #a5b1b8;
        --line: #2a353b;
        --bg: #0f171b;
        --bg-alt: #141f24;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--brand); color: #fff; padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--bg-alt); }
.nav a.lang { border: 1px solid var(--line); }
.nav .hide-sm { display: none; }
@media (min-width: 640px) { .nav .hide-sm { display: inline-block; } }

/* Fil d'Ariane */
.breadcrumb { font-size: .875rem; color: var(--muted); padding-top: 16px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }

/* Accueil */
.hero { padding: 40px 0 48px; background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.2fr 1fr; } }
.eyebrow { display: inline-block; font-weight: 700; font-size: .85rem; color: var(--cheap); background: var(--cheap-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 12px; }
.store {
    display: inline-flex; flex-direction: column; justify-content: center;
    min-width: 168px; padding: 8px 16px; border-radius: 12px;
    background: #000; color: #fff; text-decoration: none; line-height: 1.2;
}
.store small { font-size: .72rem; opacity: .85; }
.store strong { font-size: 1.15rem; }
.store.soon { background: var(--estimate-soft); color: var(--muted); border: 1px dashed var(--line); }
.btn { display: inline-block; padding: 10px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }

.phone {
    max-width: 340px; margin: 0 auto; background: var(--bg); border: 10px solid #13212b; border-radius: 36px;
    padding: 18px 14px; box-shadow: var(--shadow);
}
.phone-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.phone-row.best { background: var(--cheap-soft); border-color: transparent; }
.phone-row .info { flex: 1; min-width: 0; }
.phone-row .info strong { display: block; font-size: .95rem; }
.phone-row .info span { font-size: .75rem; color: var(--muted); }
.phone-row .p { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.phone-row.best .p { color: var(--cheap); }
.phone-go { display: block; text-align: center; background: var(--cheap); color: #fff; font-weight: 800; padding: 10px; border-radius: 12px; margin-top: 6px; }
.phone-tag { font-size: .7rem; font-weight: 700; color: var(--cheap); text-transform: uppercase; letter-spacing: .04em; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 56px; position: relative; }
.steps li::before {
    content: counter(step); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center;
}

.notice { border-left: 4px solid var(--cheap); background: var(--cheap-soft); padding: 16px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.estimate { border-color: var(--estimate); background: var(--estimate-soft); }
.notice.warn { border-color: #b86e00; background: var(--warn-soft); }
.notice h2, .notice h3 { margin-bottom: .3em; }
.notice p:last-child { margin-bottom: 0; }

/* Villes */
.city-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.city-list a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; }
.city-list a:hover { border-color: var(--brand); color: var(--brand); }
.province { margin-bottom: 24px; }
.province h2, .province h3 { font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Page de ville */
/* 3 colonnes compactes qui ne débordent jamais : minmax(0, 1fr) laisse rétrécir les cases,
   et sous 340 px les statistiques s'empilent. */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.stat { background: var(--bg-alt); border-radius: 12px; padding: 10px 6px; text-align: center; min-width: 0; }
.stat span { display: block; font-size: .78rem; color: var(--muted); }
.stat strong { display: block; font-size: clamp(.95rem, 3.9vw, 1.5rem); font-weight: 800; white-space: nowrap; letter-spacing: -.01em; }
@media (min-width: 640px) { .stats { gap: 10px; } .stat { padding: 12px; } }
@media (max-width: 339px) { .stats { grid-template-columns: 1fr; } }
.stat.best strong { color: var(--cheap); }

.fuel { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; background: var(--bg); overflow: hidden; }
.fuel > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fuel > summary::-webkit-details-marker { display: none; }
.fuel > summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; color: var(--muted); line-height: 1; }
.fuel[open] > summary::after { content: "–"; }
.fuel > summary h2 { margin: 0; font-size: 1.2rem; }
.fuel > summary .from { font-weight: 800; color: var(--cheap); }
.fuel-body { padding: 0 20px 20px; }

.ranking { list-style: none; padding: 0; margin: 0; }
.ranking li { display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ranking li:first-child { border-top: 0; }
.ranking .rank { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--bg-alt); }
.ranking li.best .rank { background: var(--cheap); color: #fff; }
.ranking .who strong { display: block; }
.ranking .who span { display: block; font-size: .85rem; color: var(--muted); }
.ranking .price { text-align: right; font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.ranking li.best .price { color: var(--cheap); }
.ranking .meta { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .8rem; color: var(--muted); }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--text); border: 1px solid var(--line); }
.badge.regie_qc { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge.crowd { background: var(--cheap-soft); color: var(--cheap); border-color: transparent; }
.badge.regulated_max, .badge.regional_avg { background: var(--estimate-soft); color: var(--estimate); border-style: dashed; }

.estimates { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.estimates li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--estimate-soft); }
.estimates .price { font-weight: 800; color: var(--estimate); }

.cta { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 24px; }
.cta h2 { color: #fff; }
.cta p { color: #d9ecf1; }
.cta .store.soon { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }

/* Pages de texte */
.prose { max-width: 46em; }
.prose h2 { font-size: 1.25rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .6em 0 0; }

/* Pied de page */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 24px; font-size: .9rem; color: var(--muted); }
.site-footer .grid { gap: 24px; }
@media (min-width: 760px) { .site-footer .grid { grid-template-columns: 1.3fr 1fr 1.6fr; } }
.site-footer h2 { font-size: .95rem; color: var(--text); margin-bottom: .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); }
.site-footer .copy { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }
.spaced { margin-top: 24px; }
