﻿:root {
    --bg-color: #dfded7; /* slightly greyish beige matching mockup */
    --text-color: #111;
    --primary-color: #e58a36; /* orange matching mockup */
    --mouse-x: 50%;
    --mouse-y: 50%;
    --lamp-x: 50%;
    --lamp-y: 0%;
}
.dark {
    --bg-color: #1a1a1a;
    --text-color: #f5f5f5;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
    font-family: 'Unbounded', sans-serif;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor */
}

html {
    overflow-x: hidden;
}

.top-meta {
    color: var(--text-color);
}

.site-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

body.is-loading .site-shell {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: radial-gradient(circle at 50% 38%, rgba(255, 214, 170, 0.95), var(--bg-color) 52%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

body.site-ready .intro-splash {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-logo {
    width: clamp(110px, 18vw, 190px);
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(229, 138, 54, 0.35));
    animation: introLogoIn 1.2s ease both;
}

.intro-brand {
    font-family: 'Zen Dots';
    color: #d87427;
    letter-spacing: 0em;
    font-size: clamp(1.8rem, 5vw, 3.4rem);
    animation: introLogoIn 1.2s ease both;
}

.legal-logo {
    font-family: 'Zen Dots', cursive;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.logo-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.logo-particle {
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    width: var(--size, 26px);
    height: auto;
    opacity: var(--opacity, 0.08);
    transform: translate3d(0, 0, 0) rotate(var(--rotation, 0deg));
    filter: sepia(1) saturate(1.5) hue-rotate(-10deg) brightness(1.02);
    animation: logoDrift var(--duration, 16s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
}

.dark .logo-particle {
    opacity: 0.06;
    filter: brightness(0.92) contrast(1.1);
}

@keyframes introLogoIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.85);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoDrift {
    0% {
        transform: translate3d(calc(var(--dx, 8px) * -1), calc(var(--dy, 14px) * -1), 0) rotate(calc(var(--rotation, 0deg) - 4deg));
    }
    100% {
        transform: translate3d(var(--dx, 8px), var(--dy, 14px), 0) rotate(calc(var(--rotation, 0deg) + 4deg));
    }
}

/* Custom Orange Dot Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    box-shadow: 0 0 10px rgba(237, 137, 54, 0.8);
    transition: width 0.1s, height 0.1s;
}

/* 3D Glass Effect for Logo */
h1.logo-text {
    font-family: 'Zen Dots', cursive;
    color: transparent;
    background: linear-gradient(135deg, #ef8f2c 0%, #d9681d 100%);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 
        1px 1px 2px rgba(255,255,255,0.4),
        -1px -1px 2px rgba(0,0,0,0.05),
        1px 1px 3px rgba(0,0,0,0.1);
    font-size: clamp(4rem, 15vw, 10rem); /* slightly larger to match mockup presence */
    position: relative;
    /* Subtle 3D transform */
    transform: perspective(1000px) rotateX(2deg);
    /* Make the base letter spacing tighter like in mockup */
    letter-spacing: -0.01em;
}

.dark h1.logo-text {
    text-shadow: 
        1px 1px 2px rgba(255,255,255,0.1),
        -1px -1px 2px rgba(0,0,0,0.5),
        0 8px 16px rgba(0,0,0,0.4);
}

@media (max-width: 767px), (pointer: coarse) {
    h1.logo-text {
        text-shadow: none !important;
    }
}


.lamp-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: top center;
    z-index: 50; /* Super high so we can click anywhere on it */
    cursor: none;
    transition: transform 0.1s ease-out;
}

.lamp-container .lamp-image {
    pointer-events: auto; /* Ensured it grabs click */
}

.lamp-light {
    display: none;
    pointer-events: none !important;
}

/* Realistic Light Beam from Lamp to Mouse */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* Conic/Polygon gradient to simulate a beam from top-center to mouse */
    background: polygon(50% 0%, var(--mouse-x) var(--mouse-y), calc(var(--mouse-x) + 20px) calc(var(--mouse-y) + 20px), calc(var(--mouse-x) - 20px) calc(var(--mouse-y) + 20px));
    mix-blend-mode: overlay;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Using a clip-path + gradient for a better beam */
.light-beam {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: soft-light;
    /* More pronounced spotlight */
    background: radial-gradient(circle 500px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 240, 180, 0.8) 0%, rgba(255, 230, 150, 0.4) 20%, transparent 80%);
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* The actual beam */
.beam-cone {
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: top center;
    width: 200vw;
    height: 150vh;
    transform: translateX(-50%);
    pointer-events: none;
    /* Softly blended conic gradient from top to simulate a real flashlight beam */
    background: conic-gradient(from 180deg at 50% 0%, transparent 130deg, rgba(255, 240, 150, 0.3) 165deg, rgba(255, 230, 100, 0.7) 180deg, rgba(255, 240, 150, 0.3) 195deg, transparent 230deg);
    /* mask to fade it out towards the bottom */
    -webkit-mask-image: radial-gradient(circle at 50% 0%, black 10%, transparent 70%);
    mask-image: radial-gradient(circle at 50% 0%, black 10%, transparent 70%);
    z-index: 1;
    mix-blend-mode: overlay;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.dark .light-beam,
.dark .beam-cone {
    opacity: 0;
}

/* --- Bouton Glassmorphism --- */
.glass-button-wrap {
    position: relative;
    display: inline-block;
    padding: 0;
    /* Un fond légèrement plus opaque pour garantir la lisibilité du bouton */
    background: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08), /* Ombre externe très douce */
        inset 0 1px 2px rgba(255, 255, 255, 0.6); /* Fin reflet sur le bord supérieur */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* Reflets de surface adoucis */
.glass-button-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    z-index: 1;
}

.glass-button-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent, transparent);
    z-index: 1;
}

/* Mode Sombre du Bouton */
.dark .glass-button-wrap {
    background: rgba(17, 25, 40, 0.4); /* Une teinte très légèrement bleutée/grise */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.dark .glass-button-wrap::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.dark .glass-button-wrap::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent, transparent);
}

/* Effets de survol (Hover) */
.glass-button-wrap:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

.dark .glass-button-wrap:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* Structure du Bouton */
.glass-button {
    all: unset;
    position: relative;
    display: inline-block;
    border-radius: 9999px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 2; /* S'assure que le texte reste au-dessus des reflets */
}

.glass-button-text {
    display: block;
    padding: 1.1rem 2.5rem; 
    color: #111; 
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.dark .glass-button-text {
    color: #f5f5f5;
}

.glass-button-shadow {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    z-index: -1;
    pointer-events: none;
}

/* --- Formulaire Modal Glassmorphism --- */
.form-glass {
    width: 100%;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 20px 45px rgba(15, 23, 42, 0.16),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    color: #0f172a;
}

.form-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.form-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent, transparent);
}

/* Mode Sombre du Formulaire */
.dark .form-glass {
    background: rgba(17, 25, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
}

.dark .form-glass::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.dark .form-glass::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent, transparent);
}

/* Custom Fieldset Pill inputs to match the design */
fieldset.pill-fieldset {
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 9999px;
    padding: 0 1.25rem;
    margin: 0;
    transition: border-color 0.3s, background-color 0.3s;
    background-color: rgba(255, 255, 255, 0.56);
}

fieldset.pill-fieldset:focus-within {
    border-color: rgba(229, 138, 54, 0.6);
    background-color: rgba(255, 255, 255, 0.85);
}

legend.pill-legend {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(51, 65, 85, 0.88);
    padding: 0 0.5rem;
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
}

.pill-input {
    all: unset;
    flex: 1;
    width: 100%;
    padding: 0.4rem 0 0.8rem 0;
    color: #0f172a;
    font-size: 0.95rem;
}

.pill-input::placeholder {
    color: rgba(71, 85, 105, 0.8);
}

.field-icon {
    color: rgba(51, 65, 85, 0.7);
    transition: color 0.2s ease;
}

fieldset.pill-fieldset:focus-within .field-icon {
    color: rgba(229, 138, 54, 0.95);
}

.dark fieldset.pill-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(255, 255, 255, 0.08);
}

.dark fieldset.pill-fieldset:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.12);
}

.dark legend.pill-legend {
    color: rgba(255, 255, 255, 0.75);
}

.dark .pill-input {
    color: #f8fafc;
}

.dark .pill-input::placeholder {
    color: rgba(226, 232, 240, 0.62);
}

.dark .field-icon {
    color: rgba(226, 232, 240, 0.7);
}

/* Theme Submit Button */
.theme-submit-btn {
    background: var(--primary-color);
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    width: 100%;
    border: none;
    outline: none;
}

.theme-submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(229, 138, 54, 0.4);
}

@media (max-width: 767px) {
    *, *::before, *::after {
        cursor: auto !important;
    }

    body {
        cursor: auto;
        overflow-x: hidden;
    }

    .custom-cursor {
        display: none;
    }

    .top-meta {
        justify-content: flex-end;
        padding: 1.1rem 1rem 0 1rem;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        color: var(--text-color);
        position: relative;
    }

    .made-in {
        margin-left: auto;
        text-align: right;
        width: max-content;
    }

    .iwb-line {
        position: absolute;
        left: 50%;
        top: 32vh;
        transform: translateX(-50%);
        width: min(96vw, 420px);
        text-align: center;
        font-size: clamp(0.95rem, 4vw, 1.55rem);
        text-transform: none;
        letter-spacing: 0;
        color: var(--text-color);
        pointer-events: auto;
        z-index: 2;
        line-height: 1.15;
    }

    .dark .iwb-line {
        color: rgba(245, 245, 245, 0.88);
    }

    .lamp-container {
        left: 0;
        top: 0;
        transform: none;
        z-index: 10; /* Lower than normal to allow light behind everything */
    }

    .lamp-light {
        transform: translateX(-2%) scale(3.1);
        transform-origin: top center;
        display: block;
        position: absolute;
        left: 50%;
        top: 44px;
        width: clamp(460px, 130vw, 760px);
        height: auto;
        opacity: 0.9;
        z-index: -10;
        pointer-events: none !important;
        transition: opacity 0.4s ease-out;
    }

    .dark .lamp-light {
        opacity: 0;
    }

    .lamp-image {
        width: clamp(360px, 88vw, 560px);
        margin-top: -5px;
        margin-left: -2px;
        object-fit: contain;
        z-index: 2;
    }

    .light-beam {
        display: none;
    }

    .beam-cone {
        display: none;
    }

    h1.logo-text {
        color: var(--primary-color);
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        text-shadow: none;
        transform: none;
    }

    .dark h1.logo-text {
        color: var(--primary-color);
        text-shadow: none;
    }

    .site-shell > main {
        justify-content: flex-start;
        padding-top: 42vh;
        padding-bottom: 2.6rem;
        gap: 0;
    }

    h1.logo-text {
        font-size: clamp(3.45rem, 15.8vw, 4.55rem);
        margin-bottom: 1.5rem;        
        text-shadow: none;
    }

    #ctaBtn {
        width: min(90vw, 20rem);
        margin-bottom: 1.2rem;
    }

    .glass-button-text {
        font-size: clamp(0.9rem, 3.7vw, 1.12rem);
        line-height: 1.2;
        padding: 0.82rem 1.1rem;
        white-space: normal;
    }

    .glass-button-wrap {
        border-radius: 9999px;
    }

    .pill-input {
        font-size: 16px; /* Prevent auto-zoom on iOS */
    }

    main:not(.legal-main) p {
        font-size: 0.84rem;
        margin-top: 3rem;
    }

    footer {
        padding-bottom: 1.7rem;
    }
}

.legal-section-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    line-height: 1.15;
}

@media (max-width: 767px) {
    .legal-page {
        padding-top: 1.2rem;
        padding-bottom: 1.8rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .legal-header {
        margin-bottom: 1.7rem;
    }

    .legal-main {
        padding-top: 0;
        row-gap: 2rem;
    }

    .legal-main p {
        margin-top: 0;
        font-size: 1rem;
    }

    .legal-section-title {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
        margin-bottom: 0.8rem;
    }
}