/* ================================================================
   Styles communs au site public Sirali (vitrine) — partagés par
   toutes les pages sous resources/views/site/. Les styles propres à
   une seule page restent dans le <style> de cette page.
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--body-bg);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

:root {
    --primary: #0f3b5e;
    --primary-dark: #0a2a44;
    --primary-light: #1a5276;
    --secondary: #dc2626;
    --secondary-dark: #b91c1c;
    --accent: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --gray-light: #ecf0f1;
    --gray: #7f8c8d;
    --dark: #2c3e50;
    --white: #ffffff;
    --body-bg: #f5f7fb;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ========== THÈMES (data-theme, sélecteur nav) — mêmes 5 palettes que l'admin
   (resources/views/admin/partials/theme.blade.php), mécanique identique : localStorage
   'tgSiteTheme'/'tgSiteDarkMode', script anti-flash dans chaque <head>. ========== */
:root[data-theme="orange"] {
    --primary: #9a3412; --primary-dark: #7c2d12; --primary-light: #c2410c;
    --secondary: #ea580c; --secondary-dark: #c2410c;
}
:root[data-theme="green"] {
    --primary: #0f766e; --primary-dark: #0b5c55; --primary-light: #14958a;
    --secondary: #10b981; --secondary-dark: #059669;
}
:root[data-theme="red"] {
    --primary: #7f1d1d; --primary-dark: #601515; --primary-light: #9f2929;
    --secondary: #ef4444; --secondary-dark: #dc2626;
}
:root[data-theme="indigo"] {
    --primary: #3730a3; --primary-dark: #2e2a87; --primary-light: #4338ca;
    --secondary: #6366f1; --secondary-dark: #4f46e5;
}

/* ========== MODE SOMBRE ========== */
html.dark-mode {
    --body-bg: #0b1120;
    --card-bg: #111827;
    --card-border: #1f2937;
    --gray-light: #16202f;
    --dark: #e2e8f0;
    --gray: #94a3b8;
    --white: #111827;
}
html.dark-mode body { color: var(--dark); }
html.dark-mode .header,
html.dark-mode .hero-search-card,
html.dark-mode .stats-card,
html.dark-mode .news-card,
html.dark-mode .svc-card,
html.dark-mode .account-box,
html.dark-mode .contact-form,
html.dark-mode .why-card:hover,
html.dark-mode .route-card,
html.dark-mode .tracking-box,
html.dark-mode .help-panel,
html.dark-mode .search-card,
html.dark-mode .feature-strip,
html.dark-mode .trip-toggle button,
html.dark-mode .dest-scroll-next,
html.dark-mode .about-image-badge,
html.dark-mode .value-card,
html.dark-mode .contact-info,
html.dark-mode .tracking-card,
html.dark-mode .colis-card,
html.dark-mode .filters-card,
html.dark-mode .ticket-card,
html.dark-mode .result-card,
html.dark-mode .no-results,
html.dark-mode .timeline-dot,
html.dark-mode .sort-select {
    background: var(--card-bg) !important;
    color: var(--dark) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
html.dark-mode .form-control:focus,
html.dark-mode .filter-select:focus,
html.dark-mode .filter-input:focus {
    background: var(--gray-light) !important;
    color: var(--dark) !important;
}
html.dark-mode .values-section,
html.dark-mode .map-section {
    background: var(--body-bg) !important;
}
html.dark-mode .feature-strip { border-bottom-color: var(--card-border) !important; }
html.dark-mode .trip-toggle button.is-active { background: var(--primary-dark) !important; color: white !important; }
html.dark-mode .feature-strip-icon { background: var(--gray-light) !important; }
html.dark-mode .logo-text,
html.dark-mode .nav-link,
html.dark-mode .rc-city,
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3, html.dark-mode h4, html.dark-mode h5 {
    color: var(--dark);
}
html.dark-mode .btn-account { background: var(--card-bg); color: var(--dark); border-color: var(--card-border); }
html.dark-mode .form-control,
html.dark-mode .form-select,
html.dark-mode .hsc-field select,
html.dark-mode .hsc-field input,
html.dark-mode .account-box input,
html.dark-mode .contact-form input,
html.dark-mode .contact-form textarea,
html.dark-mode .help-panel-form input,
html.dark-mode .help-panel-form textarea {
    background: var(--gray-light) !important;
    color: var(--dark) !important;
    border-color: var(--card-border) !important;
}
html.dark-mode .form-control::placeholder,
html.dark-mode .account-box input::placeholder,
html.dark-mode .contact-form textarea::placeholder { color: var(--gray); }
html.dark-mode .swal2-popup { background: var(--card-bg) !important; color: var(--dark) !important; }
html.dark-mode .swal2-title, html.dark-mode .swal2-html-container { color: var(--dark) !important; }
* { transition: background-color .3s, color .3s, border-color .3s; }
@media (prefers-reduced-motion: reduce) { * { transition: none; } }

/* ========== SÉLECTEUR DE THÈME / MODE SOMBRE (bandeau du haut) ========== */
.theme-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.12); border: none; color: white; cursor: pointer;
    font-size: .78rem; transition: background .2s;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,.22); }
