/* ==========================================================================
   RACHAT DEEE — charte graphique v2 (21/10/2026)
   Vert signature #00ad03 (logo) en accent, vert forêt en ancre,
   neutres chauds, titrage Space Grotesk, responsive mobile-first.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap');

:root {
    /* Palette validée le 21/10/2026 : bleu marine + orange, le code des
       sites pro du secteur (Holland Recycling, G2D2). Le vert ne subsiste
       que dans le logo. */
    --accent: #ee7c00;         /* orange : CTA, prix — l'action */
    --accent-dark: #d96f00;
    --navy: #14365c;           /* bleu marine : barre de menu, titres, footer */
    --navy-light: #1d4a7a;
    --link: #1b82d6;           /* bleu lien, hérité du site actuel */
    --soft: #e9f1fa;           /* fonds de badges, surlignages */
    /* alias historiques (les règles ci-dessous les consomment) */
    --green: var(--accent);
    --green-dark: var(--link);
    --green-deep: var(--navy);
    --green-soft: var(--soft);
    /* neutres */
    --ink: #1a2433;
    --muted: #64748b;
    --bg: #fdfdfe;
    --bg-soft: #f5f7fa;
    --border: #dfe5ec;
    /* système */
    --radius: 10px;
    --shadow: 0 1px 2px rgba(12, 61, 22, .06), 0 4px 16px rgba(12, 61, 22, .06);
    --font-head: "Space Grotesk", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--green-deep); }
h1 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); margin: .5em 0 .4em; }
h2 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); margin: 1.4em 0 .4em; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 70ch; }

/* --------------------------------------------------------------------------
   En-tête : barre collante, burger en mobile (case à cocher, sans JS)
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(252, 253, 252, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 10px 16px; }
.brand { flex-shrink: 0; display: flex; flex-direction: column; line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand-title { font: 700 1.5rem var(--font-head); color: var(--navy); letter-spacing: .01em; }
.brand-title em { font-style: normal; color: var(--navy); }
.brand-sub { font: 700 .62rem var(--font-body); letter-spacing: .34em; color: var(--accent); }
.brand-sub b { color: var(--accent); }

.nav-toggle-input { position: absolute; opacity: 0; }
.nav-toggle {
    display: none;
    margin-left: auto;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    line-height: 0;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--green-deep); }

.header-links { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-links a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.header-links .btn { color: #fff; }
.cart-count {
    display: inline-block;
    min-width: 20px;
    padding: 0 5px;
    border-radius: 99px;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: .8rem;
    text-align: center;
    margin-left: 4px;
}

/* tiroir mobile : masqué par défaut, ouvert par le burger sous 860px */
.main-nav { display: none; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 500;
    font-size: .95rem;
}
.main-nav a:hover { background: var(--green-soft); text-decoration: none; }
.main-nav a.nav-cta {
    background: var(--green);
    color: #fff;
    font-weight: 700;
}
.main-nav a.nav-cta:hover { background: var(--green-dark); }
.main-nav form { display: inline; }

/* méga-menu catalogue (details/summary, sans JS) */
.menu-sub { position: relative; }
.menu-sub > summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .95rem;
    color: var(--ink);
    user-select: none;
}
.menu-sub > summary::-webkit-details-marker { display: none; }
.menu-sub > summary::after { content: " ▾"; font-size: .75em; color: var(--muted); }
.menu-sub[open] > summary, .menu-sub > summary:hover { background: var(--green-soft); }
.menu-panel {
    position: absolute; left: 0; top: calc(100% + 6px);
    min-width: 560px; max-width: min(760px, 90vw);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    z-index: 60;
}
.menu-panel-all { display: inline-block; font-weight: 700; margin-bottom: 10px; color: var(--green-deep); }
.menu-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.menu-col-head { font-weight: 600; color: var(--ink); display: block; margin-bottom: 4px; }
.menu-col ul { list-style: none; padding: 0; margin: 0; }
.menu-col li { margin: 2px 0; }
.menu-col li a { color: var(--muted); font-size: .9rem; padding: 2px 0; display: inline-block; }
.menu-col li a:hover { color: var(--green-dark); }

@media (max-width: 860px) {
    .menu-sub { position: static; }
    .menu-panel {
        position: static;
        min-width: 0; max-width: none;
        border: 0; box-shadow: none;
        padding: 4px 12px 10px;
        background: var(--bg-soft);
        border-radius: 8px;
    }
    .menu-sub > summary { padding: 12px; }
}

