/* DESIGN SYSTEM & VARIABLES */
:root {
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --wa-primary: #128c7e; --wa-accent: #25d366; --wa-accent-hover: #1ebd5a; --wa-dark: #0f766e;
  --white: #ffffff;
  --error-dark: #dc2626;
  --warning-dark: #b45309; 
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 24px;
  --font-fr: 'Inter', system-ui, -apple-system, sans-serif; 
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s ease;
}

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-fr); color: var(--slate-900); background: var(--white); line-height: 1.6; overflow-x: hidden; }
html[dir="rtl"] body { font-family: var(--font-ar); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ESPACEMENT GLOBAL ET SCROLL MARGIN */
section { padding: 80px 0; }
section[id] { scroll-margin-top: 110px; }

.bg-light { background: var(--slate-50); }
.bg-dark { background: var(--slate-900); color: var(--white); }

/* BIDI ISOLATION (Numéros, Emails, Prix) */
.ltr-text { direction: ltr !important; unicode-bidi: isolate !important; display: inline-block; text-align: left; }
html[dir="rtl"] .ltr-text { text-align: right; }
.bidi-isolate { unicode-bidi: isolate; direction: ltr; display: inline-block; }

/* TYPOGRAPHY CONTRASTS (OPTIMISÉ A11Y) */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }
.text-center { text-align: center; }
.text-muted { color: var(--slate-700); font-weight: 500; } 
.bg-dark .text-muted, .pricing-card.bg-dark .text-muted, .pricing-card.bg-dark p { color: var(--slate-300); }
a { color: var(--wa-primary); text-decoration: none; outline: none; }
a:hover, a:focus-visible { text-decoration: underline; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--wa-accent); outline-offset: 2px; border-radius: 2px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; transition: var(--transition); border: none; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--wa-accent); color: var(--slate-900); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--wa-accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,211,102,0.3); text-decoration: none; }
.btn-outline { border: 2px solid var(--slate-200); background: var(--white); color: var(--slate-900); }
.bg-dark .btn-outline { border-color: var(--slate-500); background: transparent; color: var(--white); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--slate-50); border-color: var(--slate-300); text-decoration: none; }
.bg-dark .btn-outline:hover, .bg-dark .btn-outline:focus-visible { background: var(--slate-800); border-color: var(--slate-400); }
.btn-full { width: 100%; }

/* LAYOUT GRIDS */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* HEADER */
header { background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border-bottom: 1px solid var(--slate-200); position: sticky; top: 0; z-index: 999; height: 76px; display: flex; align-items: center; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--slate-800); font-weight: 600; font-size: 0.95rem; }
.lang-switcher { background: var(--slate-100); padding: 8px 16px; border-radius: var(--radius-sm); color: var(--slate-900); font-weight: 700; border: 1px solid var(--slate-200); transition: var(--transition); }
.lang-switcher:hover, .lang-switcher:focus-visible { background: var(--slate-200); text-decoration: none; }
.header-cta { padding: 10px 20px; }

/* PRICING CARDS */
.pricing-card { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 40px 32px; position: relative; display: flex; flex-direction: column; transition: var(--transition); }
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); }
.pricing-card.pro { border: 2px solid var(--wa-accent); box-shadow: 0 20px 25px -5px rgba(37,211,102,0.1); }
.pricing-card.bg-dark { border-color: var(--slate-800); background-color: var(--slate-900); }
.pro-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--wa-accent); color: var(--slate-900); padding: 4px 16px; border-radius: 20px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.5px; }

/* PRICE WRAPPERS */
.price-wrapper { display: flex; align-items: baseline; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.rtl-price-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--slate-900); line-height: 1; direction: ltr !important; unicode-bidi: isolate !important; display: inline-block; white-space: nowrap; }
.pricing-card.bg-dark .price-amount { color: var(--white); }
.price-unit { font-size: 1.1rem; color: var(--slate-600); font-weight: 700; white-space: nowrap; }
.pricing-card.bg-dark .price-unit { color: var(--slate-300); }

/* SETUP FEE */
.setup-fee { font-size: 0.95rem; font-weight: 700; color: var(--wa-dark); padding-bottom: 16px; border-bottom: 1px solid var(--slate-200); margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 4px;}
.pricing-card.bg-dark .setup-fee { color: var(--wa-accent); border-color: var(--slate-700); }

