:root {
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-color: #1a202c;
    --primary-color: #4299e1;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #87CEEB; /* fallback sky blue */
}

/* Responsive Images & Videos */
img, video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.background-video-container {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #87CEEB;
}

#bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: blur(6px);
    transform: scale(1.1);
}

.cloud-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px; /* high border radius */
    box-shadow: var(--glass-shadow);
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
}

.spa-container {
    position: relative;
    z-index: 10;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--text-color);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.8);
}

.btn-selected {
    background: #1e3a8a; /* bleu foncé */
    color: white;
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-selected:hover {
    background: #172554;
}

.bubble {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bubble.hidden {
    display: none;
}

/* Atomic forms */
.atomic-input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    box-sizing: border-box;
}

/* Global Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 100px;
    height: 100px;
}

.spinner .path {
    stroke: var(--primary-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.loader-text {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(255,255,255,0.8);
}

/* Notifications */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    color: var(--text-color);
    font-weight: 500;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.error {
    border-left: 5px solid #e53e3e;
    background: rgba(255, 255, 255, 0.7);
}

.notification.success {
    border-left: 5px solid #48bb78;
    background: rgba(255, 255, 255, 0.7);
}

.notification.info {
    border-left: 5px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.7);
}

/* Account Dropdown & Items */
#account-dropdown {
    transform-origin: top right;
    transition: transform 0.2s ease, opacity 0.2s ease;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(255, 255, 255, 0.35);
}

#account-dropdown.hidden {
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    display: block; /* Override default hidden to keep transition */
}

.dropdown-item {
    display: block;
    background: rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.8);
    border-color: var(--primary-color);
}

/* Chat options popover */
#chat-options-popover {
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: bottom left;
}
#chat-options-popover.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}