:root {
	--primary: #4361ee;
	--primary-dark: #3a0ca3;
	--success: #06d6a0;
	--danger: #ef476f;
	--warning: #ffd166;
	--dark: #212529;
	--light: #f8f9fa;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.login-container {
	width: 100%;
	max-width: 450px;
	margin: 0 auto;
	background: white;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	animation: slideUp 0.5s ease;
}

.login-content {
    padding: 40px; 
}


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

.login-header {
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	color: white;
	padding: 40px 30px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.login-header::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
	background-size: 20px 20px;
	opacity: 0.1;
}

.login-header h1 {
	font-size: 2.2rem;
	margin-bottom: 10px;
	position: relative;
}

.login-header p {
	font-size: 1.1rem;
	opacity: 0.9;
	position: relative;
}

/*	--------	*/

.badge {
    padding: 20px 20px; /* Plus d'espace pour respirer */
    border-radius: 12px; /* Un arrondi plus doux adapté au texte multi-lignes */
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center; /* Centre le texte pour un meilleur rendu */
}


.badge p {
    margin: 5px;
    line-height: 1.4; /* Un poil plus d'espace entre les lignes */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* Force le retour à la ligne automatique */
}

/* Liens dans le badge */
.badge .legal-link {
	color: inherit;
	text-decoration: underline;
	white-space: nowrap;  /* Empêcher les liens de couper */
}

/* Français */
:lang(fr) .badge p {
	font-size: 0.9rem;
}

/* Français */
:lang(ar) .badge p {
	font-size: 1.0rem;
}

/*	---------	*/


.alert {
	padding: 16px 20px;
	border-radius: 12px;
	margin-bottom: 25px;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	animation: slideDown 0.3s ease;
	border-left: 4px solid;
}

.alert-success {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border-left-color: var(--success);
	color: #0f5132;
}

.alert-error {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border-left-color: var(--danger);
	color: #721c24;
}

.alert-icon {
	font-size: 1.3rem;
	flex-shrink: 0;
	margin-top: 2px;
}

.alert-content {
	flex: 1;
}

.alert-content strong {
	display: block;
	margin-bottom: 5px;
	font-size: 1.1rem;
}

.login-form {
	margin-bottom: 25px;
}

.form-group {
	margin-bottom: 25px;
	position: relative;
}

.form-label {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: var(--dark);
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	gap: 8px;
}

.form-label i {
	color: var(--primary);
	font-size: 1.1rem;
	width: 20px;
}

.form-input {
	width: 100%;
	padding: 15px 20px;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	font-size: 1rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: var(--light);
}

.form-input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
	background: white;
	transform: translateY(-2px);
}

.form-input::placeholder {
	color: #999;
}

.password-toggle {
	position: absolute;
	right: 15px;
	top: 45px;
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	font-size: 1.1rem;
	padding: 5px;
}

.password-toggle:hover {
	color: var(--primary);
}

.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.checkbox-container {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.checkbox-input {
	width: 18px;
	height: 18px;
	accent-color: var(--primary);
	cursor: pointer;
}

.checkbox-label {
	font-size: 0.95rem;
	color: #444;
	cursor: pointer;
}

.forgot-password {
	font-size: 0.95rem;
	color: var(--primary);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
}

.forgot-password:hover {
	text-decoration: underline;
	color: var(--primary-dark);
}

.login-button {
	width: 100%;
	padding: 10px;
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	color: white;
	border: none;
	border-radius: 12px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 5px;
}

.login-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

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

.login-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

.divider {
	display: flex;
	align-items: center;
	margin: 5px 0;
	color: #666;
	font-size: 0.9rem;
}

.divider::before
 {
	content: '';
	flex: 1;
	height: 1px;
	background: #e0e0e0;
}

.divider span {
	padding: 0 5px;
}

.register-link {
	text-align: center;
	margin-top: 5px;
	/*padding-top: 5px;*/
	/*border-top: 1px solid #eee;*/
	color: #666;
	font-size: 0.95rem;
}

.register-link a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s;
}

.register-link a:hover {
	text-decoration: underline;
	color: var(--primary-dark);
}

.security-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	/*margin-top: 5px;*/
	padding: 5px;
	background: #f8f9fa;
	border-radius: 8px;
	font-size: 0.9rem;
	color: #666;
}

.security-note i {
	color: var(--success);
	font-size: 1.1rem;
}

/* Liens légaux */
.legal-link {
    color: #E6E6FA;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.legal-link:hover {
    color: #FFFF00;
    text-decoration: underline;
}

.legal-link:active {
    color: #FFBD00;
}

/* Responsive */
/* --- CONFIGURATION RESPONSIVE --- */

@media (max-width: 768px) {
    .login-container {
        max-width: 100%; /* Occupe l'écran sur tablette */
    }
    
    .login-header {
        padding: 30px 20px;
    }
    
    .login-content {
        padding: 30px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .badge {
        padding: 8px 12px;
        border-radius: 8px;
    }

    .badge p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
}

/* C'est ici qu'on gère ton écran 720x1640 (largeur ~360px) sans toucher au PC */
@media (max-width: 576px) {
    .login-content {
        padding: 20px; /* On réduit le padding pour redonner de la largeur à la forme */
    }

    .badge {
        padding: 8px 10px;
        border-radius: 6px;
    }
    
    .badge p {
        font-size: 0.7rem !important;
        line-height: 1.45;
    }
    
    /* Le correctif fr qui a sauvé ton mobile */
    html[lang="fr"] .badge p,
    :lang(fr) .badge p {
        font-size: 0.65rem !important; 
    }
    
    .badge .legal-link {
        display: inline !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        border-radius: 15px;
    }
    
    .login-header {
        padding: 25px 15px;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
}
