/* ============================================================
   Design system des pages fonctionnalités / métiers Shop du Coin
   (palette chaude héritée de home4 : blanc cassé, beige, charbon,
   rouge réservé à l'action). Chargé sur /fonctionnalites, /commande-
   en-ligne, /carte-fidelite, /pour/*, etc.
   ============================================================ */

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

:root {
    --bg: #faf5ec;
    --beige: #f1e8d6;
    --paper: #fffdf8;
    --ink: #12100d;
    --charcoal: #1e1b16;
    --charcoal-2: #26221c;
    --muted: #57503f;
    --muted-dark: rgba(250, 245, 236, 0.66);
    --line: #e2dacc;
    --line-dark: rgba(250, 245, 236, 0.14);
    --red: #e8352b;
    --red-deep: #c2271e;
    --green: #1e7a4f;
    --green-soft: rgba(30, 122, 79, 0.12);
    --amber: #a97a1f;
    --radius: 10px;
    --shadow: 0 24px 60px rgba(18, 16, 13, 0.12);
    --shadow-soft: 0 12px 30px rgba(18, 16, 13, 0.07);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
button, a { touch-action: manipulation; }

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

.icon {
    width: 20px; height: 20px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    background: rgba(250, 245, 236, 0.92);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav.scrolled {
    border-color: var(--line);
    box-shadow: 0 8px 26px rgba(18, 16, 13, 0.06);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 850;
    font-size: 1.02rem;
}

.brand-mark {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
    object-fit: contain;
    border: 1px solid var(--line);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg) !important;
    font-weight: 800;
}

.nav-cta:hover { background: var(--red); color: #fff !important; }

.hamburger {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
    display: block;
    width: 18px; height: 2px;
    background: currentColor;
    border-radius: 999px;
    margin: 0 auto;
    content: "";
}

.hamburger span::before { transform: translateY(-6px); }
.hamburger span::after { transform: translateY(4px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    z-index: 19;
    padding: 16px 24px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 40px rgba(18, 16, 13, 0.1);
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    padding: 13px 0;
    text-decoration: none;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

/* ============ COMMUN ============ */
.section { padding: 84px 0; }
.section.tight { padding: 60px 0; }

.kicker {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.kicker b { color: var(--red); font-weight: 900; }
.dark .kicker { color: var(--muted-dark); }

h1, h2, h3.display {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.section-title {
    margin-top: 14px;
    font-size: clamp(1.9rem, 4.2vw, 3.2rem);
    max-width: 780px;
}

.section-copy {
    margin-top: 16px;
    color: var(--muted);
    font-size: 1.06rem;
    max-width: 640px;
}

.dark { background: var(--charcoal); color: var(--bg); }
.dark .section-copy { color: var(--muted-dark); }
.on-beige { background: var(--beige); }
.on-paper { background: var(--paper); }

.center { text-align: center; }
.center .section-title, .center .section-copy { margin-left: auto; margin-right: auto; }

.btn {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 850;
    font-size: 0.97rem;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    color: #fff;
    background: var(--red);
    box-shadow: 0 14px 30px rgba(232, 53, 43, 0.28);
}

.btn-primary:hover { background: var(--red-deep); }

.btn-ghost {
    color: var(--ink);
    border-color: rgba(18, 16, 13, 0.25);
    background: transparent;
}

.btn-ghost:hover { border-color: var(--ink); }
.dark .btn-ghost { color: var(--bg); border-color: var(--line-dark); }

/* ============ HERO ============ */
.hero { padding: 148px 0 72px; }

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 18px;
}

.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; opacity: 0.5; }

.hero h1 {
    font-size: clamp(2.2rem, 4.8vw, 3.8rem);
    max-width: 760px;
}

.hero h1 em { font-style: normal; color: var(--red); }

.hero-lead {
    margin-top: 18px;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.5vw, 1.15rem);
    max-width: 620px;
}

.hero-actions {
    margin-top: 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-reassure {
    margin-top: 13px;
    color: var(--muted);
    font-size: 0.87rem;
    font-weight: 700;
}

/* Réponse directe (GEO) */
.direct-answer {
    margin-top: 34px;
    padding: 20px 24px;
    border-left: 3px solid var(--red);
    background: var(--paper);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-soft);
    max-width: 780px;
    font-size: 1.02rem;
}

.direct-answer strong { font-weight: 800; }

/* ============ GRILLES ============ */
.grid-3 {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.grid-2 {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.dark .card {
    background: var(--charcoal-2);
    border-color: var(--line-dark);
}

.card h3 { font-size: 1.1rem; font-weight: 800; }
.card p { margin-top: 8px; color: var(--muted); font-size: 0.94rem; }
.dark .card p { color: var(--muted-dark); }

.card-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(232, 53, 43, 0.09);
    color: var(--red);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .card-tag { background: rgba(250, 245, 236, 0.1); color: var(--bg); }

/* Étapes numérotées */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 900;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.card.win .step-num { background: var(--green); color: #fff; }

/* ============ SPLIT texte / visuel ============ */
.split {
    margin-top: 48px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    align-items: center;
}

.split.reverse .split-media { order: -1; }

.split-media img {
    display: block;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    object-fit: cover;
    aspect-ratio: 3 / 2;
}

.split h2, .split h3.display { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.split .section-copy { margin-top: 12px; }

.check-list {
    list-style: none;
    margin-top: 22px;
    display: grid;
    gap: 13px;
}

.check-list li { display: flex; gap: 12px; align-items: flex-start; }

.check-dot {
    flex: 0 0 22px;
    width: 22px; height: 22px;
    margin-top: 2px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--green-soft);
    color: var(--green);
}

.check-dot .icon { width: 12px; height: 12px; stroke-width: 3; }

.check-list strong { font-weight: 800; }
.check-list span { color: var(--muted); font-size: 0.95rem; }
.dark .check-list span { color: var(--muted-dark); }

.result-note {
    margin-top: 20px;
    padding: 14px 16px;
    border-left: 3px solid var(--red);
    background: rgba(232, 53, 43, 0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-weight: 800;
    font-size: 1rem;
}

.dark .result-note { background: rgba(232, 53, 43, 0.12); }

/* ============ CHIFFRES / STATS ============ */
.stat-band {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}

.on-light .stat-band { border-color: var(--line); }

.stat {
    padding: 30px 24px;
}

.stat + .stat { border-left: 1px solid var(--line-dark); }
.on-light .stat + .stat { border-color: var(--line); }

.stat-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    line-height: 1;
}

.stat-num.red { color: var(--red); }
.stat-num.green { color: var(--green); }

.stat-label {
    display: block;
    margin-top: 10px;
    color: var(--muted-dark);
    font-weight: 700;
    font-size: 0.92rem;
    max-width: 260px;
}

.on-light .stat-label { color: var(--muted); }

.stat-source {
    margin-top: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted-dark);
}

.on-light .stat-source { color: var(--muted); }

/* ============ TABLEAU COMPARATIF ============ */
.compare-scroll { margin-top: 44px; overflow-x: auto; }

.compare {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.compare th, .compare td {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.94rem;
    border-bottom: 1px solid var(--line);
}

.compare thead th {
    background: var(--beige);
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 700; }
.compare .good { color: var(--green); font-weight: 800; }
.compare .bad { color: var(--red-deep); font-weight: 800; }

/* ============ BANDEAU PRIX ============ */
.price-strip {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-radius: 14px;
    border: 2px solid var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.price-strip-text strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
}

.price-strip-text span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
}

.price-strip .btn { flex: 0 0 auto; }

/* ============ FAQ ============ */
.faq-list { margin-top: 40px; display: grid; gap: 10px; max-width: 820px; }

.faq-item {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--paper);
}

.faq-question {
    width: 100%;
    border: 0;
    background: transparent;
    min-height: 64px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-align: left;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.faq-plus {
    width: 30px; height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--beige);
    color: var(--red);
    font-weight: 900;
    flex: 0 0 auto;
}

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-answer p { padding: 0 22px 20px; color: var(--muted); }
.faq-item.open .faq-answer { max-height: 400px; }

/* ============ CTA FINAL ============ */
.final-cta { text-align: center; }
.final-cta .section-title, .final-cta .section-copy { margin-left: auto; margin-right: auto; }

.cta-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ============ FOOTER ============ */
.footer {
    background: #0d0b09;
    color: rgba(250, 245, 236, 0.66);
    padding: 56px 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    gap: 34px;
}

.footer-brand { color: var(--bg); font-size: 1.14rem; font-weight: 900; }
.footer p { margin-top: 12px; max-width: 320px; font-size: 0.94rem; }

.footer h4 {
    color: var(--bg);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: rgba(250, 245, 236, 0.66); text-decoration: none; font-size: 0.94rem; }
.footer a:hover { color: var(--bg); }

.footer-bottom {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(250, 245, 236, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.84rem;
}

/* ============ HUB FONCTIONNALITÉS ============ */
.hub-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hub-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.hub-card .arrow {
    margin-top: auto;
    padding-top: 16px;
    color: var(--red);
    font-weight: 900;
    font-size: 0.9rem;
}

/* ============ REVEAL / STICKY ============ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.mobile-cta {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 18;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(250, 245, 236, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(18, 16, 13, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.mobile-cta .btn { width: 100%; min-height: 50px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
    .split-media { max-width: 560px; }
    .stat-band { grid-template-columns: 1fr; }
    .stat + .stat { border-left: 0; border-top: 1px solid var(--line-dark); }
    .on-light .stat + .stat { border-color: var(--line); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nav-links { display: none; }
    .hamburger { display: inline-grid; place-items: center; }
    .nav-inner { height: 66px; padding: 0 18px; }
    .mobile-menu { top: 66px; }

    .hero { padding: 122px 0 56px; }
    .section { padding: 60px 0; }
    .wrap { padding: 0 18px; }

    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero-actions .btn, .cta-actions .btn { width: 100%; }
    .price-strip { flex-direction: column; align-items: flex-start; }
    .price-strip .btn { width: 100%; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }

    .mobile-cta { display: block; }
    /* Dégagement de la barre sticky dans le footer (sombre), pas sur main. */
    .footer { padding-bottom: calc(26px + 78px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
