* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Prevent layout shifts */
    contain: layout style paint;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* Prevent layout shifts */
    contain: layout style paint;
    /* Stabilize scrolling */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Particules subtiles pour l'ambiance */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    /* Prevent layout shifts */
    contain: layout style paint;
}

.floating-element {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    animation: subtleFloat 8s infinite ease-in-out;
}

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-15px) rotate(180deg); opacity: 0.3; }
}

/* Container principal */
.login-container {
    background: white;
    border: 2px solid black;
    border-radius: 8px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Prevent layout shifts */
    contain: layout style paint;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Logo et titre */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
    /* Prevent layout shifts */
    contain: layout style;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: black;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.brand-title {
    font-size: 2.2rem;
    color: black;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.brand-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.typing-text {
    height: 28px;
    color: black;
    font-weight: 500;
    display: inline-block;
    min-width: 280px;
    font-size: 1rem;

    overflow: hidden;
    white-space: nowrap;
    position: relative;
    contain: layout style;
    text-align: center;
}



/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Prevent layout shifts */
    contain: layout style;
}

.form-group {
    position: relative;
    /* Prevent layout shifts */
    contain: layout style;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: black;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #999;
    font-size: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.3rem;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 0.7rem;
    font-size: 0.85rem;
    color: black;
    font-weight: 500;
}

/* Bouton principal */
.login-button {
    background: black;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.login-button:active {
    transform: translateY(0px);
}

/* Options du formulaire */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: black;
}

.forgot-password {
    color: black;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Séparateur */
.divider {
    margin: 2rem 0;
    text-align: center;
    position: relative;
    color: #999;
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 1rem;
}

/* Lien d'inscription */
.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.signup-link a {
    color: black;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Citation inspirante */
.inspiration-quote {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #f0f0f0;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-style: italic;
    color: #555;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: fadeInOut 6s ease-in-out infinite;
    opacity: 0;
    white-space: nowrap;
}

@keyframes fadeInOut {
    0%, 80%, 100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20%, 60% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Effet de focus sur le container */
.login-container:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .login-container {
        padding: 2rem;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .typing-text {
        min-width: 250px;
        font-size: 0.9rem;
    }

    .inspiration-quote {
        display: none;
    }
}

/* Animation d'entrée */
.login-container {
    animation: slideIn 0.6s ease-out;
}

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

    .flower-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    animation: flower-rotate 40s linear infinite;
    /* Prevent layout shifts */
    contain: layout style paint;
    transform: translate(-50%, -50%) translateZ(0); /* Force hardware acceleration */
}

.petal-group {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center;
    /* Prevent layout shifts */
    contain: layout style paint;
}

.petal-group:nth-child(1) { transform: rotate(0deg); }
.petal-group:nth-child(2) { transform: rotate(30deg); }
.petal-group:nth-child(3) { transform: rotate(60deg); }
.petal-group:nth-child(4) { transform: rotate(90deg); }
.petal-group:nth-child(5) { transform: rotate(120deg); }
.petal-group:nth-child(6) { transform: rotate(150deg); }
.petal-group:nth-child(7) { transform: rotate(180deg); }
.petal-group:nth-child(8) { transform: rotate(210deg); }
.petal-group:nth-child(9) { transform: rotate(240deg); }
.petal-group:nth-child(10) { transform: rotate(270deg); }
.petal-group:nth-child(11) { transform: rotate(300deg); }
.petal-group:nth-child(12) { transform: rotate(330deg); }

.spiral-petal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    margin: -100px 0 0 -100px;
    border: 0 solid transparent;
    border-radius: 50% 0 50% 0;
    border-top: 0 solid #b8b7b7;
    border-right: 0 solid #b8b7b7;
    transform-origin: center;
    animation: petal-dance 48s ease-in-out infinite;
    /* Prevent layout shifts */
    contain: layout style paint;
}

.spiral-petal::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50% 0 50% 0;
    border: 1px solid transparent;
    border-top: 1px solid #b8b7b7;
    border-left: 1px solid #b8b7b7;
    animation: inner-spiral 46s ease-in-out infinite reverse;
}

.spiral-petal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50% 0 50% 0;
    border: 1px solid transparent;
    border-bottom: 1px solid #b8b7b7;
    border-right: 1px solid #b8b7b7;
    animation: core-pulse 44s ease-in-out infinite;
}

@keyframes flower-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes petal-dance {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: scale(1.1) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.9) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: scale(1.05) rotate(270deg);
        opacity: 0.7;
    }
}

@keyframes inner-spiral {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    33% {
        transform: rotate(120deg) scale(0.8);
    }
    66% {
        transform: rotate(240deg) scale(1.2);
    }
}

@keyframes core-pulse {
    0%, 100% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.7;
    }
}

@keyframes bg-spin {
    from {
        transform: rotate(0deg);
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
    to {
        transform: rotate(360deg);
        opacity: 0.1;
    }
}

