/* ============================================================
   PROST — Couche complémentaire (chargée en dernier, public + admin)
   1. Bandeau d'annonce + menu FIXES
   2. Sélecteur de langue + arabe (RTL) + masquage de l'interface Google
   3. Bouton « son des notifications »
   4. Affiliation (espace client / admin)
   5. Lisibilité : textes plus contrastés et plus grands
   6. Bleu unique #0033CC (le pied de page reste inchangé)
   ============================================================ */

/* ---------- 1. Bandeau + navigation toujours visibles ---------- */
.site-header-fixed { position: sticky; top: 0; z-index: 300; }
.site-header-fixed .navbar { position: relative; top: auto; }
.site-header-fixed .announcement-bar { position: relative; z-index: 2; }
html { scroll-padding-top: 130px; }
@media (max-width: 700px) { html { scroll-padding-top: 110px; } }
@media (max-width: 1240px) {
    .nav-links { max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); }
}

/* ---------- 2. Langue ---------- */
.lang-switch { position: relative; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
    border-radius: 21px; border: 1px solid var(--border-soft); background: #fff; cursor: pointer;
    font-family: var(--font-sans); font-size: 15px; font-weight: 700; color: var(--navy-800);
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: #eef3ff; border-color: var(--blue-accent); }
.lang-btn i { font-size: 17px; }
.lang-menu {
    display: none; position: absolute; right: 0; top: 50px; min-width: 190px; z-index: 400;
    background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 6px;
    box-shadow: 0 18px 44px rgba(7, 18, 51, .18);
}
.lang-menu.open { display: block; animation: ui-pop .2s var(--ease-out) both; }
.lang-menu button {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: none;
    background: none; border-radius: 9px; cursor: pointer; text-align: left;
    font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--ink-900);
}
.lang-menu button b { display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 6px; background: #eef3ff; color: var(--blue-accent); font-size: 12.5px; text-align: center; }
.lang-menu button:hover { background: #eef3ff; }
.lang-menu button.active { background: var(--blue-accent); color: #fff; }
.lang-menu button.active b { background: rgba(255, 255, 255, .2); color: #fff; }
@media (max-width: 700px) { .lang-btn { height: 40px; padding: 0 10px; } .lang-menu { right: -50px; } }

/* Google Website Translator : on cache sa barre et ses infobulles (le sélecteur ci-dessus le pilote) */
body { top: 0 !important; position: static !important; }
.goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt, .goog-tooltip, .goog-te-gadget-icon,
body > .skiptranslate, iframe.skiptranslate { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style*="vertical-align"] { vertical-align: baseline !important; }

/* Arabe : lecture de droite à gauche */
html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif; }
html[dir="rtl"] .announcement-bar { direction: ltr; }
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-menu button { text-align: right; }
html[dir="rtl"] .nav-dropdown-menu { left: auto; right: 0; }
html[dir="rtl"] #chat-widget { right: auto; left: max(20px, env(safe-area-inset-left)); }
html[dir="rtl"] #chat-panel { right: auto; left: 0; }
html[dir="rtl"] #back-top { right: auto; left: 20px; }
html[dir="rtl"] table.table th, html[dir="rtl"] table.table td { text-align: right; }
html[dir="rtl"] footer.site-footer li a:hover { transform: translateX(-4px); }
html[dir="rtl"] .section-head, html[dir="rtl"] .hero, html[dir="rtl"] .hero-sm { text-align: start; }
html[dir="rtl"] .timeline { padding-left: 0; padding-right: 34px; }
html[dir="rtl"] .timeline::before { left: auto; right: 9px; }
html[dir="rtl"] .timeline-item::before { left: auto; right: -34px; }
html[dir="rtl"] .notif-dropdown { right: auto; left: 0; }
html[dir="rtl"] .bi-arrow-right::before, html[dir="rtl"] .bi-chevron-right::before { display: inline-block; transform: scaleX(-1); }
@media (max-width: 1240px) { html[dir="rtl"] .nav-links { text-align: right; } }

/* ---------- 3. Son des notifications ---------- */
.sound-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    border-radius: 50%; border: none; background: rgba(0, 51, 204, .08); color: var(--blue-accent);
    cursor: pointer; font-size: 17px; transition: background .2s, transform .2s;
}
.sound-toggle:hover { background: rgba(0, 51, 204, .18); transform: scale(1.08); }
#chat-panel-head .sound-toggle { background: rgba(255, 255, 255, .18); color: #fff; }
#chat-panel-head .sound-toggle:hover { background: rgba(255, 255, 255, .32); }
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sound-toggle-admin { border: none; background: #f1f4fb; }
.sound-toggle-admin[aria-pressed="false"] { color: var(--ink-400); }

/* ---------- 4. Affiliation ---------- */
.aff-kpi { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.aff-kpi span { font-size: 14.5px; font-weight: 600; color: var(--ink-600); }
.aff-kpi strong { font-size: 28px; line-height: 1.15; color: var(--navy-900); letter-spacing: -.02em; }
.aff-kpi small { font-size: 13.5px; color: var(--ink-600); }
.aff-kpi-main { background: var(--blue-accent); border-color: var(--blue-accent); }
.aff-kpi-main span, .aff-kpi-main strong, .aff-kpi-main small { color: #fff; }
.aff-h3 { margin: 0 0 16px; font-size: 18px; color: var(--navy-900); }
.aff-label { display: block; margin-bottom: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink-900); }
.aff-linkrow { display: flex; gap: 10px; flex-wrap: wrap; }
.aff-linkrow .form-control { flex: 1 1 240px; min-width: 0; }
.aff-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.aff-hr { border: none; border-top: 1px solid var(--border-soft); margin: 22px 0; }
.aff-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.aff-rules li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--ink-600); }
.aff-rules li i { color: var(--blue-accent); font-size: 18px; margin-top: 1px; }
.aff-join { padding: 38px 30px; }
.aff-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.aff-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.aff-bar span { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--blue-accent); transform-origin: bottom; animation: adm-grow .7s var(--ease-out) both; opacity: .9; }
.aff-bar:hover span { opacity: 1; }
.aff-bar small { font-size: 12px; color: var(--ink-600); }
.aff-progress { height: 10px; border-radius: 10px; background: #e7ecf7; overflow: hidden; }
.aff-progress span { display: block; height: 100%; background: var(--blue-accent); border-radius: 10px; transition: width .8s var(--ease-out); }
.aff-admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 20px; align-items: start; }
.aff-admin-form .aff-check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 15.5px; cursor: pointer; }
.aff-admin-form small { display: block; margin-top: 4px; color: var(--ink-600); font-size: 13px; }
.aff-admin-form > div:last-child { grid-column: 1 / -1; }
.admin-stats-grid:has(> :nth-child(5)) { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@keyframes adm-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- 5. Lisibilité ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: 16.5px; line-height: 1.65; color: var(--ink-900); -webkit-font-smoothing: antialiased; }
label { font-size: 15px; }
.form-control, select.form-control, textarea.form-control, input.form-control { font-size: 16px; color: var(--ink-900); }
::placeholder { color: #6b7686; opacity: 1; }
table.table th { font-size: 13.5px; color: var(--ink-900); }
table.table td { font-size: 15.5px; color: var(--ink-900); }
.btn { font-weight: 700; }
.nav-links > a, .nav-dropdown-toggle { font-weight: 700; color: var(--ink-900); }
.nav-links > a:hover, .nav-links > a.active, .nav-dropdown-toggle:hover { color: var(--blue-accent); }
.announcement-bar { font-size: 15px; font-weight: 600; color: #fff; }
.announcement-bar a { color: #fff; text-decoration: underline; }
.product-card .desc, .cat-card p, .value-card p, .sector-card p, .tile p, .faq-a { color: var(--ink-600); font-size: 15.5px; }
.eyebrow { font-weight: 800; }
@media (max-width: 640px) { body { font-size: 16px; } }

/* ---------- 6. Bleu unique #0033CC (pied de page inchangé) ---------- */
.btn-primary { background: #0033cc; border-color: #0033cc; color: #fff; }
.btn-primary:hover { background: #0033cc; border-color: #0033cc; filter: brightness(.9); }
.btn-accent, .btn-accent:hover { background-color: #0033cc; }
.btn-outline { color: #0033cc; border-color: #0033cc; }
.btn-outline:hover { background: #0033cc; color: #fff; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer::before { display: none; }              /* barre bleue ajoutée précédemment : le pied de page reste comme à l'origine */
.social-row a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero h1 span { background: none; -webkit-text-fill-color: #fff; color: #fff; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; text-decoration-color: rgba(255, 255, 255, .55); animation: none; }
.admin-bar span { background: #0033cc; }
.admin-sidebar a.active::before { background: #fff; }
.admin-sidebar a.active { background: rgba(0, 51, 204, .55); }

@media (prefers-reduced-motion: reduce) {
    .aff-bar span, .aff-progress span { animation: none !important; transition: none !important; }
}

/* ---------- Pastille « messages non lus » sur l'icône du live chat ---------- */
#chat-toggle { position: relative; overflow: visible; }
.chat-badge {
    position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
    background: #e5484d; color: #fff; font: 800 13px/1 var(--font-sans); border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(229, 72, 77, .45); animation: ui-pop .3s var(--ease-spring) both;
}
.chat-badge[hidden] { display: none; }
html[dir="rtl"] .chat-badge { right: auto; left: -6px; }
#chat-guest-fields { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
#chat-guest-fields input { width: 100%; }

/* ---------- Vérification de l'e-mail ---------- */
.verify-code { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 10px; padding: 14px 10px; }

/* ---------- Drapeaux du sélecteur de langue ---------- */
.lang-flag { width: 24px; height: 16px; border-radius: 3px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); vertical-align: middle; }
.lang-menu button { gap: 12px; }

/* ---------- Hero : suppression des reflets / lueurs de lumière ---------- */
.hero { background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 58%, var(--navy-700) 100%); }
.hero::before, .hero::after,
.hero .container::before, .hero .container::after { content: none; display: none; }
.hero-panel, .hero-eyebrow { backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero .btn::after { display: none; }

/* ---------- Zoom du site principal ----------
   Contenu réduit à ~88 % (95 % sur mobile). Le bandeau d'annonce défilant (au-dessus du menu) garde SA taille d'origine. */
:root { --site-zoom: .88; }
body:not(.admin-body) .navbar,
body:not(.admin-body) main,
body:not(.admin-body) footer.site-footer,
body:not(.admin-body) #chat-widget,
body:not(.admin-body) #back-top { zoom: var(--site-zoom); }
.site-header-fixed .announcement-bar { zoom: 1; }
@media (max-width: 700px) { :root { --site-zoom: .95; } }
