/* ==========================================================================
   STYLE SHEET : KOH SAMUI REAL ESTATE CORTEX (THE RAW CANVAS)
   ========================================================================== */

:root {
    --bg-primary: #070708;
    --bg-secondary: #0f1013;
    --accent-gold: #f5a623;
    --accent-sunset: linear-gradient(135deg, #ffca85 0%, #ff9d64 100%);
    --text-primary: #ffffff;
    --text-secondary: #8c8c93;
    --border-light: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-blur: blur(20px);
}

/* Reset & Base configuration */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Base Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    /* Image de fond par défaut si non éditée dans le dashboard */
    background-image: url('assets/hero.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7,7,8,0.2) 0%, rgba(7,7,8,0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.ltr-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.5px;
    animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glow Button (Unlock Financial Audit) */
.btn-glow {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 16px 36px;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.1);
}

.btn-glow:hover {
    background: rgba(245, 166, 35, 0.05);
    box-shadow: 0 0 30px rgba(245, 166, 35, 0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. AUDIT SECTION / CALCULATOR
   ========================================================================== */
.audit-section {
    max-width: 900px;
    margin: -40px auto 100px auto;
    padding: 0 24px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Toggle Switch Styling */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    padding: 14px 28px;
    border-radius: 50px;
}

.toggle-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.toggle-label.active {
    color: var(--text-primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.15);
}

input:checked + .slider:before {
    transform: translateX(28px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Glassmorphism Panel */
.glass-panel {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.simulator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.simulator-header h2 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.live-data {
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.data-value {
    font-size: 24px;
    font-weight: 600;
}

.data-value.highlight {
    color: #ffd085;
    text-shadow: 0 0 20px rgba(255, 208, 133, 0.3);
}

/* Premium Range Input */
.range-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.range-container label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s;
}

/* Custom Thumb styling to match render */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffd085;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 208, 133, 0.8);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.range-markers {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Grid architectural blueprint / Drone view */
.media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
}

.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    aspect-ratio: 4/3;
    background: var(--bg-secondary);
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.85;
}

.media-card:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.card-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(7, 7, 8, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.05);
    z-index: 5;
}

/* Eco-Premium UI */
.eco-premium-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    opacity: 0.4;
    transition: opacity 0.3s;
}

.eco-premium-wrapper.unlocked {
    opacity: 1;
}

.eco-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 500;
}

.eco-switch input:disabled + .slider {
    cursor: not-allowed;
    background-color: rgba(255,255,255,0.05);
}

/* Split-Screen Neurological Bridge */
.split-screen-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.split-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.split-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.split-view-reality img {
    filter: grayscale(20%) contrast(1.1);
}

.split-view-vision {
    width: 50%; /* Initial split at 50% */
    border-right: 2px solid var(--accent-gold);
}

.vision-label {
    background: rgba(245, 166, 35, 0.15);
    border-color: rgba(245, 166, 35, 0.4);
    color: #fff;
}

.split-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    margin-left: -20px;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.split-handle-line {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.5);
}

.split-handle-button {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    gap: 2px;
}

/* Partners Section */
.partners-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.partners-header {
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.partners-header h2 {
    font-size: 28px;
    font-weight: 500;
    margin: 16px 0;
}

.partners-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 60px;
}

.partner-logo {
    width: 180px;
    color: var(--text-secondary);
    transition: color 0.4s, transform 0.4s;
    cursor: pointer;
}

.partner-logo:hover {
    color: #fff;
    transform: scale(1.05);
}

/* ==========================================================================
   3. NARRATIVE & CONTACT CLOSING SECTION
   ========================================================================== */
.closing-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #000000 100%);
    border-top: 1px solid var(--border-light);
}

.closing-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

.narrative-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.tag-confidential {
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    border: 1px solid rgba(245, 166, 35, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}

.narrative-col h2 {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -1px;
}

.narrative-text {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--accent-gold);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.btn-text .arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.btn-text:hover .arrow {
    transform: translateX(4px);
}

/* Formulaire UHNWI style */
.dark-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 18px 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.input-group input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.btn-submit {
    background: var(--accent-sunset);
    color: #070708;
    border: none;
    border-radius: 8px;
    padding: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 10px 25px rgba(255, 157, 100, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 157, 100, 0.4);
}

/* ==========================================================================
   4. INTERACTIVE MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 550px;
    width: 100%;
    position: relative;
    padding: 48px;
    animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 500;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.highlight-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 18px !important;
    color: var(--accent-gold) !important;
    margin-top: 24px;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 900px) {
    .closing-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .glass-panel {
        padding: 24px;
    }
    .simulator-header h2 {
        font-size: 18px;
    }
    .data-value {
        font-size: 20px;
    }
    .closing-section {
        padding: 60px 0;
    }
    .narrative-col h2 {
        font-size: 26px;
    }
}