.theme-picker { position: relative; display: inline-flex; }
.theme-picker-menu {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 2000;
    background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 8px; display: flex; gap: 8px; align-items: center;
}
/* Le sélecteur de classe ci-dessus a la même spécificité que la règle par défaut du
   navigateur [hidden]{display:none} et charge après elle : sans ce correctif, l'attribut
   hidden n'a plus aucun effet et le menu reste visible en permanence. */
.theme-picker-menu[hidden] { display: none; }
.theme-picker-swatches { display: flex; gap: 8px; }
.theme-picker-menu .theme-picker-swatches button {
    width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.theme-picker-menu .theme-picker-swatches button.is-active { border-color: var(--dark); }

/* ========== TRANSITIONS DE PAGE (site-transitions.js) ========== */
.tg-progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    z-index: 99999; opacity: 0; pointer-events: none;
    box-shadow: 0 0 8px rgba(220, 38, 38, .5);
}
body.tg-page-leaving {
    opacity: 0;
    transform: translateY(6px);
}
body {
    transition: opacity .16s ease, transform .16s ease;
}
@media (prefers-reduced-motion: reduce) {
    body { transition: none; }
    .tg-progress-bar { transition: none !important; }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 60px 0;
}

/* ========== BOUTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
}
.btn-outline-light:hover {
    background: white;
    color: var(--primary);
}
.btn-block {
    width: 100%;
}
.btn[disabled],
.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== DÉCOR SANS PHOTO ==========
   Le site n'utilise pas de banque de photos (celle du template de départ était hors
   sujet : portraits, paysages, placeholders gris...). À la place : dégradés de marque,
   grille de points, "blobs" flottants et le motif "route en pointillés + bus" repris de
   trip-banner (compagnie-trajets) comme visuel de substitution cohérent partout. */
.deco-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.4px, transparent 1.4px);
    background-size: 22px 22px;
    opacity: 0.6;
    pointer-events: none;
}
.deco-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    animation: decoFloat 12s ease-in-out infinite;
}
.deco-blob.blob-1 { width: 260px; height: 260px; top: -110px; left: -80px; }
.deco-blob.blob-2 { width: 200px; height: 200px; bottom: -100px; right: -40px; animation-direction: reverse; }
@keyframes decoFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(14px, -14px) scale(1.04); }
}

.deco-route { display: flex; align-items: center; gap: 0; }
.deco-route .deco-dot { width: 11px; height: 11px; border-radius: 50%; background: white; flex-shrink: 0; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2); }
.deco-route .deco-dot.end { background: var(--secondary); }
.deco-route .deco-line {
    flex: 1; height: 3px;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 50%, transparent 50%);
    background-size: 14px 3px; background-repeat: repeat-x;
    animation: decoDash 1s linear infinite;
}
@keyframes decoDash { from { background-position: 0 0; } to { background-position: -28px 0; } }
.deco-route .deco-bus { color: white; font-size: 1.3rem; margin: 0 14px; flex-shrink: 0; }

/* ========== BANDEAU DE PAGE (pages secondaires) ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 64px 0 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header h1 {
    font-size: 2.5rem;
    letter-spacing: -0.3px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}
.page-header p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.page-header .container { position: relative; z-index: 2; }
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.4px, transparent 1.4px);
    background-size: 22px 22px;
    opacity: 0.6;
    pointer-events: none;
}

/* ========== FOOTER ========== */
.footer {
    background: #1a1f2e;
    color: #94a3b8;
    padding: 56px 0 24px;
    margin-top: auto;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}