.lang-switch { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.lang-switch a { color: var(--muted); padding: 4px; }
.lang-switch a.active { font-weight: 700; color: var(--green-deep); }

/* --------------------------------------------------------------------------
   Barre de menu en cascade (desktop) — rendu copié d'achatdeee.com :
   barre sombre pleine largeur, liens blancs en capitales, cascade blanche
   -------------------------------------------------------------------------- */
.menu-bar { background: var(--green-deep); }
.menu-bar-inner { display: flex; align-items: stretch; padding: 0 16px; }
.mb-home {
    display: flex; align-items: center;
    padding: 0 14px;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, .12);
}
.mb-home:hover { background: rgba(255, 255, 255, .08); }
.mb-root { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.mb-root > li { position: relative; }
.mb-root > li > a {
    display: block;
    padding: 12px 15px;
    color: #fff;
    font: 700 .8rem var(--font-body);
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.mb-root > li > a:hover, .mb-root > li:hover > a { background: rgba(255, 255, 255, .1); text-decoration: none; }
.mb-root .caret { font-size: .7em; opacity: .7; }

.menu-bar .dd {
    display: none;
    position: absolute; top: 100%; left: 0;
    min-width: 230px;
    margin: 0; padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
    z-index: 70;
}
.menu-bar .dd li { position: relative; }
.menu-bar .dd a {
    display: block;
    padding: 9px 16px;
    color: var(--ink);
    font: 600 .78rem var(--font-body);
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--bg-soft);
}
.menu-bar .dd li:last-child > a { border-bottom: 0; }
.menu-bar .dd a:hover { background: var(--green-soft); color: var(--green-dark); text-decoration: none; }
.menu-bar .dd li.has-sub > a::after {
    content: "›";
    float: right;
    color: var(--muted);
    font-size: 1em;
}
.menu-bar .dd .dd-fly { top: -5px; left: 100%; border-radius: 8px; }
.mb-root > li:hover > .dd,
.menu-bar .dd li:hover > .dd-fly,
.mb-root > li:focus-within > .dd,
.menu-bar .dd li:focus-within > .dd-fly { display: block; }

@media (max-width: 860px) { .menu-bar { display: none; } }

@media (max-width: 860px) {
    .nav-toggle { display: inline-block; }
    .header-links { display: none; }
    .main-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 10px 16px 16px;
        margin: 0;
    }
    .main-nav a { padding: 12px; }
    .nav-toggle-input:checked ~ .main-nav { display: flex; }
    .lang-switch { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Messages, fil d'Ariane, badges
   -------------------------------------------------------------------------- */
.flash {
    background: var(--soft);
    border: 1px solid var(--link);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 14px 0;
}
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 14px 0 6px; }
.breadcrumb a { color: var(--muted); }
.status-badge {
    display: inline-block;
    background: var(--soft);
    color: var(--navy);
    border: 1px solid var(--link);
    border-radius: 99px;
    padding: 4px 14px;
    font-size: .85rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Cartes catalogue
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 16px;
    margin: 20px 0;
}
.card {
    display: flex; flex-direction: column; gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card img { width: 100%; height: 140px; object-fit: contain; }
.card a { color: var(--ink); font-weight: 600; }
.card .price { margin-top: auto; color: var(--accent-dark); font-weight: 700; font-size: 1.1rem; font-family: var(--font-head); }
.card .price small { color: var(--muted); font-weight: 400; font-family: var(--font-body); }

/* --------------------------------------------------------------------------
   Fiche produit
   -------------------------------------------------------------------------- */
.product-page { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; margin: 20px 0; }
@media (max-width: 760px) { .product-page { grid-template-columns: 1fr; gap: 18px; } }
.product-page img { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.buy-box {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 16px 0;
}
.buy-box .price { font-family: var(--font-head); font-size: 2rem; color: var(--accent-dark); font-weight: 700; }
.buy-box form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.buy-box input[type=number] { width: 110px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }

.gallery #gallery-main { width: 100%; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb-row .thumb {
    padding: 0; background: #fff;
    border: 2px solid var(--border); border-radius: 8px;
    cursor: pointer; line-height: 0;
}
.thumb-row .thumb.active, .thumb-row .thumb:hover { border-color: var(--green); }
.thumb-row .thumb img { width: 68px; height: 68px; object-fit: contain; border-radius: 6px; }

.tier-table { margin: 12px 0 4px; border-collapse: collapse; width: 100%; max-width: 360px; font-size: .95rem; }
.tier-table caption { text-align: left; font-size: .85rem; color: var(--muted); padding-bottom: 6px; }
.tier-table td { padding: 6px 8px; border-bottom: 1px dashed var(--border); }
.tier-table td.num { text-align: right; font-weight: 700; color: var(--accent-dark); white-space: nowrap; }

.trust-points { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.trust-points li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.how-to { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; margin: 32px 0; }
.how-to h2 { margin-top: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
.step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--green); color: #fff;
    font: 700 1rem var(--font-head);
    margin-bottom: 8px;
}
.step strong { display: block; font-family: var(--font-head); color: var(--green-deep); margin-bottom: 4px; }
.step p { margin: 0; font-size: .92rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Boutons et formulaires
   -------------------------------------------------------------------------- */
button, .btn {
    display: inline-block;
    background: var(--green);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 20px;
    font: 600 1rem var(--font-body);
    cursor: pointer;
    transition: background .15s ease;
}
button:hover, .btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-secondary { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--border); font-weight: 500; }
.btn-secondary:hover { background: var(--border); }

form.stack { display: grid; gap: 14px; max-width: 580px; }
form.stack label { font-weight: 600; font-size: .9rem; }
form.stack input, form.stack textarea {
    width: 100%; padding: 11px;
    border: 1px solid var(--border); border-radius: 8px;
    font: inherit; background: #fff;
}
form.stack input:focus, form.stack textarea:focus,
.buy-box input:focus, .newsletter-form input:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
    border-color: var(--green);
}
form.stack small { color: #b4231f; }

/* --------------------------------------------------------------------------
   Tableaux (lignes de panier, grilles tarifaires) — défilement en mobile
   -------------------------------------------------------------------------- */
table.lines { width: 100%; border-collapse: collapse; margin: 16px 0; background: #fff; }
table.lines th { font-family: var(--font-head); color: var(--green-deep); }
table.lines th, table.lines td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
table.lines td.num, table.lines th.num { text-align: right; white-space: nowrap; }
table.lines tbody tr:hover { background: var(--bg-soft); }

@media (max-width: 700px) {
    table.lines { display: block; overflow-x: auto; }
}

/* contenus CMS importés : tableaux des grilles tarifaires */
.cms-content { max-width: 80ch; }
.cms-content img { border-radius: var(--radius); }
.cms-content table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    display: block;
    overflow-x: auto;
    margin: 14px 0;
}
.cms-content thead th {
    background: var(--green-deep);
    color: #fff;
    font-family: var(--font-head);
    position: sticky; top: 0;
}
.cms-content td, .cms-content th { border: 1px solid var(--border); padding: 9px 12px; }
.cms-content tbody tr:nth-child(even) { background: var(--bg-soft); }

/* --------------------------------------------------------------------------
   Suivi de demande
   -------------------------------------------------------------------------- */
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 10px 0 10px 24px; position: relative; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline li::before {
    content: "";
    position: absolute; left: -8px; top: 16px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--green);
    border: 3px solid var(--green-soft);
}

/* --------------------------------------------------------------------------
   Pied de page : vert forêt
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: 56px;
    background: var(--navy);
    color: #c9d6e6;
    font-size: .92rem;
}
.site-footer a { color: #8fc1f7; }
.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 28px;
    padding: 36px 16px 20px;
}
.footer-columns h3 { font-size: .95rem; color: #fff; margin: 8px 0 8px; }
.footer-columns ul { list-style: none; padding: 0; margin: 0; }
.footer-columns li { margin: 6px 0; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .15); padding: 16px; }
.footer-base p { margin: 4px 0; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type=email] {
    flex: 1; min-width: 160px; padding: 10px;
    border: 1px solid transparent; border-radius: 8px; font: inherit;
}

/* pot-de-miel anti-robot : invisible pour les humains */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --------------------------------------------------------------------------
   Bandeau cookies
   -------------------------------------------------------------------------- */
.cookie-notice {
    position: fixed; bottom: 12px; left: 12px; right: 12px;
    max-width: 580px; margin: 0 auto;
    background: var(--navy); color: #e9f1fa;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    display: flex; gap: 14px; align-items: center;
    z-index: 50; font-size: .9rem;
}
.cookie-notice a { color: #8fc1f7; }
.cookie-notice p { margin: 0; }
@media (max-width: 560px) { .cookie-notice { flex-direction: column; align-items: stretch; text-align: center; } }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; list-style: none; }
.pagination li a, .pagination li span { display: block; padding: 7px 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.pagination li.active span { background: var(--green); color: #fff; border-color: var(--green); }

/* --------------------------------------------------------------------------
   Bandeau d'accroche de la home
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(24px, 5vw, 48px);
    margin: 20px 0 28px;
}
.hero h1 { color: #fff; margin-top: 0; }
.hero .lead { color: #cfe0f2; }
.hero .btn { background: var(--accent); margin-top: 10px; }
.hero .btn:hover { background: #ff8c1a; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding: 0; list-style: none; font-size: .92rem; color: #cfe0f2; }
.hero-points li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* FAQ (/faq) */
.faq-item { border: 1px solid var(--border, #dfe6e2); border-radius: 8px; margin: 10px 0; padding: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 16px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; font-weight: 700; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 16px 14px; margin: 0; }

/* Chat IA (widget flottant) */
.chat-widget { position: fixed; right: 18px; bottom: 18px; z-index: 1000; font-size: .95rem; }
.chat-toggle { background: var(--accent, #f97316); color: #fff; border: 0; border-radius: 24px; padding: 11px 18px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.chat-panel { position: fixed; right: 18px; bottom: 74px; width: min(360px, calc(100vw - 36px)); background: #fff; border: 1px solid #dfe6e2; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; background: var(--navy, #12263a); color: #fff; padding: 10px 14px; }
.chat-head button { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.chat-messages { height: 320px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f6f8f7; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; }
.chat-msg-bot { background: #fff; border: 1px solid #e3e9e5; align-self: flex-start; }
.chat-msg-user { background: var(--navy, #12263a); color: #fff; align-self: flex-end; }
.chat-form { display: flex; border-top: 1px solid #e3e9e5; }
.chat-form input { flex: 1; border: 0; padding: 12px; font: inherit; }
.chat-form input:focus { outline: none; }
.chat-form button { border: 0; background: var(--accent, #f97316); color: #fff; padding: 0 16px; cursor: pointer; font-size: 16px; }
.chat-note { display: block; padding: 6px 12px 10px; color: #777; font-size: .72rem; background: #fff; }

/* Avis clients (/avis) */
.review-card { border: 1px solid #dfe6e2; border-radius: 8px; padding: 12px 16px; margin: 10px 0; }
.review-stars { color: #f59e0b; margin: 0 8px; }
.rating-choice { display: flex; gap: 14px; flex-wrap: wrap; }
.rating-choice label { font-weight: 600; cursor: pointer; }

/* Estimation photo */
.photo-result { border: 1px solid #dfe6e2; border-left: 4px solid var(--accent, #f97316); border-radius: 8px; padding: 16px 20px; margin: 18px 0; }

/* Estimation photo — mobile first */
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.photo-btn { flex: 1; min-width: 150px; padding: 14px 16px; font-size: 1rem; border: 2px solid var(--navy, #12263a); background: #fff; color: var(--navy, #12263a); border-radius: 10px; cursor: pointer; font-weight: 600; }
.photo-btn:active { background: #eef2f6; }
.photo-preview { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 10px 0; border: 1px solid #dfe6e2; }
@media (pointer: fine) { .photo-btn { flex: 0 0 auto; } }
.chat-panel[hidden] { display: none; }

/* Inscription : choix du profil + verrou estimation */
.profile-choice { border: 0; padding: 0; margin: 0 0 6px; }
.profile-choice legend { font-weight: 600; margin-bottom: 8px; }
.profile-option { display: block; border: 2px solid #dfe6e2; border-radius: 10px; padding: 10px 14px; margin: 6px 0; cursor: pointer; }
.profile-option:has(input:checked) { border-color: var(--accent, #f97316); background: #fff7f0; }
.profile-option small { display: block; color: #5d6762; }
.profile-option input { margin-right: 8px; }
.photo-locked { border: 2px dashed var(--accent, #f97316); border-radius: 10px; padding: 18px 20px; margin: 16px 0; }
#pro-fields[hidden] { display: none; }
.photo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.photo-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }
