/* ============================================================
   SEHELY - Optimized Stylesheet
   Sections:
     1. LOADER
     2. HEADER
     3. BASE STYLES
     4. FOOTER & SOCIAL
     5. RTL BASE
     6. RTL COMPONENTS
     7. AURORA HERO (Projets page)
     8. VALUE CARDS (3D tilt + glow effect)
     9. RESPONSIVE MOBILE
    10. RESPONSIVE MOBILE RTL
    11. MISSING TAILWIND UTILITIES
   ============================================================ */


/* ==========================================================
   1. LOADER
   ========================================================== */

#sehely-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#sehely-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

#sehely-loader.loader-hidden {
    display: none;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 4rem;
    font-weight: 700;
    color: #34966d;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.1em;
    animation: fadeInOut 1.2s ease-in-out infinite;
    text-shadow: 0 4px 20px rgba(52, 150, 109, 0.3);
    margin-bottom: 2rem;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50%      { opacity: 1;   transform: scale(1); }
}

.loader-bar-track {
    width: 240px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3d9a72, #02a383);
    border-radius: 3px;
    animation: loaderFill 1.6s ease-in-out forwards;
}

@keyframes loaderFill {
    0% { width: 0; }
    60% { width: 70%; }
    100% { width: 100%; }
}


/* ==========================================================
   2. HEADER
   ========================================================== */

/* --- Base header --- */
.site-header {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    transition-property: background, backdrop-filter, -webkit-backdrop-filter, box-shadow !important;
}

/* Force Lato on entire header to prevent RTL font-family inheritance */
.site-header,
.site-header * {
    font-family: 'Lato', sans-serif !important;
}

/* Exception: nav links need Tajawal for Arabic text */
.rtl .site-header .nav-link,
.rtl .site-header .mobile-nav-item a {
    font-family: 'Tajawal', sans-serif !important;
}

.site-header.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* --- Nav links --- */
.nav-link {
    position: relative;
    letter-spacing: 0.01em;
    font-size: 0.9rem;
}

.nav-link.nav-active {
    color: #3d9a72;
    background: rgba(61, 154, 114, 0.08);
}

