 :root {
    --bg-base: #232121;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --text-main: #f5f5f5;
     --text-muted: #cbd5e1;
     --text-soft: #94a3b8;
     --font-heading: "Manrope", "Segoe UI", sans-serif;
     --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --brand-1: #124335;
    --brand-2: #1f6a55;
    --brand-1-hover: #0f3a2e;
    --brand-2-hover: #175845;
    --accent-gold: #d9b473;
    --ring-brand: rgba(31, 111, 95, 0.22);
    --ring-soft: rgba(31, 111, 95, 0.12);
    --danger-1: #8f1f1f;
    --danger-2: #b32626;
    --danger-1-hover: #7a1a1a;
    --danger-2-hover: #991f1f;
    --ring-danger: rgba(179, 38, 38, 0.24);
    --badge-border: rgba(217, 180, 115, 0.22);
    --bg-pattern-1: radial-gradient(circle at 20% 20%, rgba(255,153,0,.055) 1.2px, transparent 1.2px);
    --bg-pattern-2: radial-gradient(circle at 70% 40%, rgba(0,180,90,.045) 1.2px, transparent 1.2px);
    --bg-pattern-3: linear-gradient(135deg, transparent 48%, rgba(255,255,255,.018) 49%, rgba(255,255,255,.018) 51%, transparent 52%);
    --bg-glow-1: radial-gradient(circle at 15% 30%, rgba(138, 104, 63, 0.24), transparent 42%);
    --bg-glow-2: radial-gradient(circle at 80% 70%, rgba(0,170,80,.18), transparent 44%);
    --bg-orb-1: rgba(217, 119, 6, 0.11);
    --bg-orb-2: rgba(31, 111, 95, 0.09);
    --bg-orb-3: rgba(255, 255, 255, 0.045);
 }

html[data-theme="light"] {
    --bg-base: #fff;
    --bg-panel: rgba(255, 255, 255, 0.88);
    --text-main: #0f172a;
    --text-muted: #334155;
    --text-soft: #64748b;
    --brand-1: #0f766e;
    --brand-2: #0f5f59;
    --brand-1-hover: #0d5f59;
    --brand-2-hover: #0d4f4a;
    --accent-gold: #b7791f;
    --ring-brand: rgba(15, 118, 110, 0.2);
    --ring-soft: rgba(15, 118, 110, 0.12);
    --badge-border: rgba(15, 23, 42, 0.14);
    --bg-pattern-1: radial-gradient(circle at 20% 20%, rgba(217,119,6,.09) 1.2px, transparent 1.2px);
    --bg-pattern-2: radial-gradient(circle at 70% 40%, rgba(15,118,110,.075) 1.2px, transparent 1.2px);
    --bg-pattern-3: linear-gradient(135deg, transparent 48%, rgba(15,23,42,.035) 49%, rgba(15,23,42,.035) 51%, transparent 52%);
    --bg-glow-1: radial-gradient(circle at 15% 30%, rgba(217,119,6,.15), transparent 40%);
    --bg-glow-2: radial-gradient(circle at 80% 70%, rgba(15,118,110,.11), transparent 42%);
    --bg-orb-1: rgba(217, 119, 6, 0.09);
    --bg-orb-2: rgba(15, 118, 110, 0.085);
    --bg-orb-3: rgba(15, 23, 42, 0.045);
}

body {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.055), transparent 28%),
        linear-gradient(315deg, rgba(31, 111, 95, 0.055), transparent 24%),
        var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.01em;
    min-height: 100vh;
    padding-top: 90px;
}
body::before{
    content:"";
    position:fixed;
    inset:-10%;
    pointer-events:none;

    background-image:
        var(--bg-pattern-1),
        var(--bg-pattern-2),
        var(--bg-pattern-3),
        radial-gradient(circle at 20% 20%, var(--bg-orb-1), transparent 24%),
        radial-gradient(circle at 80% 25%, var(--bg-orb-2), transparent 26%),
        radial-gradient(circle at 50% 80%, var(--bg-orb-3), transparent 22%);

    background-size:
        140px 140px,
        220px 220px,
        110px 110px,
        42% 42%,
        48% 48%,
        36% 36%;

    background-position: center;
    opacity: 0.97;
    animation: patternMove 32s ease-in-out infinite alternate;

    z-index:-2;
}
@keyframes patternMove{

    0%{
        transform:translate3d(0,0,0) scale(1);
    }

    50%{
        transform:translate3d(-2.2%, -1.4%, 0) scale(1.025);
    }

    100%{
        transform:translate3d(2.2%, 1.4%, 0) scale(1.035);
    }

}
body::after{

    content:"";

    position:fixed;

    inset:-20%;
    pointer-events:none;

    background:
        var(--bg-glow-1),
        var(--bg-glow-2);

    filter:blur(98px);
    opacity: 0.94;
    animation: glowDrift 26s ease-in-out infinite alternate;

    z-index:-1;

}

