:root {
    --primary: #c0392b;
    --primary-dark: #a1291d;
    --dark: #1c1c1c;
    --cream: #f7f1e8;
    --text: #232323;
    --muted: #6b6b6b;
    --border: #e7e2d8;
    --success: #1e7e34;
    --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.7;
    padding-bottom: 72px; /* espace pour la barre CTA sticky mobile */
}

img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.2rem; }
a { color: inherit; }
ul { list-style: none; }

/* ─── Barre de confiance (haut) ─────────────────────────────────────── */
.trust-bar {
    background: var(--dark);
    color: #fff;
    text-align: center;
    font-size: .85rem;
    padding: .55rem 1rem;
}
.trust-bar span { margin: 0 .6rem; white-space: nowrap; }

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(180deg, var(--cream), #fff);
    padding: 1.8rem 0 2.5rem;
}
.hero-media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    margin-bottom: 1.6rem;
}
.hero-price-sticker {
    position: absolute;
    right: 1.5%;
    bottom: 3%;
    width: 32%;
    aspect-ratio: 1.35 / 1;
    background: var(--primary);
    border: 3px dashed rgba(255,255,255,.6);
    border-radius: 12px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.sticker-label { font-size: clamp(.6rem, 1.8vw, .95rem); }
.sticker-price { font-size: clamp(1.4rem, 5.2vw, 2.6rem); font-weight: 800; }
.sticker-currency { font-size: clamp(.6rem, 1.8vw, .95rem); }
.hero-title {
    font-size: 1.7rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: .6rem;
    color: var(--dark);
}
.hero-title mark {
    background: none;
    color: var(--primary);
}
.hero-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 1.4rem;
}
.price-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    background: #fff;
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    max-width: 420px;
    margin: 0 auto 1.4rem;
}
.price-box .label { font-size: .85rem; color: var(--muted); }
.price-box .price { font-size: 2rem; font-weight: 800; color: var(--primary); }

.offer-hint {
    text-align: center;
    font-size: .88rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 auto 1.2rem;
}

.cta-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--primary);
    color: #fff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(192,57,43,.35);
    transition: transform .15s ease, background .15s ease;
}
.cta-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--muted);
}
.hero-badges span { display: flex; align-items: center; gap: .35rem; }

/* ─── Section titre générique ────────────────────────────────────────── */
.section { padding: 2.6rem 0; }
.section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: .4rem;
}
.section-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: .95rem;
}

/* ─── Avantages / Pourquoi nous choisir ─────────────────────────────── */
.advantages { background: var(--cream); }
.adv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}
.adv-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.4rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.adv-card .icon { font-size: 2rem; margin-bottom: .6rem; }
.adv-card h3 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--dark); }
.adv-card p { font-size: .88rem; color: var(--muted); }

/* ─── Fonctionnalités (icônes) ──────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.feature-item {
    text-align: center;
    padding: 1rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.feature-item .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.feature-item p { font-size: .85rem; font-weight: 600; color: var(--dark); }

/* ─── Galerie produit ────────────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}
.gallery-grid img { border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.gallery-caption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.gallery-media { position: relative; align-self: start; }
.gallery-media img { display: block; width: 100%; }

/* ─── Spécifications ─────────────────────────────────────────────────── */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.specs-table tr:nth-child(even) { background: var(--cream); }
.specs-table td { padding: .8rem 1.1rem; font-size: .9rem; }
.specs-table td:first-child { font-weight: 700; color: var(--dark); width: 40%; }

/* ─── FAQ ────────────────────────────────────────────────────────────── */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .8rem;
    overflow: hidden;
}
.faq-item summary {
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--dark);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--primary); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.2rem 1.1rem; color: var(--muted); font-size: .9rem; }

/* ─── Avis clients ───────────────────────────────────────────────────── */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}
.review-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}
.review-stars { color: #f39c12; margin-bottom: .5rem; font-size: .9rem; }
.review-card p { font-size: .88rem; color: var(--text); margin-bottom: .6rem; }
.review-name { font-size: .82rem; font-weight: 700; color: var(--muted); }

/* ─── CTA final ──────────────────────────────────────────────────────── */
.final-cta {
    background: var(--dark);
    color: #fff;
    text-align: center;
    padding: 2.6rem 0;
}
.final-cta h2 { font-size: 1.4rem; margin-bottom: .6rem; }
.final-cta p { color: #ccc; margin-bottom: 1.4rem; font-size: .9rem; }

/* ─── Footer ─────────────────────────────────────────────────────────── */
footer {
    background: #111;
    color: #999;
    text-align: center;
    padding: 1.4rem 1rem;
    font-size: .8rem;
}

/* ─── Barre CTA sticky (mobile) ──────────────────────────────────────── */
.sticky-cta {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: .6rem 1rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,.1);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: .8rem;
}
.sticky-cta .price { font-weight: 800; color: var(--primary); font-size: 1.05rem; white-space: nowrap; }
.sticky-cta button { flex: 1; }

/* ─── Popup formulaire de commande ───────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: #fff;
    border-radius: var(--radius);
    max-width: 460px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.6rem;
    position: relative;
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-close {
    position: absolute;
    top: .8rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--muted);
}
.modal-box h3 { font-size: 1.2rem; text-align: center; margin-bottom: .3rem; color: var(--dark); }
.modal-box .modal-sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.2rem; }

.form-group { margin-bottom: .9rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--dark); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 70px; }

.offer-list { display: flex; flex-direction: column; gap: .6rem; }
.offer-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: .7rem .9rem;
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
}
.offer-card input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.offer-card:has(input:checked),
.offer-card.is-selected { border-color: var(--primary); background: var(--cream); }
.offer-info { flex: 1; display: flex; flex-direction: column; }
.offer-title { font-weight: 700; color: var(--dark); font-size: .95rem; }
.offer-save { font-size: .78rem; color: var(--success); font-weight: 600; }
.offer-price { font-weight: 800; color: var(--primary); font-size: 1.05rem; white-space: nowrap; }
.offer-best { border-color: #f39c12; }
.offer-best::before {
    content: 'الأكثر توفيراً';
    position: absolute;
    top: -10px;
    right: 12px;
    background: #f39c12;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 6px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cream);
    border-radius: 10px;
    padding: .8rem 1rem;
    margin: 1rem 0;
    font-weight: 700;
}
.order-total span:last-child { color: var(--primary); font-size: 1.15rem; }

.form-note {
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    margin-top: .6rem;
}
.form-note strong { color: var(--success); }

.form-msg { font-size: .85rem; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; display: none; }
.form-msg.show { display: block; }
.form-msg.error { background: #fdecea; color: var(--primary); }
.form-msg.success { background: #e6f6ea; color: var(--success); }

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.submit-btn:not(:disabled):hover { background: var(--primary-dark); }

@media (min-width: 720px) {
    .hero-title { font-size: 2.3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .sticky-cta { display: none; } /* desktop : le CTA hero suffit */
}
