/* Variables de couleurs */
:root {
    --primary-color: #3caf74;
    --primary-light: #8fe6a2;
    --primary-dark: #2d7d5a;
    --secondary-color: #6fcf97;
    --light-color: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e0e0e0;
    --gray-dark: #5d6d7e;
    --success-color: #2e7d32;
    --danger-color: #e74c3c;
    --shadow-light: rgba(60, 175, 116, 0.1);
    --shadow-medium: rgba(60, 175, 116, 0.2);
    --shadow-strong: rgba(60, 175, 116, 0.4);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Conteneur principal */
.container {
    background: var(--light-color);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panneau gauche */
.left-panel {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 20s infinite linear;
}

@keyframes float {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512,54.67,583,72c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff' opacity='0.15'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
}

.left-panel h1 {
    font-size: 2.8em;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.left-panel p {
    font-size: 1.15em;
    line-height: 1.7;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Icône décorative */
.left-panel::before {
    content: '🐾';
    position: absolute;
    top: 3rem;
    right: 3rem;
    font-size: 4em;
    opacity: 0.2;
}

/* Panneau droit */
.right-panel {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--light-color);
}

.right-panel h2 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 2.2em;
    font-weight: 700;
}

.right-panel .subtitle {
    color: var(--gray-dark);
    margin-bottom: 2.5rem;
    font-size: 1em;
}

/* Messages */
.message {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: linear-gradient(135deg, rgba(60, 175, 116, 0.1) 0%, rgba(143, 230, 162, 0.1) 100%);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.message.error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    color: #c0392b;
    border-left: 4px solid var(--danger-color);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.1);
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 2px solid var(--gray-medium);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--gray-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--shadow-medium);
    background-color: var(--light-color);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #b0b0b0;
}

/* Remember & Forgot */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9em;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    color: var(--gray-dark);
    cursor: pointer;
    user-select: none;
}

.remember-forgot input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-medium);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 10px;
    flex-shrink: 0;
}

.remember-forgot input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

.remember-forgot input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: transparent;
}

.remember-forgot input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.remember-forgot a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.remember-forgot a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Bouton Login */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-strong);
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

/* Lien inscription */
.signup-link {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray-dark);
    font-size: 0.95em;
}

.signup-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .left-panel {
        padding: 3rem 2rem;
        text-align: center;
    }

    .left-panel h1 {
        font-size: 2.2em;
    }

    .left-panel::before {
        top: 2rem;
        right: 50%;
        transform: translateX(50%);
    }

    .right-panel {
        padding: 3rem 2rem;
    }

    .right-panel h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .left-panel h1 {
        font-size: 1.8em;
    }

    .left-panel p {
        font-size: 1em;
    }

    .right-panel h2 {
        font-size: 1.6em;
    }

    .form-group input {
        padding: 0.8rem 1rem;
    }

    .btn-login {
        padding: 0.9rem;
    }
}

/* Animation au chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 0.5s ease-in;
}

/* Effet de focus amélioré */
.form-group input:focus {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}