.footer-brand-col { display: flex; flex-direction: column; }
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-brand img {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.footer-brand span {
    color: white;
    font-weight: 800;
    font-size: 1.05rem;
}
.footer-copyright {
    font-size: 0.78rem;
    margin: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 0.9fr;
    gap: 32px;
    margin-bottom: 8px;
}
.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
}
.footer a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer a:hover {
    color: var(--secondary);
}
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    color: #94a3b8;
}
.footer-socials a:hover {
    background: var(--secondary);
    color: white;
}

@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 36px;
    }
}
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand, .footer-socials {
        justify-content: center;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* ========== HERO CAROUSEL (accueil) ========== */
.hero-carousel { position: relative; }
.hero-carousel .swiper { width: 100%; }
.hero-slide {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
}
.hero-slide--1 { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.hero-slide--2 { background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); }
.hero-slide--3 { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 140%); }
.hero-slide .container { position: relative; z-index: 2; width: 100%; }
.hero-slide-inner {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    min-height: 550px;
    align-content: center;
    gap: 8px;
}
.hero-slide-inner.has-visual {
    grid-template-columns: 1.1fr 0.9fr;
    justify-items: start;
    text-align: left;
    gap: 40px;
}
.hero-slide-text { max-width: 640px; }
.hero-slide-inner.has-visual .hero-slide-text { max-width: 100%; }
.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(5px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-slide h1 {
    font-size: 2.7rem;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.hero-slide h1 span { color: #ffd9a8; display: block; }
.hero-slide p.hero-lead {
    font-size: 1.05rem;
    opacity: 0.92;
    margin-bottom: 28px;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    max-width: 540px;
}
.hero-slide-inner.has-visual p.hero-lead { max-width: 100%; }
.hero-slide .deco-route { margin: 10px 0 30px; max-width: 420px; }
.hero-slide-inner.has-visual .deco-route { max-width: 100%; }
.hero-stats { display: flex; gap: 40px; margin-top: 10px; }
.hero-stat h3 { font-size: 1.8rem; margin-bottom: 4px; }
.hero-stat p { font-size: 0.75rem; opacity: 0.8; margin: 0; }

/* Visuel "carte flottante" (utilisé pour la vraie photo de bus, sans prétendre à un lieu précis) */
.hero-visual-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
    border: 6px solid rgba(255, 255, 255, 0.15);
}
.hero-visual-card img { display: block; width: 100%; height: 340px; object-fit: cover; }
.hero-visual-caption {
    display: flex; align-items: center; gap: 8px;
    margin-top: 14px; font-size: 0.8rem; opacity: 0.85;
}

/* Pastilles / flèches Swiper aux couleurs de la marque */
.hero-carousel .swiper-pagination { bottom: 26px !important; }
.hero-carousel .swiper-pagination-bullet {
    width: 9px; height: 9px; background: rgba(255, 255, 255, 0.5); opacity: 1;
    transition: all 0.25s;
}
.hero-carousel .swiper-pagination-bullet-active { background: var(--secondary); width: 26px; border-radius: 5px; }
.hero-carousel .swiper-button-prev,
.hero-carousel .swiper-button-next {
    width: 44px; height: 44px; background: rgba(255, 255, 255, 0.12); border-radius: 50%;
    backdrop-filter: blur(4px); transition: background 0.25s;
}
.hero-carousel .swiper-button-prev:hover,
.hero-carousel .swiper-button-next:hover { background: rgba(255, 255, 255, 0.25); }
.hero-carousel .swiper-button-prev::after,
.hero-carousel .swiper-button-next::after { font-size: 1rem; color: white; font-weight: 700; }
@media (max-width: 992px) {
    .hero-carousel .swiper-button-prev, .hero-carousel .swiper-button-next { display: none; }
}

@media (max-width: 768px) {
    .hero-slide { min-height: 560px; }
    .hero-slide h1 { font-size: 2rem; }
    .hero-slide-inner.has-visual {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .hero-slide-inner.has-visual .hero-slide-text { max-width: 540px; }
    .hero-visual-card { transform: none; max-width: 420px; margin: 0 auto; }
    .hero-stats { justify-content: center; flex-wrap: wrap; gap: 20px; }
}
@media (max-width: 480px) {
    .hero-slide h1 { font-size: 1.6rem; }
    .hero-slide p.hero-lead { font-size: 0.85rem; }
}
