/*--------------------------------------------------------------
  # MAIN
--------------------------------------------------------------*/

  :root {
        --primary-color: #068543;
        --primary-dark: #068543;
        --primary-light: #93c5fd;
        --secondary-color: #64748b;
        --success-color: #10b981;
        --error-color: #ef4444;
        --bg-gradient-end: #052748;
        --bg-gradient-start: #068543;
        --card-bg: rgba(255, 255, 255, 0.95);
        --card-shadow: 0 25px 50px -12px rgba(219, 18, 18, 0.25);
        --input-shadow: 0 4px 6px -1px rgba(95, 6, 6, 0.1);
        --text-primary: #068543;
        --text-secondary: #64748b;
    }

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

    body {
        font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
        background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow-x: hidden;
    }

    @keyframes rotate {
        from { transform: rotate(0deg) scale(1); }
        to { transform: rotate(360deg) scale(1); }
    }

    .login {
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        border-radius: 32px;
        box-shadow: var(--card-shadow);
        padding: 48px 40px;
        max-width: 440px;
        width: 92%;
        position: relative;
        z-index: 1;
        animation: floatIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    @keyframes floatIn {
        0% {
            opacity: 0;
            transform: translateY(30px) scale(0.98);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .badge {
        text-align: center;
        margin-bottom: 24px;
        width: 100%;
    }

    .badge-icon {
        width: 70%;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: auto;
        transition: transform 0.3s ease;
    }

    .badge-icon:hover {
        transform: rotate(0deg) scale(1.05);
    }

    .badge-icon img {
        border-radius: 20px;
    }

    .labelAuthentification {
        text-align: center;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1px;
        color: var(--primary-color);
        text-transform: uppercase;
        margin-bottom: 8px;
        opacity: 0.9;
    }

    .texthead {
        text-align: center;
        font-size: 32px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 32px;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .texthead strong {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        position: relative;
        display: inline-block;
    }

    .texthead strong::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
        animation: underline 2s ease-in-out infinite;
    }

    @keyframes underline {
        0%, 100% { opacity: 0.3; width: 80%; left: 10%; }
        50% { opacity: 1; width: 100%; left: 0; }
    }

    .reponses {
        padding: 14px 18px;
        border-radius: 16px;
        margin-bottom: 28px;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        display: none;
        animation: slideInDown 0.4s ease-out;
        position: relative;
        overflow: hidden;
    }

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

    .reponses:not(:empty) {
        display: block;
    }

    .reponses.success {
        background: linear-gradient(135deg, #d1fae5, #a7f3d0);
        color: #065f46;
        border-left: 4px solid var(--success-color);
    }

    .reponses.error {
        background: linear-gradient(135deg, #fee2e2, #fecaca);
        color: #991b1b;
        border-left: 4px solid var(--error-color);
    }

    .reponses::before {
        content: '✨';
        margin-right: 8px;
        font-size: 16px;
    }

    .reponses.error::before {
        content: '⚠️';
    }

    #authentification {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    #authentification input[type="text"],
    #authentification input[type="password"] {
        width: 100%;
        padding: 16px 18px;
        border: 2px solid #e2e8f0;
        border-radius: 16px;
        font-size: 15px;
        font-family: inherit;
        transition: all 0.3s ease;
        background-color: white;
        box-shadow: var(--input-shadow);
        box-sizing: border-box;
    }

    #authentification input[type="text"]:hover,
    #authentification input[type="password"]:hover {
        border-color: var(--primary-light);
    }

    #authentification input[type="text"]:focus,
    #authentification input[type="password"]:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
        background-color: white;
    }

    #authentification input::placeholder {
        color: #94a3b8;
        font-weight: 400;
        transition: opacity 0.3s ease;
    }

    #authentification input:focus::placeholder {
        opacity: 0.7;
    }

    /* Style moderne pour le bouton */
    .submit-btn {
        width: 100%;
        padding: 16px 24px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border: none;
        border-radius: 16px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 8px 20px -5px rgba(37, 99, 235, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-top: 12px;
        position: relative;
        overflow: hidden;
    }

    .submit-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .submit-btn:hover::before {
        width: 300px;
        height: 300px;
    }

    .submit-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.5);
    }

    .submit-btn:active {
        transform: translateY(0);
        box-shadow: 0 5px 15px -3px rgba(37, 99, 235, 0.4);
    }

    .submit-btn i {
        font-size: 20px;
        transition: transform 0.3s ease;
    }

    .submit-btn:hover i {
        transform: translateX(5px);
    }

    /* Lien mot de passe oublié */
    .forgot-password {
        text-align: center;
        margin-top: 20px;
    }

    .forgot-password a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        border-bottom: 1px dashed transparent;
    }

    .forgot-password a:hover {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

    /* Animation de chargement */
    .login.loading {
        position: relative;
        pointer-events: none;
        opacity: 0.8;
    }

    .login.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(3px);
        border-radius: 32px;
        z-index: 2;
        animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 0.8; }
    }

    .login.loading .spinner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        border: 3px solid var(--primary-light);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
        z-index: 3;
    }

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

    /* Responsive */
    @media (max-width: 480px) {
        .login {
            padding: 32px 24px;
        }

        .texthead {
            font-size: 26px;
        }

        .badge-icon {
            width: 56px;
            height: 56px;
        }

        .badge-icon i {
            font-size: 28px;
        }
    }

    /* Support du dark mode */
    @media (prefers-color-scheme: dark) {
        :root {
            --card-bg: rgba(30, 41, 59, 0.95);
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
        }

        #authentification input[type="text"],
        #authentification input[type="password"] {
            background-color: #1e293b;
            border-color: #334155;
            color: #f1f5f9;
        }

        #authentification input[type="text"]:focus,
        #authentification input[type="password"]:focus {
            background-color: #334155;
        }
    }

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

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