/* --- Variables & Identity VIDYA.ma --- */
:root {
    --primary-orange: #FF5500;
    --primary-hover: #E04B00;
    --dark-charcoal: #1A1D20;
    --text-muted: #5A626A;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --success-green: #10B981;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(255, 85, 0, 0.15);
}

[dir="rtl"] {
    --font-main: 'Cairo', -apple-system, sans-serif;
}

/* --- Base & Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--dark-charcoal);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 75px; /* Prevent sticky mobile CTA overlap */
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.bg-light { background-color: var(--bg-white); }
.bg-light-soft { background-color: #F8FAFC; }
.center { text-align: center; }
.hidden { display: none !important; }
.style-mt { margin-top: 15px; }

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--dark-charcoal);
    font-weight: 800;
    line-height: 1.25;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

/* --- Buttons & CTAs --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
    min-height: 48px;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.3);
}

.btn-primary:hover, .btn-primary:focus-visible {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--dark-charcoal);
}

.btn-outline:hover, .btn-outline:focus-visible {
    border-color: var(--dark-charcoal);
    outline: 2px solid var(--dark-charcoal);
    outline-offset: 2px;
}

.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; min-height: 42px; }
.btn-lg { padding: 18px 36px; font-size: 1.125rem; min-height: 54px; }
.btn-xl { padding: 20px 40px; font-size: 1.25rem; min-height: 58px; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.pulsating { animation: pulse 2.5s infinite; }

/* --- Header --- */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

.footer-logo-img {
    max-height: 40px;
    width: auto;
    display: block;
    margin-bottom: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    font-weight: 700;
    font-size: 0.9rem;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 4px;
}

.lang-btn.active {
    color: var(--primary-orange);
    background: rgba(255, 85, 0, 0.08);
}

.lang-btn:focus-visible {
    outline: 2px solid var(--primary-orange);
}

/* --- Hero --- */
.hero {
    padding: 50px 0 60px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F4F5F8 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge-promo {
    display: inline-block;
    background: rgba(255, 85, 0, 0.1);
    color: var(--primary-orange);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.features-bullets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 0.95rem;
}

.hero-pricing-box {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.price-item.highlight {
    background: #FFFBF9;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary-orange);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-recommended {
    background: var(--primary-orange);
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
}

.price-val { font-weight: 800; color: var(--primary-orange); }

.reassurance-hero-tags {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-charcoal);
}

.hero-cta-group {
    display: flex;
    gap: 16px;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.color-thumbnails {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.thumbs-list { display: flex; gap: 8px; }

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #FFF;
    box-shadow: 0 0 0 1px var(--border-color);
    position: relative;
}

.color-dot.out-of-stock {
    opacity: 0.45;
    cursor: not-allowed;
}

.color-dot.out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 2px;
    background-color: #EF4444;
    transform: translateY(-50%) rotate(-45deg);
    border-radius: 1px;
}

.color-rouge { background-color: #DC2626; }
.color-vert { background-color: #16A34A; }
.color-bleu { background-color: #2563EB; }
.color-marron { background-color: #78350F; }
.color-gris { background-color: #4B5563; }

/* --- Section Problème & Transition --- */
.problem-solution-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    margin-top: 30px;
}

.problem-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.problem-card {
    background: #FFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.problem-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.problem-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.problem-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.problem-image-box {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.problem-image-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.problem-conclusion-box {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
    margin-top: 30px;
    font-size: 1.05rem;
}

/* --- Section Solution & Macro --- */
.macro-image-container {
    max-width: 600px;
    margin: 0 auto 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.macro-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.grid-3-how {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Section Démo Vidéo & Nettoyage --- */
.demo-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.video-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    background: #000;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explainer-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cleaning-demo-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.cleaning-demo-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Grid 4 & Bénéfices --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.benefit-card {
    background: var(--bg-white);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.icon { font-size: 2.2rem; margin-bottom: 12px; }

/* --- Cas d'usage Lifestyle --- */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.usage-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.usage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-orange);
}

.usage-img-box {
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #E2E8F0;
}

.usage-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.usage-info {
    padding: 16px;
    text-align: center;
}

.usage-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 6px;
}

.usage-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.usage-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Offers Grid --- */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.offer-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.offer-card.selected, .offer-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-hover);
}

.offer-recommended {
    background: #FFFBF9;
    border: 3px solid var(--primary-orange);
}

.top-badge {
    position: absolute;
    top: -14px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    background: var(--primary-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
[dir="rtl"] .top-badge { transform: translateX(50%); }

.offer-header { text-align: center; margin-bottom: 16px; }
.offer-body { text-align: center; margin-bottom: 24px; }
.offer-price { font-size: 2.25rem; font-weight: 800; }
.offer-price.highlight { color: var(--primary-orange); }
.price-strikethrough { text-decoration: line-through; color: var(--text-muted); }
.savings-pill { 
    background: rgba(16, 185, 129, 0.1); 
    color: var(--success-green); 
    font-weight: 700; 
    font-size: 0.85rem; 
    padding: 4px 10px; 
    border-radius: 50px; 
    display: inline-block; 
    margin-top: 8px; 
}

/* --- Pre-Order Reassurance Grid --- */
.reassurance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.reassurance-card {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-charcoal);
}

/* --- Checkout Form Card --- */
.form-container { max-width: 580px; }
.form-card { 
    background: var(--bg-white); 
    padding: 32px; 
    border-radius: var(--radius-lg); 
    border: 1.5px solid var(--border-color); 
    box-shadow: var(--shadow-soft); 
}
.form-title { font-size: 1.75rem; margin-bottom: 24px; text-align: center; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.form-input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 1.5px solid var(--border-color); 
    border-radius: var(--radius-sm); 
    font-size: 1rem; 
    font-family: inherit; 
    min-height: 48px;
}
.form-input:focus { outline: none; border-color: var(--primary-orange); box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.12); }
.error-msg { color: #DC2626; font-size: 0.8rem; margin-top: 4px; display: block; font-weight: 600; }

/* --- Color Swatches for Form --- */
.color-swatches-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.swatch-btn {
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    min-height: 42px;
}

.swatch-btn:hover, .swatch-btn:focus-visible {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.swatch-btn.active {
    border-color: var(--primary-orange);
    background: rgba(255, 85, 0, 0.05);
    box-shadow: 0 4px 10px rgba(255, 85, 0, 0.15);
}

.swatch-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.swatch-btn.active .swatch-circle {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--primary-orange);
}

.swatch-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dark-charcoal);
}

.selected-color-name {
    color: var(--primary-orange);
    margin-inline-start: 6px;
    font-weight: 800;
}

.swatch-btn.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    background-color: #F8FAFC;
    border-color: #CBD5E1;
    border-style: dashed;
}

