/* ==========================================================================
   TLDMIR — CSS commun
   Tailwind reste chargé en CDN pour le moment. Ce fichier contient uniquement
   les règles globales, composants légers et comportements non couverts par les
   classes utilitaires.
   ========================================================================== */

/* Base
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero backgrounds
   ========================================================================== */
.hero-bg,
.hero-bg-reportage {
    background-color: #0f172a;
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
}

.hero-bg {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.80), rgba(15, 23, 42, 0.90)),
        url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070&auto=format&fit=crop');
}

.hero-bg-reportage {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.80), rgba(15, 23, 42, 0.90)),
        url('/assets/REPORTAGE-01.jpg');
}

@media (min-width: 768px) {
    .hero-bg {
        background-attachment: fixed;
    }
}

/* Motion / reveal
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Cards / hover helpers
   ========================================================================== */
.video-card:hover .play-icon {
    transform: scale(1.1);
    background-color: #06b6d4;
    color: #ffffff;
    border-color: #06b6d4;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:translate-y-0 {
    transform: translateY(0);
}

.badge {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.soft-shadow {
    box-shadow: 0 25px 60px -35px rgba(6, 182, 212, 0.35);
}

.star-rating {
    color: #fbbf24;
}

.review-card {
    transition: transform 0.2s ease-in-out;
}

.review-card:hover {
    transform: translateY(-5px);
}

/* Marquees / slides
   ========================================================================== */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes slideFade {
    0%,
    30%,
    100% {
        opacity: 0;
    }

    5%,
    25% {
        opacity: 1;
    }
}

.animate-marquee,
.marquee {
    animation: marquee 25s linear infinite;
}

.marquee {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    will-change: transform;
}

.animate-slide {
    opacity: 0;
    animation: slideFade 16s infinite;
    animation-fill-mode: both;
}

.section-cv {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

/* Lite YouTube
   ========================================================================== */
lite-youtube {
    position: relative;
    display: block;
    contain: content;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: #000000;
    background-position: center;
    background-size: cover;
    border-radius: 1rem;
}

lite-youtube::before {
    display: block;
    padding-bottom: 56.25%;
    content: '';
}

lite-youtube::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35));
    content: '';
}

lite-youtube > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

lite-youtube .lty-playbtn {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    width: 68px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

lite-youtube .lty-playbtn::before {
    display: block;
    margin-left: 4px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.90);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    content: '';
}


/* Theme switcher
   ========================================================================== */
:root {
    color-scheme: dark;
    --tldmir-page-bg: #0f172a;
    --tldmir-surface: rgba(30, 41, 59, 0.92);
    --tldmir-surface-solid: #1e293b;
    --tldmir-border: rgba(255, 255, 255, 0.10);
    --tldmir-text: #cbd5e1;
    --tldmir-text-strong: #ffffff;
    --tldmir-text-muted: #94a3b8;
    --tldmir-elevated-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] {
    color-scheme: light;
    --tldmir-page-bg: #f8fafc;
    --tldmir-surface: rgba(255, 255, 255, 0.94);
    --tldmir-surface-solid: #ffffff;
    --tldmir-border: #e2e8f0;
    --tldmir-text: #334155;
    --tldmir-text-strong: #0f172a;
    --tldmir-text-muted: #64748b;
    --tldmir-elevated-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

.theme-switcher {
    position: relative;
    flex: 0 0 auto;
}

.theme-select-trigger {
    display: inline-flex;
    min-width: 124px;
    height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.theme-select-trigger:hover,
.theme-switcher.is-open .theme-select-trigger {
    border-color: rgba(6, 182, 212, 0.65);
    background: rgba(30, 41, 59, 0.96);
    color: #ffffff;
}

.theme-select-trigger:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.85);
    outline-offset: 3px;
}

.theme-select-icon,
.theme-option-icon {
    display: inline-flex;
    width: 1rem;
    align-items: center;
    justify-content: center;
    color: #22d3ee;
}

