/* ==========================================================
   TASSARUF — feuille de style des pages françaises (LTR)
   Même design que tassaruf_ar.css (pages arabes), sens gauche → droite.
   ========================================================== */

:root {
    --blue: #0055a4;
    --blue-dark: #003d75;
    --blue-soft: #e8f0fa;
    --ink: #1d2733;
    --muted: #5b6673;
    --line: #dfe5ec;
    --bg: #f5f7fa;
    --card: #ffffff;
    --gold: #f3d00b;
    --green: #1e8e4e;        /* réservé aux boutons principaux */
    --green-dark: #166c3b;
    --accent-tijari: #0055a4;
    --accent-mouhassaba: #6b3fa0;
    --accent-amala: #c2620a;
    --accent-web: #0e7c86;
    --accent-expertise: #475569;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(16, 38, 66, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    direction: ltr;
    text-align: left;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    margin: 0 0 0.5em;
}

/* Texte latin intégré (noms de produits, sigles) */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.fr-tag {
    font-family: 'Cairo', Tahoma, sans-serif;
    font-size: 0.62em;
    font-weight: 600;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0 0.35em;
    margin-inline-start: 0.3em;
    vertical-align: middle;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- En-tête et navigation ---------- */
.site-header {
    background: var(--blue-dark);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.site-header nav a {
    display: block;
    color: #fff;
    padding: 12px 16px;
    font-size: 0.95em;
}
.site-header nav a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.site-header nav .nav-about a { color: var(--gold); font-weight: 700; }
.site-header nav .nav-lang a {
    font-family: 'Cairo', Tahoma, sans-serif;
    font-size: 0.8em;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    margin: 8px 6px;
    padding: 4px 12px;
}

/* ---------- Hero ---------- */
.hero {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 24px 0 40px;
}
.logo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.logo-bar .logos { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo-bar .logos img { height: 70px; width: auto; }
.qr-code { text-align: center; font-size: 0.7em; color: var(--muted); }
.qr-code img { width: 70px; height: 70px; border-radius: 8px; display: block; margin: 0 auto 2px; }

.hero h1 {
    font-size: 2.2em;
    color: var(--blue-dark);
}
.hero h1 .h1-sub { display: block; font-size: 0.62em; color: var(--blue); font-weight: 600; }
.hero .intro { font-size: 1.1em; max-width: 920px; }

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0;
}
.stat-item {
    background: var(--blue-soft);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.stat-num {
    font-family: 'Cairo', Tahoma, sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: var(--blue);
    direction: ltr;
}
.stat-label { color: var(--muted); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-block;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 1em;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue-soft); }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 28px; }
.section-header h2 { font-size: 1.9em; color: var(--blue-dark); }
.section-header p { color: var(--muted); margin: 0; }
.section-divider {
    width: 70px;
    height: 4px;
    background: var(--blue);
    border-radius: 2px;
    margin: 14px auto 0;
}

/* Bandeau MOUHASSABA */
.highlight-banner {
    background: linear-gradient(135deg, #3d2363 0%, var(--accent-mouhassaba) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.highlight-banner h3 { color: #fff; font-size: 1.5em; }
.highlight-banner p { margin: 0 0 12px; }
.highlight-banner .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.highlight-banner .tag {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 0.85em;
}
.highlight-banner .banner-text { flex: 1 1 520px; }
.highlight-banner .btn-light {
    background: #fff;
    color: var(--accent-mouhassaba);
    white-space: nowrap;
}

/* Cartes de solutions */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.solution-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border-top: 5px solid var(--accent, var(--blue));
    scroll-margin-top: 70px;
}
.solution-card.tijari { --accent: var(--accent-tijari); }
.solution-card.mouhassaba { --accent: var(--accent-mouhassaba); }
.solution-card.amala { --accent: var(--accent-amala); }
.solution-card.web { --accent: var(--accent-web); }
.solution-card h2 { font-size: 1.45em; color: var(--accent); }
.solution-card h3 { font-size: 1.15em; color: var(--ink); }
.solution-card ul { margin: 12px 0 0; padding-inline-start: 1.2em; }
.solution-card li { margin-bottom: 6px; }
.solution-card .meta { color: var(--muted); }

/* Nouveautés */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.news-item {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border-inline-start: 4px solid var(--gold);
}
.news-item h3 { font-size: 1.2em; color: var(--blue-dark); }
.news-item p { margin: 0 0 8px; }

/* Expertise */
.expertise {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    border-top: 5px solid var(--accent-expertise);
}
.expertise h2 { color: var(--accent-expertise); }
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.expertise-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
}
.expertise-card h4 { font-size: 1.1em; }
.expertise-card p { margin: 0; color: var(--muted); }
.expertise-links { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; list-style: none; margin: 0; }

/* ---------- Contact ---------- */
.contact-box {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    max-width: 760px;
    margin: 0 auto;
    scroll-margin-top: 70px;
}
.contact-box h2 { text-align: center; color: var(--blue-dark); }
.contact-box .contact-phone { text-align: center; margin-bottom: 20px; }
.contact-box form { display: grid; gap: 6px; }
.contact-box label { font-weight: 600; margin-top: 8px; }
.contact-box input,
.contact-box select,
.contact-box textarea {
    width: 100%;
    font-family: 'Cairo', Tahoma, sans-serif;
    font-size: 0.95em;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.contact-box textarea { min-height: 130px; resize: vertical; }
.contact-box input:focus,
.contact-box select:focus,
.contact-box textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.contact-box .g-recaptcha { margin-top: 12px; }
.contact-box button { margin-top: 14px; justify-self: start; }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; }
.statcounter { display: none; }

/* ---------- Pied de page ---------- */
.site-footer {
    background: #1f2a37;
    color: #d3dae3;
    margin-top: 48px;
    padding: 36px 0 0;
    font-size: 0.95em;
}
.site-footer a { color: #e6ecf3; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 28px;
}
.site-footer h4 { color: #fff; font-size: 1.1em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .footer-about a { color: var(--gold); font-weight: 700; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 28px;
    padding: 14px 0;
    text-align: center;
    font-size: 0.85em;
    color: #9fb0c2;
}

/* ---------- Bouton WhatsApp ---------- */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 60;
    background: #25d366;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.whatsapp-button img { width: 30px; height: 30px; }

/* ---------- Adaptation écrans ---------- */
@media (max-width: 900px) {
    .solutions-grid, .news-grid, .expertise-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero h1 { font-size: 1.7em; }
    .stats-strip { grid-template-columns: 1fr; }
    .logo-bar .logos img { height: 54px; }
    .site-header { position: static; }
    .site-header nav a { padding: 8px 10px; font-size: 0.85em; }
    .solution-card, .expertise, .contact-box, .highlight-banner { padding: 20px; }
}
/* ==========================================================
   Pages produit (comptabilité, commercial, paie…)
   ========================================================== */
.product-page .hero h1 { font-size: 2.1em; }
.features-box {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 22px 26px; margin: 26px 0;
}
.features-box h3 { margin: 0 0 10px; color: var(--blue-dark); }
.features-box ul { margin: 0; padding-left: 22px; }
.features-box li { margin: 6px 0; }
.lead { color: var(--ink); }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.adv-item {
    background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent, var(--blue));
    border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.adv-item h3 { margin: 0 0 8px; font-size: 1.08em; color: var(--blue-dark); }
.adv-item p { margin: 0; color: var(--muted); }
.qa-list { list-style: none; padding: 0; margin: 0; }
.qa-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qa-list li:last-child { border-bottom: 0; }
.qa-list strong { display: block; color: var(--blue-dark); margin-bottom: 4px; }

/* Galerie */
.gallery { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; }
.gallery a { flex: 0 0 auto; scroll-snap-align: start; }
.gallery img {
    height: 220px; width: auto; border-radius: 8px; border: 1px solid var(--line);
    box-shadow: var(--shadow); background: #fff; display: block;
}
.gallery-note { font-size: 0.85em; color: var(--muted); margin-top: 4px; }

/* Versions et prix */
.versions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0 30px; }
.version-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 22px; text-align: center; border-top: 5px solid var(--accent, var(--blue));
}
.version-card .v-name { font-weight: 700; font-size: 1.15em; color: var(--blue-dark); }
.version-card .v-latin { font-size: 0.8em; color: var(--muted); }
.version-card .v-price { font-size: 1.9em; font-weight: 700; color: var(--accent, var(--blue)); margin: 6px 0 10px; }
.version-card ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.version-card li { padding: 3px 0; }
.version-card .v-ideal { font-style: italic; color: var(--ink); margin-top: 6px; }
.version-card.v-ess { --accent: #4a7fc1; }
.version-card.v-pro { --accent: var(--accent-mouhassaba); }
.version-card.v-cab { --accent: #8a5a00; }

.compare h3 { margin: 30px 0 10px; color: var(--blue-dark); }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.95em; }
.compare th, .compare td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.compare th { background: var(--blue-dark); color: #fff; font-weight: 600; text-align: center; }
.compare th:first-child { text-align: left; width: 52%; }
.compare td { text-align: center; }
.compare td:first-child { text-align: left; }
.compare tr:nth-child(even) td { background: #fafbfd; }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .no { color: #c0392b; }
.note-box {
    background: #fff8e1; border-left: 5px solid var(--gold); border-radius: 8px;
    padding: 14px 18px; margin: 24px 0; font-size: 0.95em;
}

/* Documentation et ressources */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.res-card {
    display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; color: var(--ink); text-decoration: none; transition: transform .15s;
}
.res-card:hover { transform: translateY(-2px); text-decoration: none; }
.res-card .rc-icon { font-size: 1.8em; }
.res-card .rc-title { font-weight: 700; color: var(--blue-dark); margin: 6px 0; }
.res-card .rc-desc { color: var(--muted); margin: 0 0 8px; font-size: 0.92em; }
.res-card .rc-link { color: var(--blue); font-weight: 600; }
.res-card.featured { border: 2px solid var(--accent-mouhassaba); }
.link-list { columns: 2; padding-left: 22px; }
.link-list li { margin: 6px 0; break-inside: avoid; }

@media (max-width: 900px) {
    .adv-grid, .versions, .res-grid { grid-template-columns: 1fr; }
    .link-list { columns: 1; }
}
@media (max-width: 600px) {
    .product-page .hero h1 { font-size: 1.55em; }
    .gallery img { height: 170px; }
}
/* Vidéos, modules repliables, questions fréquentes */
.video-wrap { position: relative; width: 100%; max-width: 820px; margin: 22px auto; aspect-ratio: 16 / 9; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.module-list { display: grid; gap: 12px; margin-top: 20px; }
details.module, details.faq {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
details.module > summary, details.faq > summary {
    cursor: pointer; list-style: none; padding: 14px 48px 14px 20px; font-weight: 700; color: var(--blue-dark);
    display: block; position: relative;
}
details.module > summary::-webkit-details-marker, details.faq > summary::-webkit-details-marker { display: none; }
details.module > summary::after, details.faq > summary::after { content: "+"; font-size: 1.3em; color: var(--blue); position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
details[open].module > summary::after, details[open].faq > summary::after { content: "−"; }
details.module .module-body, details.faq .faq-body { padding: 0 22px 16px; }
details.module h4 { margin: 12px 0 4px; color: var(--ink); }
details.module ul { margin: 4px 0; padding-left: 22px; }
details.module li { margin: 3px 0; }
.video-links { padding-left: 22px; }
.video-links li { margin: 5px 0; }
.compare.simple table { min-width: 0; }
.compare.simple td:first-child { font-weight: 700; }

/* ---------- Spécifique pages françaises ---------- */
[lang="ar"] { font-family: 'Markazi Text', 'Cairo', Tahoma, serif; font-size: 1.15em; }
.site-header nav [lang="ar"] { font-size: 1.1em; }
.hero h1 .h1-sub { margin-top: 4px; }
.contact-phone [lang="ar"] { display: block; }