/* --- Hamburger --- */
.hamburger-btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-btn.is-active .hamburger-line-1 {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line-2 {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.is-active .hamburger-line-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile menu --- */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.is-open {
    max-height: calc(100vh - 4rem);
}

.mobile-nav-item {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.is-open .mobile-nav-item {
    opacity: 1;
    transform: translateY(0);
}

/* --- Language toggle --- */
.lang-toggle-btn .lang-flag svg {
    width: 1.25rem;
    height: 0.875rem;
    border-radius: 2px;
}

.lang-label {
    transition: color 0.3s ease;
}

/* --- Legal Modals --- */
.sehely-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sehely-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.sehely-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sehely-modal-container {
    position: relative;
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.sehely-modal.is-open .sehely-modal-container {
    transform: scale(1) translateY(0);
}

.sehely-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.sehely-modal-close {
    color: #9ca3af;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.sehely-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.sehely-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sehely-modal-body h3 {
    margin-top: 0;
}

.sehely-modal-body p {
    line-height: 1.7;
}


/* ==========================================================
   SCROLL ANIMATIONS
   ========================================================== */

.scroll-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scroll-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================
   CONTACT SECTION — Floating Labels & Cards
   ========================================================== */

/* --- Floating fields --- */
.floating-field {
    position: relative;
}

.floating-input {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    background: #f9fafb;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    color: #1f2937;
}

.floating-input:focus {
    border-color: #02a383;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(2, 163, 131, 0.1);
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Float up when focused or has value */
.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
    top: 0.45rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: #02a383;
    font-weight: 600;
}

/* Textarea label */
.floating-textarea + .floating-label {
    top: 1rem;
    transform: translateY(0);
}

.floating-textarea:focus + .floating-label,
.floating-textarea:not(:placeholder-shown) + .floating-label {
    top: 0.45rem;
    font-size: 0.7rem;
    color: #02a383;
    font-weight: 600;
}

.floating-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Select — always show label above */
.floating-label-select {
    top: 0.45rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: #02a383;
    font-weight: 600;
}

.floating-select {
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

/* RTL floating labels */
.rtl .floating-label {
    left: auto;
    right: 1rem;
}

.rtl .floating-select {
    background-position: left 0.75rem center;
}

/* --- ContactCard Split Layout --- */
.contact-card-wrapper {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    background: white;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
}

@media (min-width: 768px) {
    .contact-card-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

/* Decorative + corners */
.contact-card-wrapper .corner-plus {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    color: #d1d5db;
}

.corner-plus.top-left { top: 0.75rem; left: 0.75rem; }
.corner-plus.top-right { top: 0.75rem; right: 0.75rem; }
.corner-plus.bottom-left { bottom: 0.75rem; left: 0.75rem; }
.corner-plus.bottom-right { bottom: 0.75rem; right: 0.75rem; }

/* Info panel — left side */
.contact-card-info-panel {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Form panel — right side with muted bg + separator */
.contact-card-form-panel {
    padding: 2.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .contact-card-form-panel {
        border-top: none;
        border-left: 1px solid #e5e7eb;
    }
}

/* Contact info items inside the card */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s ease;
    color: inherit;
}

.contact-info-item:hover {
    background: rgba(2, 163, 131, 0.05);
}

.contact-info-item .info-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* RTL: border-left becomes border-right */
@media (min-width: 768px) {
    [dir="rtl"] .contact-card-form-panel {
        border-left: none;
        border-right: 1px solid #e5e7eb;
    }
}

.rtl .contact-info-item {
    text-align: right;
}

/* Responsive mobile */
@media (max-width: 767px) {
    .contact-card-info-panel,
    .contact-card-form-panel {
        padding: 1.5rem;
    }
}

/* Dark mode — ContactCard */
.dark .contact-card-wrapper {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.dark .contact-card-form-panel {
    background: #0f172a;
    border-color: #334155;
}

.dark .corner-plus {
    color: #475569;
}

.dark .contact-info-item:hover {
    background: rgba(2, 163, 131, 0.1);
}


/* ==========================================================
   3. BASE STYLES
   ========================================================== */

/* Styles for descriptions */
[data-i18n$="-desc"]:not([data-i18n="health-desc"]):not([data-i18n="mauridoc-desc"]),
.rtl [data-i18n$="-desc"]:not([data-i18n="health-desc"]):not([data-i18n="mauridoc-desc"]) {
    font-weight: 400 !important;
}

/* Title uniformization */
[data-i18n="mauridoc-title"]:not(footer [data-i18n="mauridoc-title"]),
.rtl [data-i18n="mauridoc-title"]:not(footer [data-i18n="mauridoc-title"]) {
    font-weight: 700 !important;
}

/* Subtitle uniformization */
[data-i18n="mauridoc-tagline"],
.rtl [data-i18n="mauridoc-tagline"] {
    font-weight: 500 !important;
}

/* Feature uniformization */
[data-i18n^="mauridoc-feature"],
.rtl [data-i18n^="mauridoc-feature"] {
    font-weight: 600 !important;
}

/* Neutralize font weight for footer links */
footer [data-i18n="mauridoc-title"],
footer [data-i18n="schedy-title"],
.rtl footer [data-i18n="mauridoc-title"],
.rtl footer [data-i18n="schedy-title"] {
    font-weight: normal !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #69b255;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #558f44;
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

/* Custom focus styles (non-floating inputs) */
input:not(.floating-input):focus,
textarea:not(.floating-input):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(105, 178, 85, 0.3);
    border-color: #69b255 !important;
}


/* ==========================================================
   4. FOOTER & SOCIAL
   ========================================================== */

.social-follow {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #69b255;
}


/* ==========================================================
   4.5. DARK MODE
   ========================================================== */

/* --- Smooth transition on toggle --- */
html.dark-transition,
html.dark-transition *,
html.dark-transition *::before,
html.dark-transition *::after {
    transition: background-color 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease !important;
    transition-delay: 0s !important;
}

/* --- Root --- */
html.dark {
    color-scheme: dark;
}

/* --- Body & backgrounds --- */
.dark body,
.dark .bg-light {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .bg-\[\#f9fbf8\],
.dark .bg-\[\#f7fafa\],
.dark .bg-\[\#f9fafb\],
.dark .bg-gray-50 {
    background-color: #1e293b !important;
}

/* --- Text --- */
.dark .text-dark {
    color: #e2e8f0 !important;
}

.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark .text-gray-800 {
    color: #e2e8f0 !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-600 {
    color: #94a3b8 !important;
}

.dark .text-gray-500 {
    color: #94a3b8 !important;
}

.dark .text-gray-400 {
    color: #64748b !important;
}

/* --- Borders --- */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: #334155 !important;
}

.dark .border-gray-800 {
    border-color: #475569 !important;
}

.dark .divide-gray-100 > :not(:last-child) {
    border-color: #334155 !important;
}

/* --- Section backgrounds & gradients --- */
/* Override gradient backgrounds, but NOT text gradients, green buttons, or accent lines */
.dark .bg-gradient-to-b:not(.text-transparent):not(.text-white):not(.h-1),
.dark .bg-gradient-to-br:not(.text-transparent):not(.text-white):not(.h-1):not(.rounded-2xl) {
    background: #1e293b !important;
}

/* Schedy & Nidly hero */
.dark .hero-section {
    background: linear-gradient(to bottom right, #0f172a, #142028, #0f172a) !important;
    border-bottom: 1px solid #334155 !important;
}

/* Schedy logo: white pill behind it in dark mode */
.dark .hero-section img {
    filter: none !important;
    background: white;
    border-radius: 1rem;
    padding: 0.5rem 0.75rem;
}

/* Schedy video: white frame in dark mode */
.dark #video .relative.bg-white {
    background: white !important;
}

.dark #video video {
    filter: none !important;
}

/* Schedy secondary button */
.dark .hero-section .bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* Video section container */
.dark #video .bg-white {
    background-color: #1e293b !important;
}

/* Hero background overlay */
.dark #accueil > .absolute.inset-0 {
    background: #0f172a !important;
}

/* Hero blur circles */
.dark #accueil > .absolute.rounded-full {
    opacity: 0.15 !important;
}

/* Hero secondary button */
.dark #accueil .bg-white.border {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* All section backgrounds that use inline gradient classes */
.dark section > .absolute.inset-0[class*="bg-gradient"] {
    background: #0f172a !important;
}

/* Near-white section backgrounds */
.dark .from-\[\#f9fbf8\],
.dark .from-\[\#f5f5f5\] {
    --tw-gradient-from: #1e293b !important;
}

/* --- Header --- */
.dark .site-header {
    background: rgba(15, 23, 42, 0.85) !important;
}

.dark .site-header.header-scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3) !important;
}

.dark .nav-link {
    color: #94a3b8 !important;
}

.dark .nav-link:hover {
    color: #e2e8f0 !important;
}

.dark .nav-link.nav-active {
    color: #3d9a72 !important;
    background: rgba(61, 154, 114, 0.15) !important;
}

.dark .hamburger-line {
    background-color: #e2e8f0 !important;
}

.dark .lang-toggle-btn:hover {
    background-color: rgba(51, 65, 85, 0.5) !important;
}

/* --- Mobile menu --- */
.dark .mobile-menu-inner {
    background-color: rgba(30, 41, 59, 0.98) !important;
    border-color: #334155 !important;
}

.dark .mobile-nav-item a {
    color: #cbd5e1 !important;
}

.dark .mobile-nav-item a:hover {
    color: #f1f5f9 !important;
    background-color: rgba(51, 65, 85, 0.5) !important;
}

/* --- Shadows --- */
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
                0 4px 6px -4px rgba(0, 0, 0, 0.2) !important;
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
                0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
}

/* --- Partners section (rounded-2xl excluded from generic gradient override) --- */
.dark .rounded-2xl.bg-gradient-to-br:not(.w-16) {
    background: #1e293b !important;
}

/* --- Contact form --- */
.dark .floating-input {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark .floating-input:focus {
    background: #0f172a !important;
    border-color: #02a383 !important;
}

.dark .floating-label {
    color: #64748b !important;
}

.dark .floating-input:focus + .floating-label {
    color: #02a383 !important;
}

/* --- Schedy form inputs --- */
.dark input:not(.floating-input),
.dark textarea:not(.floating-input),
.dark select {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark input:not(.floating-input):focus,
.dark textarea:not(.floating-input):focus,
.dark select:focus {
    background-color: #0f172a !important;
}

/* --- Modals --- */
.dark .sehely-modal-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
}

.dark .sehely-modal-container {
    background: #1e293b !important;
}

.dark .sehely-modal-header {
    border-bottom-color: #334155 !important;
}

.dark .sehely-modal-close:hover {
    color: #e2e8f0 !important;
    background: #334155 !important;
}

.dark .sehely-modal-body .bg-gray-50 {
    background-color: #0f172a !important;
}

/* --- Scrollbar --- */
.dark ::-webkit-scrollbar-track {
    background: #0f172a !important;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569 !important;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b !important;
}

html.dark {
    scrollbar-color: #475569 #0f172a !important;
}

/* --- Loader: always white --- */
#sehely-loader,
.dark #sehely-loader {
    background: white !important;
    color: #1a1a1a !important;
}

/* --- Theme toggle button --- */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #374151;
    transform: scale(1.05);
}

.dark .theme-toggle-btn {
    color: #94a3b8;
}

.dark .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
}

.theme-toggle-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Sun/Moon icon visibility */
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
.dark .theme-icon-sun { display: block !important; }
.dark .theme-icon-moon { display: none !important; }

/* --- Projets page: sections & cards --- */

/* Bottom content panels (rounded-b-xl with gradient bg) */
.dark #MauriDoc > .rounded-b-xl,
.dark #nidly > .rounded-b-xl,
.dark #schedy > .rounded-b-xl {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-top: none !important;
}

/* Feature cards (bg-gradient-to-br with 10% opacity borders) */
.dark #portfolio .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #1e293b, rgba(61, 154, 114, 0.08)) !important;
    border-color: #475569 !important;
}