.theme-select-chevron {
    font-size: 0.70rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.theme-switcher.is-open .theme-select-chevron {
    transform: rotate(180deg);
}

.theme-select-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 70;
    display: grid;
    min-width: 170px;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.theme-select-menu[hidden],
.theme-select-menu.hidden {
    display: none !important;
}

.theme-switcher.is-open .theme-select-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.theme-select-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.70rem 0.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.theme-select-option span:nth-child(2) {
    flex: 1 1 auto;
}

.theme-select-option .theme-option-check {
    flex: 0 0 auto;
}

.theme-select-option:hover,
.theme-select-option.is-selected {
    background: rgba(6, 182, 212, 0.14);
    color: #ffffff;
}

.theme-option-check {
    color: #22d3ee;
    font-size: 0.75rem;
    opacity: 0;
}

.theme-select-option.is-selected .theme-option-check {
    opacity: 1;
}

@media (max-width: 420px) {
    .theme-select-trigger {
        min-width: 44px;
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .theme-select-label,
    .theme-select-chevron {
        display: none;
    }
}

/* Light mode — overrides Tailwind CDN utilities without requiring a build step.
   ========================================================================== */
html[data-theme="light"] body {
    background: var(--tldmir-page-bg) !important;
    color: var(--tldmir-text) !important;
}

html[data-theme="light"] #navbar {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] #navbar.bg-dark-900 {
    background: rgba(255, 255, 255, 0.98) !important;
}

html[data-theme="light"] #mobile-menu,
html[data-theme="light"] #navbar .bg-dark-800,
html[data-theme="light"] #navbar .bg-dark-700 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .theme-select-trigger {
    background: rgba(255, 255, 255, 0.92);
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .theme-select-trigger:hover,
html[data-theme="light"] .theme-switcher.is-open .theme-select-trigger {
    background: #ffffff;
    border-color: rgba(6, 182, 212, 0.72);
    color: #0f172a;
}

html[data-theme="light"] .theme-select-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .theme-select-option {
    color: #334155;
}

html[data-theme="light"] .theme-select-option:hover,
html[data-theme="light"] .theme-select-option.is-selected {
    background: #ecfeff;
    color: #0f172a;
}

html[data-theme="light"] .bg-dark-950,
html[data-theme="light"] .bg-dark-900 {
    background-color: #f8fafc !important;
}

html[data-theme="light"] .bg-dark-900\/95,
html[data-theme="light"] .bg-dark-900\/80,
html[data-theme="light"] .bg-dark-900\/60 {
    background-color: rgba(248, 250, 252, 0.94) !important;
}

html[data-theme="light"] .bg-dark-800,
html[data-theme="light"] .bg-dark-800\/80,
html[data-theme="light"] .bg-dark-800\/60,
html[data-theme="light"] .bg-dark-700 {
    background-color: #ffffff !important;
}

html[data-theme="light"] .bg-slate-700,
html[data-theme="light"] .bg-slate-700\/20 {
    background-color: #f1f5f9 !important;
}

html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-white\/10,
html[data-theme="light"] .bg-white\/15,
html[data-theme="light"] .glass,
html[data-theme="light"] .badge {
    background-color: rgba(255, 255, 255, 0.90) !important;
}

html[data-theme="light"] .border-dark-800,
html[data-theme="light"] .border-dark-700,
html[data-theme="light"] .border-dark-700\/50,
html[data-theme="light"] .border-white\/5,
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/15,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .glass,
html[data-theme="light"] .badge {
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .text-dark-900 {
    color: #0f172a !important;
}

html[data-theme="light"] .text-slate-200,
html[data-theme="light"] .text-slate-300,
html[data-theme="light"] .text-slate-700 {
    color: #334155 !important;
}

html[data-theme="light"] .text-slate-400,
html[data-theme="light"] .text-slate-500,
html[data-theme="light"] .text-gray-500,
html[data-theme="light"] .text-gray-700 {
    color: #64748b !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="light"] .shadow-lg,
html[data-theme="light"] .shadow-2xl,
html[data-theme="light"] .soft-shadow {
    box-shadow: var(--tldmir-elevated-shadow) !important;
}

html[data-theme="light"] .hover\:bg-white\/5:hover,
html[data-theme="light"] .hover\:bg-white\/10:hover,
html[data-theme="light"] .hover\:bg-dark-700:hover,
html[data-theme="light"] .hover\:bg-dark-800:hover {
    background-color: #f1f5f9 !important;
}

html[data-theme="light"] .hover\:text-white:hover,
html[data-theme="light"] .hover\:text-slate-900:hover {
    color: #0f172a !important;
}

html[data-theme="light"] .bg-brand-600.text-white,
html[data-theme="light"] .bg-brand-500.text-white,
html[data-theme="light"] .hover\:bg-brand-500.text-white:hover,
html[data-theme="light"] a.bg-brand-600,
html[data-theme="light"] button.bg-brand-600,
html[data-theme="light"] .bg-red-500.text-white {
    color: #ffffff !important;
}

html[data-theme="light"] .bg-brand-400.text-slate-900,
html[data-theme="light"] .bg-brand-500.text-white,
html[data-theme="light"] .bg-brand-600.text-white {
    border-color: transparent !important;
}

html[data-theme="light"] .bg-brand-900\/30,
html[data-theme="light"] .bg-brand-600\/10,
html[data-theme="light"] .bg-brand-600\/25 {
    background-color: #ecfeff !important;
}

html[data-theme="light"] .hero-bg,
html[data-theme="light"] .hero-bg-reportage {
    background-color: #0f172a;
}

html[data-theme="light"] .hero-bg .text-white,
html[data-theme="light"] .hero-bg-reportage .text-white {
    color: #ffffff !important;
}

html[data-theme="light"] .hero-bg .text-slate-300,
html[data-theme="light"] .hero-bg-reportage .text-slate-300 {
    color: #cbd5e1 !important;
}

html[data-theme="light"] .hero-bg .text-slate-400,
html[data-theme="light"] .hero-bg-reportage .text-slate-400,
html[data-theme="light"] .hero-bg .text-brand-100,
html[data-theme="light"] .hero-bg-reportage .text-brand-100 {
    color: #e2e8f0 !important;
}

html[data-theme="light"] .hero-bg .bg-dark-800\/80,
html[data-theme="light"] .hero-bg-reportage .bg-dark-800\/80 {
    background-color: rgba(15, 23, 42, 0.80) !important;
}

html[data-theme="light"] .hero-bg .bg-white\/5,
html[data-theme="light"] .hero-bg .hover\:bg-white\/10:hover,
html[data-theme="light"] .hero-bg-reportage .bg-white\/5,
html[data-theme="light"] .hero-bg-reportage .hover\:bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="light"] .hero-bg .border-white\/10,
html[data-theme="light"] .hero-bg-reportage .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="light"] .hero-bg .to-dark-900,
html[data-theme="light"] .hero-bg-reportage .to-dark-900 {
    --tw-gradient-to: #f8fafc var(--tw-gradient-to-position) !important;
}


/* Light mode — hero readability guard
   ==========================================================================
   Certaines pages de cas client utilisent un hero image + overlay sombre sans
   classe hero-bg. En light mode, les règles globales rendaient ces textes foncés
   alors qu'ils restent posés sur une image sombre. Cette classe force le
   contraste uniquement dans ces zones.
*/
.tldmir-hero-contrast {
    color: #ffffff;
}

html[data-theme="light"] .tldmir-hero-contrast {
    color: #ffffff !important;
}

html[data-theme="light"] .tldmir-hero-contrast h1,
html[data-theme="light"] .tldmir-hero-contrast h2,
html[data-theme="light"] .tldmir-hero-contrast h3,
html[data-theme="light"] .tldmir-hero-contrast .text-white {
    color: #ffffff !important;
}

html[data-theme="light"] .tldmir-hero-contrast .text-slate-200,
html[data-theme="light"] .tldmir-hero-contrast .text-slate-300,
html[data-theme="light"] .tldmir-hero-contrast .text-slate-400,
html[data-theme="light"] .tldmir-hero-contrast .text-brand-100 {
    color: #e2e8f0 !important;
}

html[data-theme="light"] .tldmir-hero-contrast .text-brand-300,
html[data-theme="light"] .tldmir-hero-contrast .text-brand-400,
html[data-theme="light"] .tldmir-hero-contrast .text-brand-500 {
    color: #22d3ee !important;
}

html[data-theme="light"] .tldmir-hero-contrast .text-dark-900,
html[data-theme="light"] .tldmir-hero-contrast .bg-brand-500.text-dark-900,
html[data-theme="light"] .tldmir-hero-contrast .bg-brand-400.text-dark-900 {
    color: #0f172a !important;
}

html[data-theme="light"] .tldmir-hero-contrast .bg-dark-800\/80,
html[data-theme="light"] .tldmir-hero-contrast .bg-dark-900\/60 {
    background-color: rgba(15, 23, 42, 0.80) !important;
}

html[data-theme="light"] .tldmir-hero-contrast .bg-white\/5,
html[data-theme="light"] .tldmir-hero-contrast .bg-white\/10,
html[data-theme="light"] .tldmir-hero-contrast .hover\:bg-white\/10:hover,
html[data-theme="light"] .tldmir-hero-contrast .badge,
html[data-theme="light"] .tldmir-hero-contrast .glass {
    background-color: rgba(15, 23, 42, 0.55) !important;
}

html[data-theme="light"] .tldmir-hero-contrast .border-white\/10,
html[data-theme="light"] .tldmir-hero-contrast .border-white\/15,
html[data-theme="light"] .tldmir-hero-contrast .badge,
html[data-theme="light"] .tldmir-hero-contrast .glass {
    border-color: rgba(255, 255, 255, 0.18) !important;
}


/* Light mode — dark visual contexts hardening v1.6
   ========================================================================== 
   Les zones posées sur image sombre ou overlay sombre ne doivent pas hériter
   des overrides light globaux. Sinon certains boutons deviennent blancs avec
   un texte blanc, ou certains pictos sur image deviennent invisibles.
*/
html[data-theme="light"] .tldmir-hero-contrast .text-white\/90,
html[data-theme="light"] .tldmir-hero-contrast .text-white\/80,
html[data-theme="light"] .tldmir-hero-contrast .text-white\/70 {
    color: rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .tldmir-hero-contrast .bg-white\/5,
html[data-theme="light"] .tldmir-hero-contrast .bg-white\/10,
html[data-theme="light"] .tldmir-hero-contrast .bg-white\/15,
html[data-theme="light"] .tldmir-hero-contrast .hover\:bg-white\/5:hover,
html[data-theme="light"] .tldmir-hero-contrast .hover\:bg-white\/10:hover,
html[data-theme="light"] .tldmir-hero-contrast .hover\:bg-white\/15:hover {
    background-color: rgba(15, 23, 42, 0.58) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .tldmir-hero-contrast a.border-white\/10,
html[data-theme="light"] .tldmir-hero-contrast a.border-white\/15,
html[data-theme="light"] .tldmir-hero-contrast button.border-white\/10,
html[data-theme="light"] .tldmir-hero-contrast button.border-white\/15 {
    color: #ffffff !important;
}

html[data-theme="light"] .tldmir-hero-contrast a.border-white\/10:hover,
html[data-theme="light"] .tldmir-hero-contrast a.border-white\/15:hover,
html[data-theme="light"] .tldmir-hero-contrast button.border-white\/10:hover,
html[data-theme="light"] .tldmir-hero-contrast button.border-white\/15:hover {
    background-color: rgba(15, 23, 42, 0.72) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .tldmir-hero-contrast .bg-brand-500.text-dark-900,
html[data-theme="light"] .tldmir-hero-contrast .bg-brand-400.text-dark-900,
html[data-theme="light"] .tldmir-hero-contrast .bg-brand-500 .text-dark-900,
html[data-theme="light"] .tldmir-hero-contrast .bg-brand-400 .text-dark-900 {
    color: #0f172a !important;
}

/* Pictos posés sur les images de cas clients : ils doivent rester visibles
   en light mode, sans transformer le bouton en pastille blanche pâle. */
.tldmir-media-overlay-icons {
    color: rgba(255, 255, 255, 0.92);
}

.tldmir-media-overlay-chip {
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .tldmir-media-overlay-icons,
html[data-theme="light"] .tldmir-media-overlay-icons .text-white\/90 {
    color: rgba(255, 255, 255, 0.96) !important;
}

html[data-theme="light"] .tldmir-media-overlay-chip,
html[data-theme="light"] .tldmir-media-overlay-chip.bg-brand-600\/25 {
    background-color: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(34, 211, 238, 0.72) !important;
    color: #22d3ee !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.24) !important;
}

html[data-theme="light"] .tldmir-media-overlay-chip i {
    color: #22d3ee !important;
}