/* LISTS & LIMITS */
.pricing-list { list-style: none; margin-bottom: 32px; flex-grow: 1; }
.pricing-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 0.95rem; font-weight: 600; color: var(--slate-800); }
html[dir="rtl"] .pricing-list li { padding-right: 0; }
.pricing-card.bg-dark .pricing-list li { color: var(--slate-200); }
.pricing-list li::before { content: "✓"; color: var(--wa-primary); font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.limit-note { color: var(--error-dark); font-size: 0.85rem; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.limit-warning { color: var(--warning-dark); font-size: 0.85rem; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }

/* RESPONSIVE TABLE */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--white); border-radius: var(--radius-md); box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid var(--slate-200); }
table { width: 100%; min-width: 900px; border-collapse: collapse; text-align: left; }
html[dir="rtl"] table { text-align: right; }
th, td { padding: 16px 24px; border-bottom: 1px solid var(--slate-200); font-size: 0.95rem; white-space: nowrap; }
th { background: var(--slate-50); font-weight: 800; color: var(--slate-900); }
th:first-child, td:first-child { position: sticky; left: 0; background: inherit; z-index: 10; font-weight: 700; border-right: 1px solid var(--slate-200); color: var(--slate-900); }
html[dir="rtl"] th:first-child, html[dir="rtl"] td:first-child { left: auto; right: 0; border-right: none; border-left: 1px solid var(--slate-200); }
th:first-child { background: var(--slate-100); z-index: 11; }
td:first-child { background: var(--white); }
tbody tr:hover td { background-color: var(--slate-50); }
tbody tr:hover td:first-child { background-color: var(--slate-50); }
.table-section-title td { background: var(--slate-800) !important; color: var(--white); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; border: none; }

/* INTERACTIVE FAQ */
.faq-wrapper { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--slate-200); background: var(--white); margin-bottom: 8px; border-radius: var(--radius-sm); overflow: hidden; }
.faq-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 24px; background: none; border: none; text-align: left; font-size: 1.1rem; font-weight: 800; color: var(--slate-900); cursor: pointer; font-family: inherit; }
html[dir="rtl"] .faq-btn { text-align: right; }
.faq-btn:hover, .faq-btn:focus-visible { background-color: var(--slate-50); outline: none; box-shadow: inset 0 0 0 3px var(--wa-accent); }
.faq-icon { width: 24px; height: 24px; position: relative; flex-shrink: 0; transition: transform 0.3s ease; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; background: var(--wa-primary); border-radius: 2px; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: all 0.3s ease; }
.faq-icon::before { width: 16px; height: 3px; }
.faq-icon::after { width: 3px; height: 16px; }
.faq-btn[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-btn[aria-expanded="true"] .faq-icon::after { opacity: 0; }
.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: var(--white); }
.faq-content-inner { padding: 0 24px 24px 24px; }
.faq-text { color: var(--slate-700); font-size: 1rem; line-height: 1.6; font-weight: 500; margin: 0; }

/* CONTACT & FORM */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; background: var(--white); border-radius: var(--radius-lg); padding: 48px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); border: 1px solid var(--slate-200); }
.contact-info-box { background: var(--slate-50); padding: 32px; border-radius: var(--radius-md); height: 100%; border: 1px solid var(--slate-200); }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-icon { font-size: 1.5rem; }
.input-group { margin-bottom: 20px; text-align: left; }
html[dir="rtl"] .input-group { text-align: right; }
.input-group label { display: block; font-weight: 800; margin-bottom: 8px; font-size: 0.95rem; color: var(--slate-900); }
.input-group input, .input-group textarea { width: 100%; padding: 16px; border: 2px solid var(--slate-200); border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; transition: var(--transition); background: var(--slate-50); color: var(--slate-900); font-weight: 500; }
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--wa-primary); background: var(--white); box-shadow: 0 0 0 4px rgba(18,140,126,0.1); }
.form-help { font-size: 0.85rem; color: var(--slate-600); margin-top: 6px; display: block; font-weight: 600; }

/* FLOATING WA */
.wa-float { position: fixed; bottom: 32px; right: 32px; background: var(--wa-accent); width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(37,211,102,0.4); z-index: 1000; transition: var(--transition); }
.wa-float:hover, .wa-float:focus-visible { transform: scale(1.1); outline: none; }
html[dir="rtl"] .wa-float { right: auto; left: 32px; }

/* RESPONSIVE */
@media (max-width: 992px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  
  /* Masquage du CTA Header sur mobile pour éviter la casse du design */
  .header-cta { display: none !important; }
  
  .contact-grid { grid-template-columns: 1fr; padding: 24px; }
  .pricing-card.pro { transform: none; }
  .pricing-card.pro:hover { transform: translateY(-4px); }
  section { padding: 60px 0; }
  h1 { font-size: 2.2rem !important; }
}

@media (max-width: 480px) {
  /* Le bouton langue reprend sa taille confortable puisqu'il a de l'espace */
  .lang-switcher { padding: 8px 16px; font-size: 0.95rem; }
}