@keyframes glowDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(2.8%, -2.2%, 0) scale(1.06);
    }
}
h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

html[data-theme="light"] body {
    background: linear-gradient(135deg, #fcfcfa 0%, #f6efe7 100%);
}

.page-hero {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
    margin-bottom: 2rem;
}

html[data-theme="light"] .page-hero,
html[data-theme="light"] .section-card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .review-card,
html[data-theme="light"] .hero-panel,
html[data-theme="light"] .directory-panel,
html[data-theme="light"] .service-card,
html[data-theme="light"] .hero-stat,
html[data-theme="light"] .empty-card {
    background: var(--bg-panel) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .hero-copy,
html[data-theme="light"] .section-copy,
html[data-theme="light"] .section-subcopy,
html[data-theme="light"] .sidebar-copy,
html[data-theme="light"] .text-white-50,
html[data-theme="light"] .text-secondary {
    color: #475569 !important;
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .modal-title,
html[data-theme="light"] .reservation-copy,
html[data-theme="light"] .market-shell h1,
html[data-theme="light"] .market-shell h2,
html[data-theme="light"] .market-shell h3,
html[data-theme="light"] .market-shell h4,
html[data-theme="light"] .market-shell h5,
html[data-theme="light"] .market-shell h6,
html[data-theme="light"] .market-shell p,
html[data-theme="light"] .market-shell strong,
html[data-theme="light"] .market-shell span,
html[data-theme="light"] .market-shell label,
html[data-theme="light"] .market-shell a {
    color: #0f172a;
}

html[data-theme="light"] .market-shell .btn-dark,
html[data-theme="light"] .market-shell .btn-outline-dark {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

html[data-theme="light"] .market-shell .btn-outline-dark.rounded-circle {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .page-badge,
html[data-theme="light"] .section-badge,
html[data-theme="light"] .filter-badge,
html[data-theme="light"] .chip,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .filter-pill-accent,
html[data-theme="light"] .category-pill {
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    background: rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .ad-banner.orange,
html[data-theme="light"] .cta-banner.orange {
    background: linear-gradient(135deg, #d97706 0%, #9a3412 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] .btn-light{
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] .btn-soft {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] .modal-input,
html[data-theme="light"] .custom-select {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .form-control::placeholder,
html[data-theme="light"] .modal-input::placeholder,
html[data-theme="light"] .input-dark::placeholder {
    color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .input-dark {
    color: rgba(15, 23, 42, 0.55);
    background: rgba(20, 5, 5, 0.92);
}

.section-card,
.product-card,
.review-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.text-secondary,
.text-white-50,
.hero-copy,
.section-copy,
.section-subcopy,
.sidebar-copy {
    color: var(--text-muted) !important;
}

.section-card {
    padding: 1.6rem;
    margin-bottom: 1.75rem;
}

.btn-custom {
    /* background: linear-gradient(135deg, #2e5e7b 0%, #1f3744 100%); */
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.3rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-custom:hover {
    background: linear-gradient(135deg, var(--brand-1-hover) 0%, var(--brand-2-hover) 100%);
    transform: translateY(-1px);
    color: #fff;
}

/* Primary button enhancements (gradient CTA) */
.btn-custom,
.btn-primary {
    box-shadow: 0 8px 20px rgba(16, 24, 32, 0.6);
    transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
    border: none;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    color: #fff;
}

.btn-custom:hover,
.btn-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--brand-1-hover) 0%, var(--brand-2-hover) 100%);
    color: #fff;
}

.btn-custom:focus,
.btn-primary:focus {
    box-shadow: 0 0 0 4px var(--ring-brand);
    outline: none;
}

/* Secondary translucent button for dark UI */
.btn-secoundaire {
    /* background: linear-gradient(135deg, rgba(36, 68, 74, 0.95) 0%, #1f3744 100%); */
    background: linear-gradient(135deg, #19362d 0%, #185240 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
}

.btn-secoundaire:hover {
    background: linear-gradient(135deg, #c97d27 0%, #dc7e36 100%);
}

.btn-secoundaire:focus {
    box-shadow: 0 0 0 4px var(--ring-soft);
    outline: none;
}

.btn-annuler {
    background: linear-gradient(135deg, var(--danger-1) 0%, var(--danger-2) 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-annuler:hover {
    background: linear-gradient(135deg, var(--danger-1-hover) 0%, var(--danger-2-hover) 100%);
    color: #fff;
    transform: translateY(-1px);
}

.btn-annuler:focus {
    box-shadow: 0 0 0 4px var(--ring-danger);
    outline: none;
}

/* Ensure icons inside buttons inherit text color */
.btn .bi {
    color: inherit;
}

/* Override Bootstrap dark variants inside the market UI to match our theme */
.market-shell .btn-dark,
.market-shell .btn-outline-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.market-shell .btn-outline-dark {
    background: transparent !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

/* Small circular outline controls (arrows) — keep transparent but white icon */
.market-shell .btn-outline-dark.rounded-circle {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.page-badge {
    background: linear-gradient(135deg, rgba(22, 70, 56, 0.96) 0%, rgba(18, 56, 45, 0.96) 100%);
    border: 1px solid var(--badge-border);
    color: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.product-card {
    padding: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.25);
}

.btn-view {
    flex: 1;
    color: #fff;
    
    /* background: linear-gradient(135deg, #2e5e7b 0%, #1f3744 100%); */
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    border: none;
}

.btn-brand,
.btn-soft,
.btn-outline-soft {
    border-radius: 999px;
    padding: .92rem 1.3rem;
    font-weight: 800;
}

.btn-brand {
    color: #fff;
    border: none;
    /* background: linear-gradient(135deg, #2e5e7b 0%, #1f3744 100%); */
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    box-shadow: 0 14px 28px rgba(154, 52, 18, 0.2);
}

.btn-brand:hover, .open-details:hover {
    color: #fff;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}


html[data-theme="light"] .btn-brand {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}
html[data-theme="light"] .btn-view {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

html[data-theme="light"] .btn-secoundaire  {
    background: linear-gradient(135deg, #c97d27 0%, #dc7e36 100%);
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}
html[data-theme="light"] .btn-brand:hover, html[data-theme="light"] .btn-view:hover, html[data-theme="light"] .btn-secoundaire:hover {
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    color: #fff !important;
}

html[data-theme="light"] .btn-brand:focus {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.24);
    outline: none;
}

.modal-input {
    background: rgba(255, 255, 255, 0.06);
    color: #eef2ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modal-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.ck-editor__editable {
    min-height: 250px;
    background: #212529 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

.ck-toolbar {
    background: #343a40 !important;
    border-color: #495057 !important;
}

.ck-button,
.ck-icon {
    color: #f8f9fa !important;
}

.modal-title, .reservation-copy {
    color: white;
}

/* .input-dark,
.form-control,
.form-select.input-dark {
    background: rgba(255, 255, 255, 0.06);
    color: #eef2ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
} */

 .custom-select:focus {
    color: rgba(255, 255, 255, 0.5);
}

/* .form-select.input-dark option {
    background: rgba(255, 255, 255, 0.06);
    color: #eef2ff;
}  */

.input-dark::placeholder {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: white;
    padding: .9rem 1rem;
    min-height: 54px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
    min-height: 120px;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: rgba(31, 111, 95, 0.6);
    box-shadow: 0 0 0 4px rgba(31, 111, 95, 0.16);
    background: rgba(255, 255, 255, 0.11);
    color: white;
}

.custom-select {
   background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.custom-select option {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.form-select {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.form-select option {
    background: #212529;
    color: #fff;
}

::placeholder {
    color: var(--text-soft) !important;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}