/* Description cards (bg-white border-gray-100) */
.dark #portfolio .bg-white.border-gray-100,
.dark #portfolio .bg-white.border {
    background-color: #0f172a !important;
    border-color: #475569 !important;
}

/* Feature card text */
.dark #portfolio .bg-gradient-to-br p {
    color: #94a3b8 !important;
}

/* Schedy page dark mode: lighter teal tints */
/* Tagline "Organisez le temps, Simplifiez l'attente" */
.dark span.bg-gradient-to-r.from-\[\#2F5F5F\].to-\[\#2F6F6F\].bg-clip-text {
    background: linear-gradient(to right, #5aadad, #5fbfbf) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
/* Section titles: Découvrez Schedy, Fonctionnalités clés, Demander un devis */
.dark span[class*="text-[#2F5F5F]"][data-i18n="schedy-video-title"],
.dark span[class*="text-[#2F5F5F]"][data-i18n="schedy-features-title"],
.dark span[class*="text-[#2F5F5F]"][data-i18n="schedy-quote-title"] {
    color: #5aadad !important;
}
/* Feature titles: Bornes automatiques, Système manuel, Tableau d'affichage */
.dark h3[data-i18n="schedy-page-feature1"] { color: #5aadad !important; }
.dark h3[data-i18n="schedy-page-feature2"] { color: #6fc0c0 !important; }
.dark h3[data-i18n="schedy-page-feature3"] { color: #5fbfbf !important; }

/* Schedy card in projets page: name + feature titles */
.dark #portfolio h4[data-i18n="schedy-title"] { color: #5aadad !important; }
.dark #portfolio h3[data-i18n="schedy-feature1"] { color: #5aadad !important; }
.dark #portfolio h3[data-i18n="schedy-feature2"] { color: #6fc0c0 !important; }
.dark #portfolio h3[data-i18n="schedy-feature3"] { color: #5fbfbf !important; }

/* Schedy buttons: mid-teal in dark mode */
.dark a[data-i18n="schedy-watch-video"],
.dark button[data-i18n="schedy-submit-quote"] {
    background: linear-gradient(to right, #458686, #479797) !important;
}
.dark a[data-i18n="schedy-get-quote"] {
    color: #458686 !important;
    border-color: #458686 !important;
}

/* Schedy & Nidly pages: hero border in dark mode */
.dark .hero-section + section {
    border-top: 1px solid #334155 !important;
}



/* ==========================================================
   5. RTL BASE
   ========================================================== */

/* General direction */
.rtl {
    text-align: right;
    font-family: 'Tajawal', 'Lato', sans-serif;
}

.rtl .font-serif {
    font-family: 'Amiri', 'Playfair Display', serif;
}

/* RTL spacing */
.rtl .space-x-3 > * + * {
    margin-left: 0;
    margin-right: 0.75rem;
}

.rtl .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .space-x-6 > * + * {
    margin-left: 0;
    margin-right: 1.5rem;
}

/* RTL margin adjustments */
.rtl .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

.rtl .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

/* RTL desktop nav */
.rtl header nav ul {
    direction: rtl;
}

/* RTL grid */
.rtl .grid {
    direction: rtl;
}

/* Feature card icons: cancel RTL margin shift on SVGs */
#portfolio .bg-gradient-to-br > .flex.items-center.justify-center svg {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* RTL images and overlays */
.rtl .absolute.inset-0 {
    right: 0;
    left: 0;
}

/* RTL forms */
.rtl input,
.rtl textarea {
    text-align: right;
}

/* RTL icons */
.rtl .flex.items-center:not(.justify-center) svg {
    margin-right: 0;
    margin-left: 0.5rem;
}


/* ==========================================================
   6. RTL COMPONENTS
   ========================================================== */

/* --- Header & Navigation --- */
/* RTL flex reversal handled natively by dir="rtl" + Tailwind gap-* */

/* Header bar immune to RTL layout shifts */
.rtl header > [dir="ltr"] svg {
    margin-left: 0;
    margin-right: 0;
}

/* RTL header nav */
.rtl .nav-link.nav-active {
    color: #3d9a72;
    background: rgba(61, 154, 114, 0.08);
}

/* --- Hero Section --- */
/* Centered layout — no RTL overrides needed */

/* --- Partners Section --- */

.rtl ul li.flex {
    flex-direction: row-reverse;
}

/* Carte "Devenir partenaire" : la liste utilise gap-* et non space-x-*,
   donc dir="rtl" inverse deja l'ordre. On neutralise le row-reverse ci-dessus
   pour eviter la double inversion (icone renvoyee a gauche en arabe). */
.rtl ul li.flex.partners-type-item {
    flex-direction: row;
}

.rtl ul li.flex span strong {
    margin-left: 0.25rem;
    margin-right: 0;
}

/* --- Services Section --- */

.rtl ul li.flex.items-start.space-x-3 {
    display: flex;
    flex-direction: row-reverse;
    text-align: right;
    width: 100%;
    margin-bottom: 1rem;
}

.rtl ul li.flex.items-start.space-x-3 > span:first-child {
    margin-left: 0.75rem;
    margin-right: 0;
}

.rtl ul li.flex.items-start.space-x-3 > span:last-child {
    text-align: right;
    width: 100%;
}

.rtl #secteurs .mt-auto a {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
}

.rtl #secteurs .mt-auto a svg {
    order: -1;
    margin-right: 0.5rem;
    margin-left: 0;
    transform: rotate(180deg);
}

.rtl .inline-flex.items-center {
    flex-direction: row-reverse;
}

/* Bouton "Devenir partenaire" : dir="rtl" inverse deja l'ordre des enfants,
   le row-reverse ci-dessus renvoyait la fleche a DROITE du texte. On le neutralise
   et on remet la marge du bon cote (entre le texte et la fleche). */
.rtl .inline-flex.items-center.partners-cta {
    flex-direction: row;
}

.rtl .partners-cta svg {
    margin-left: 0;
    margin-right: 0.25rem;
}

.rtl .inline-flex.items-center svg {
    transform: rotate(180deg);
}

/* Bouton "Discutons de votre projet" sur mobile.
   En 16px le libelle + la fleche demandent 201px alors que le bouton n'en offre
   que 199 a 375px : le texte passait sur 2 lignes (3 lignes a 320px). On resserre
   le padding horizontal et le corps de texte sous 768px, et on interdit la coupure. */
@media (max-width: 767px) {
    /* Carte "Devenir partenaire" : titre + sous-titre centres sur mobile.
       Pas de md:text-left en HTML, qui forcerait un alignement a gauche en arabe :
       au-dela de 768px on laisse le sens de lecture (dir) decider. */
    .partners-card-head {
        text-align: center;
    }

    .partners-cta {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 0.9375rem;
    }

    .partners-cta span {
        white-space: nowrap;
    }

    .partners-cta svg {
        width: 1.125rem;
        height: 1.125rem;
        flex-shrink: 0;
    }

    /* Encart "Ensemble pour la Mauritanie" : meme habillage que la citation
       "Solutions accessibles a tous", mais contraint par la largeur de la carte.
       On resserre pour garder la pastille sur une seule ligne des 360px. */
    .partners-quote {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 374px) {
    .partners-cta {
        font-size: 0.875rem;
    }
}

/* --- Contact Section --- */

.rtl .absolute.bottom-4.right-4 {
    right: auto;
    left: 1rem;
}

.rtl [data-i18n="contact-info-title"] {
    text-align: right;
    margin-bottom: 1rem;
}

/* --- Thank You Modals RTL --- */

.rtl div.flex.items-start,
html[dir="rtl"] div.flex.items-start,
body.rtl div.flex.items-start {
    flex-direction: row-reverse !important;
}

.rtl div.flex.items-start.text-left,
html[dir="rtl"] div.flex.items-start.text-left {
    flex-direction: row-reverse !important;
}

/* --- Buttons & Links --- */

.rtl .mt-auto a {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* --- Footer RTL --- */

.rtl .social-follow {
    text-align: right;
    direction: rtl;
}

.rtl .social-follow h4 {
    text-align: right;
}

.rtl .social-links {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rtl .border-t.border-gray-800.mt-12.pt-8 {
    text-align: right;
}

.rtl .border-t.border-gray-800.mt-12.pt-8 p {
    text-align: right;
}

.rtl .flex.space-x-4.rtl\:space-x-reverse.rtl\:justify-end {
    justify-content: flex-start;
}

.rtl .footer-links {
    direction: rtl;
    text-align: right;
}

.rtl footer .flex.space-x-4 {
    display: flex;
    flex-direction: row-reverse;
}

.rtl footer .flex.space-x-4 > * {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl footer .flex.space-x-4 > *:first-child {
    margin-right: 0;
}

/* --- "Notre Histoire" quote --- */

.rtl .our-story-quote {
    right: -1.5rem !important;
    left: auto !important;
}

/* Hero desktop: logo au-dessus du texte, tout centré (FR + AR) */
@media (min-width: 768px) {
    .hero-section {
        padding-top: 5rem !important;
    }
    .hero-section .grid {
        grid-template-columns: 1fr !important;
        max-width: 700px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        gap: 0 !important;
    }
    .hero-section .grid > div:first-child {
        order: 1 !important;
        justify-content: center !important;
        margin-bottom: 1rem !important;
    }
    .hero-section .grid > div:first-child img {
        max-width: 650px !important;
    }
    .hero-section .grid > div:last-child {
        order: 2 !important;
        text-align: center !important;
    }
    .hero-section .grid > div:last-child h1,
    .hero-section .grid > div:last-child h1 .hero-title-wrapper {
        text-align: center !important;
    }
    .hero-section .grid > div:last-child p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }
    .hero-section .grid .hero-buttons {
        justify-content: center !important;
    }
}


/* ==========================================================
   7a. GLOW BUTTON
   ========================================================== */

.glow-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
    background: #69b255;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease,
                background 0.3s ease,
                color 0.3s ease;
}

.glow-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 4px 15px rgba(105, 178, 85, 0.3);
}

.glow-btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}


/* ==========================================================
   7b. AURORA HERO (Projets page)
   ========================================================== */

@keyframes aurora-animate {
    0% { background-position: 50% 50%, 50% 50%; }
    100% { background-position: 350% 50%, 200% 50%; }
}

.aurora-hero {
    --aurora-green: #3d9a72;
    --aurora-teal: #02a383;
    --aurora-dark-teal: #1f8a83;
    --aurora-light: #a3d199;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
    padding-top: 7rem;
    padding-bottom: 4rem;
    overflow: hidden;
    background-color: #ffffff;
}

.dark .aurora-hero {
    background-color: #0f172a;
}

.aurora-hero-bg {
    position: absolute;
    inset: -10px;
    pointer-events: none;
    will-change: transform;
    opacity: 0.2;
    filter: blur(18px);
    background-image:
        repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%),
        repeating-linear-gradient(100deg, var(--aurora-green) 10%, #e8f5e9 15%, var(--aurora-teal) 20%, #e0f2f1 25%, var(--aurora-dark-teal) 30%);
    background-size: 300% 100%, 200% 100%;
    background-position: 50% 50%, 50% 50%;
}

.aurora-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%),
        repeating-linear-gradient(100deg, var(--aurora-green) 10%, #e8f5e9 15%, var(--aurora-teal) 20%, #e0f2f1 25%, var(--aurora-dark-teal) 30%);
    background-size: 200% 100%, 100% 100%;
    background-attachment: fixed;
    mix-blend-mode: difference;
    animation: aurora-animate 15s linear infinite;
}

.dark .aurora-hero-bg {
    filter: blur(18px);
    opacity: 0.15;
    background-image:
        repeating-linear-gradient(100deg, #0f172a 0%, #0f172a 7%, transparent 10%, transparent 12%, #0f172a 16%),
        repeating-linear-gradient(100deg, var(--aurora-green) 10%, #e8f5e9 15%, var(--aurora-teal) 20%, #e0f2f1 25%, var(--aurora-dark-teal) 30%);
}

.dark .aurora-hero-bg::after {
    background-image:
        repeating-linear-gradient(100deg, #0f172a 0%, #0f172a 7%, transparent 10%, transparent 12%, #0f172a 16%),
        repeating-linear-gradient(100deg, var(--aurora-green) 10%, #e8f5e9 15%, var(--aurora-teal) 20%, #e0f2f1 25%, var(--aurora-dark-teal) 30%);
}

/* Radial mask: aurora fades from top-right */
.aurora-hero-bg-masked {
    mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
}

.aurora-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 1.5rem;
}

.aurora-hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.aurora-hero-content p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.dark .aurora-hero-content p {
    color: #a0aec0;
}

.aurora-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3d9a72, #02a383);
    color: #fff;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(61,154,114,0.3);
    transition: all 0.3s ease;
}

.aurora-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61,154,114,0.4);
}

.aurora-hero-cta svg {
    transition: transform 0.3s ease;
}

.aurora-hero-cta:hover svg {
    transform: translateX(3px);
}

[dir="rtl"] .aurora-hero-cta:hover svg {
    transform: translateX(-3px) scaleX(-1);
}

[dir="rtl"] .aurora-hero-cta svg {
    transform: scaleX(-1);
}

/* Tagline pill */
.aurora-hero-tag {
    display: inline-block;
    padding: 0.375rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3d9a72;
    background: rgba(61,154,114,0.08);
    border: 1px solid rgba(61,154,114,0.15);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.dark .aurora-hero-tag {
    color: #a3d199;
    background: rgba(163,209,153,0.08);
    border-color: rgba(163,209,153,0.15);
}

/* Project cards preview */
.aurora-hero-projects {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 680px;
}

.aurora-hero-project {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.aurora-hero-project:hover {
    background: #ffffff;
    border-color: rgba(61,154,114,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.dark .aurora-hero-project {
    background: rgba(255,255,255,0.85);
    border-color: rgba(0,0,0,0.06);
}

.dark .aurora-hero-project:hover {
    background: #ffffff;
    border-color: rgba(61,154,114,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.aurora-hero-project-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.aurora-hero-project-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.aurora-hero-project-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.dark .aurora-hero-project-name {
    color: #1a1a1a;
}

.aurora-hero-project-tagline {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

.dark .aurora-hero-project-tagline {
    color: #6b7280;
}

.aurora-hero-project-arrow {
    width: 18px;
    height: 18px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.aurora-hero-project:hover .aurora-hero-project-arrow {
    color: #3d9a72;
    transform: translateX(3px);
}

[dir="rtl"] .aurora-hero-project-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .aurora-hero-project:hover .aurora-hero-project-arrow {
    transform: scaleX(-1) translateX(3px);
}



/* ==========================================================
   8. VALUE CARDS (3D tilt + glow effect)
   ========================================================== */

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.value-card {
    perspective: 1000px;
}

.value-card-inner {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8faf7 50%, var(--accent-light) 100%);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.value-card-inner:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 1px var(--accent-light);
}

.value-card-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.value-card-inner:hover .value-card-pattern {
    opacity: 1;
}

.value-card-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.value-card-inner:hover .value-card-glow {
    opacity: 1;
}

.value-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value-icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.value-card-inner:hover .value-icon-ring {
    transform: scale(1.1) rotate(-3deg);
}

.value-divider {
    width: 2.5rem;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 0.75rem 0 1rem;
    transition: width 0.4s ease;
}

.value-card-inner:hover .value-divider {
    width: 5rem;
}

/* Dark mode */
.dark .value-card-inner {
    background: linear-gradient(145deg, #1e1e1e 0%, #252525 50%, rgba(61,154,114,0.08) 100%);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.dark .value-card-inner:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}

.dark .value-card-pattern {
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
}

.dark .value-card-inner h3 {
    color: #f0f0f0;
}

.dark .value-card-inner p {
    color: #a0a0a0;
}


/* ==========================================================
   9. RESPONSIVE MOBILE
   ========================================================== */

/* Loader mobile */
@media (max-width: 767px) {
    .loader-text {
        font-size: 2.5rem;
    }
}

/* Hero section mobile adjustments */
@media (max-width: 767px) {
    .hero-section {
        padding-top: 4.5rem !important;  /* 72px — flush with header */
    }

    /* Keep Schedy logo same size in FR and AR */
    .hero-section img {
        max-width: 320px !important;
    }

    /* Reduce gap between logo and text */
    .hero-section .grid {
        gap: 0 !important;
    }
    .hero-section .grid > div:first-child {
        margin-bottom: 1rem !important;
    }

    .hero-section h1 {
        margin-bottom: 1rem !important;
    }

    .hero-section h1 + p {
        margin-bottom: 1.25rem !important;
    }

}

/* Footer mobile centering */
@media (max-width: 767px) {
    /* Schedy hero buttons */
    .hero-buttons a {
        flex: 1 1 auto !important;
        min-width: 120px !important;
        max-width: 200px !important;
        white-space: nowrap !important;
    }

    /* Very small screens */
    @media (max-width: 480px) {
        .hero-buttons {
            flex-direction: column !important;
            align-items: center !important;
            gap: 0.75rem !important;
        }

        .hero-buttons a {
            width: 100% !important;
            max-width: 280px !important;
            text-align: center !important;
        }
    }

    /* Footer layout */
    footer .col-span-1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    footer .social-follow {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    footer .social-links {
        justify-content: center;
    }

    footer p[data-i18n="footer-about-desc"] {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* RTL footer mobile centering */
    .rtl footer .col-span-1,
    .rtl footer .social-follow,
    .rtl footer p[data-i18n="footer-about-desc"] {
        text-align: center;
    }

    .rtl footer .social-links {
        justify-content: center;
    }
}

/* Mobile menu styles are in components.js */

/* Main mobile layout adjustments (FR + AR shared) */
@media (max-width: 767px) {
    /* Sections and containers */
    section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .container {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Sector image containers */
    .flex.flex-col.md\:flex-row.h-full .md\:w-2\/5 {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        height: 280px !important;
        max-height: 280px !important;
        overflow: hidden !important;
    }

    /* Sector images */
    .flex.flex-col.md\:flex-row.h-full .md\:w-2\/5 img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        max-width: 100% !important;
        display: block !important;
        filter: brightness(1.05) contrast(1.05) !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        transform: translateZ(0) !important;
    }

    /* Sector image overlay */
    .flex.flex-col.md\:flex-row.h-full .md\:w-2\/5 .absolute.inset-0.bg-\[\#e0f5f5\]\/10 {
        opacity: 0.5 !important;
        background-color: rgba(224, 245, 245, 0.05) !important;
    }

    /* Partner images */
    .relative.bg-white.rounded-xl.overflow-hidden.shadow-lg img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        object-position: center !important;
        max-width: 100% !important;
        display: block !important;
        filter: brightness(1.05) contrast(1.05) !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        transform: translateZ(0) !important;
    }

    /* Partner image container */
    .relative.bg-white.rounded-xl.overflow-hidden.shadow-lg {
        height: auto !important;
        min-height: 300px !important;
        max-height: none !important;
    }

    /* Sector text content */
    .flex.flex-col.md\:flex-row.h-full .md\:w-3\/5 {
        width: 100% !important;
        text-align: center !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Sector titles and icons centering */
    .flex.items-center.space-x-3.mb-4 {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* "Discover" links centering */
    .mt-auto a {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
    }

}


/* Aurora hero mobile */
@media (max-width: 767px) {
    .aurora-hero {
        min-height: auto;
        padding-top: 5.5rem;
        padding-bottom: 2.5rem;
    }
    .aurora-hero-content h1 {
        font-size: 2.25rem;
    }
    .aurora-hero-content p {
        font-size: 1.05rem;
    }
    .aurora-hero-projects {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 2rem;
    }
    .aurora-hero-project {
        padding: 0.75rem 1rem;
    }
}

/* Value cards mobile */
@media (max-width: 767px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        max-width: 400px;
    }

    .value-card-inner {
        padding: 2rem 1.5rem;
    }

    .value-icon-ring {
        width: 64px;
        height: 64px;
    }

    .value-icon-ring svg {
        width: 2rem;
        height: 2rem;
    }
}

/* Value cards tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .value-card-inner {
        padding: 2rem 1.25rem;
    }
}


/* ==========================================================
   9. RESPONSIVE MOBILE RTL
   ========================================================== */

@media (max-width: 767px) {
    /* RTL overflow fix */
    .rtl {
        margin-right: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
    }

    .rtl section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .rtl .container {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .rtl [data-i18n="schedy-tagline"] {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    /* RTL layout */
    .rtl .flex.flex-col.md\:flex-row {
        flex-direction: column;
    }

    .rtl .order-1.md\:order-1 { order: 1; }
    .rtl .order-2.md\:order-2 { order: 2; }
    .rtl .order-1.md\:order-2 { order: 1; }
    .rtl .order-2.md\:order-1 { order: 2; }

    .rtl .flex.flex-col.md\:flex-row.h-full {
        flex-direction: column;
    }

    .rtl .flex.flex-col.md\:flex-row.justify-between.items-center {
        text-align: center;
    }

    /* RTL sector titles */
    .rtl .flex.items-center.space-x-3.rtl\:space-x-reverse.mb-4 {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* RTL headings centering (excluding i18n elements) */
    .rtl h1:not([data-i18n]):not([data-i18n-html]),
    .rtl h2:not([data-i18n]):not([data-i18n-html]),
    .rtl h3:not([data-i18n]):not([data-i18n-html]),
    .rtl h4:not([data-i18n]):not([data-i18n-html]) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .rtl p:not([data-i18n]):not([data-i18n-html]) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* RTL grid */
    .rtl .grid {
        text-align: center !important;
    }

    /* RTL form */
    .rtl form {
        text-align: center !important;
    }

    .rtl form input, .rtl form textarea, .rtl form select {
        text-align: right !important;
        direction: rtl !important;
    }

    .rtl form label {
        text-align: right !important;
        display: block !important;
        margin-bottom: 1rem !important;
    }

    /* RTL mobile menu */
    .rtl #mobile-menu ul { text-align: center; }
    .rtl #mobile-menu li a { text-align: center; }

    /* RTL footer */
    .rtl footer { text-align: center !important; }

    .rtl footer .col-span-1 {
        text-align: center;
        align-items: center;
    }

    .rtl footer .social-follow {
        text-align: center;
        align-items: center;
        direction: rtl;
    }

    .rtl footer .social-follow h4 {
        text-align: center;
        width: 100%;
    }

    .rtl footer p[data-i18n="footer-about-desc"] {
        text-align: center;
    }

    .rtl footer .social-links {
        justify-content: center;
    }

    .rtl footer .grid > div {
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

    /* RTL images */
    .rtl .grid.md\:grid-cols-3.gap-8.mb-10 img {
        filter: brightness(1.05) contrast(1.05) !important;
        max-width: 100% !important;
    }

    .rtl img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        transform: translateZ(0) !important;
    }

    .rtl .bg-gradient-to-br:not(.hero-section) img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        object-position: center !important;
        max-height: none !important;
    }

    .rtl [data-i18n="emploi-title"] ~ p + .mt-auto,
    .rtl [data-i18n="education-title"] ~ p + .mt-auto,
    .rtl [data-i18n="services-title"] ~ p + .mt-auto,
    .rtl [data-i18n="health-title"] ~ p + .mt-auto {
        margin-top: 1rem !important;
    }
}


/* ==========================================================
   11. MISSING TAILWIND UTILITIES
   (Classes used in HTML but absent from pre-compiled tailwind-output.css)
   ========================================================== */

/* Base (no breakpoint) */
.h-56 { height: 14rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }

/* sm (min-width: 640px) */
@media (min-width: 640px) {
    .sm\:py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* md (min-width: 768px) */
@media (min-width: 768px) {
    .md\:h-\[380px\] { height: 380px; }
    .md\:h-20 { height: 5rem; }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
    .md\:p-5 { padding: 1.25rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
}

/* lg (min-width: 1024px) */
@media (min-width: 1024px) {
    .lg\:p-6 { padding: 1.5rem; }
}

/* --- Schedy & Nidly pages: section separation in dark mode --- */
/* The generic .dark overrides flatten every section to #1e293b (and their
   :not() chains outrank .dark .hero-section), so hero, intro, features and
   contact all end up identical. Alternate the two dark tones instead —
   #main-content raises specificity above the generic rules. */
.dark .page-product #main-content > .hero-section {
    background: linear-gradient(to bottom right, #0f172a, #142028, #0f172a) !important;
}

.dark .page-product #main-content > section.bg-\[\#f7fafa\] {
    background: #0f172a !important;
    border-top: 1px solid #334155;
}

.dark .page-product #main-content > section:not(.hero-section):not(.bg-\[\#f7fafa\]) {
    background: #1e293b !important;
}

.dark .page-product #main-content > section:last-of-type {
    border-top: 1px solid #334155;
}

/* Panels sitting on #1e293b need one step of lift to stay readable */
.dark .page-product #main-content > section:not(.hero-section) .bg-white {
    background: #253449 !important;
}

/* Schedy: la vidéo de démo a un fond blanc — son cadre reste blanc en mode sombre.
   Doit surclasser la règle .bg-white ci-dessus (2 id + 4 classes). */
.dark .page-product #main-content > section#video .relative.bg-white {
    background: #ffffff !important;
}

.dark .page-product #main-content > section#video video {
    filter: none !important;
    background: #ffffff !important;
}