.swatch-btn.out-of-stock .swatch-label {
    text-decoration: line-through;
    color: #94A3B8;
}

.swatch-btn .stock-badge {
    font-size: 0.725rem;
    font-weight: 700;
    color: #EF4444;
    margin-inline-start: 4px;
}

.form-offer-selector { display: flex; flex-direction: column; gap: 10px; }
.radio-card { border: 1.5px solid var(--border-color); padding: 14px 16px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 12px; cursor: pointer; }
.radio-card.selected { border-color: var(--primary-orange); background: rgba(255, 85, 0, 0.03); }
.radio-content { display: flex; justify-content: space-between; width: 100%; font-weight: 700; }

.form-summary-banner {
    background: #FAFBFD;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.form-summary-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.summary-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    font-size: 0.9rem;
}

.summary-item strong {
    color: var(--primary-orange);
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 750px;
    margin: 0 auto;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-header {
    width: 100%;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-white);
    border: none;
    text-align: start;
    font-family: inherit;
    color: var(--dark-charcoal);
}

.faq-header:hover, .faq-header:focus-visible {
    background: #FAFBFD;
    outline: none;
}

.faq-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: var(--primary-orange);
    font-weight: 800;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active .faq-content {
    max-height: 300px;
    padding: 0 20px 18px 20px;
    border-top: 1px solid var(--border-color);
}

/* --- Final CTA Section --- */
.final-cta-box {
    background: linear-gradient(135deg, var(--dark-charcoal) 0%, #2D3748 100%);
    color: white;
    padding: 50px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.final-cta-box h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 16px;
}

.final-cta-box p {
    color: #CBD5E1;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* --- Footer & Mobile Bar --- */
.footer { background: var(--dark-charcoal); color: white; padding: 40px 0 80px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.footer-brand h3 span { color: var(--primary-orange); }
.footer-brand p { color: #A0AEC0; font-size: 0.9rem; }
.footer-links a { color: white; text-decoration: none; margin-inline-start: 20px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid #2D3748; padding-top: 20px; color: #A0AEC0; font-size: 0.85rem; }

.sticky-mobile-bar {
    position: fixed;
    bottom: 0;
    inset-inline-start: 0;
    width: 100%;
    background: #FFFFFF;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    z-index: 99;
    display: none;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-card { background: white; padding: 32px; border-radius: var(--radius-lg); max-width: 450px; width: 100%; }
.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.order-ref-box { background: var(--bg-light); padding: 12px; border-radius: var(--radius-sm); margin-top: 16px; font-size: 0.95rem; }

/* --- Responsive Mobile-First & Breakpoints --- */
@media (max-width: 768px) {
    .header-content .nav-links, .btn-header { display: none; }
    .hero-grid, .offers-grid, .grid-4, .usage-grid, .demo-content-grid, .problem-solution-layout, .grid-3-how, .reassurance-grid, .summary-details-grid { 
        grid-template-columns: 1fr; 
    }
    .hero { padding: 30px 0; text-align: center; }
    .hero-cta-group { flex-direction: column; }
    .hero-pricing-box { text-align: start; }
    .reassurance-hero-tags { justify-content: center; flex-wrap: wrap; }
    .sticky-mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .sticky-mobile-bar .btn { min-height: 44px; padding: 10px 16px; }
    .form-card { padding: 20px; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .footer-links a { display: block; margin: 8px 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-4, .usage-grid { grid-template-columns: repeat(2, 1fr); }
    .reassurance-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1440px) {
    .container { max-width: 1180px; }
}