/* ==========================================================================
   STYLES POUR LA PAGE DE CONNEXION WORDPRESS (/wp-login.php)
   Thème : Oukaap
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ========================================================================== */

:root {
	/* Couleurs et polices héritées du thème principal */
	--color-primary: #FF725E; /* Oukaap Primaire */
	--color-secondary: #6B7280;
	--color-text: #374151;
	--color-accent: #009dd8; /* Oukaap Accent (survol) */
	--font-primary: 'Poppins', sans-serif;

	/* Jetons de design spécifiques à la page de connexion */
	--login-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
	--login-radius-lg: 16px; /* Pour la carte principale */
	--login-radius-md: 8px;  /* Pour les champs et boutons */
}


/* ==========================================================================
   2. MISE EN PAGE GÉNÉRALE
   ========================================================================== */

body.login {
	display: flex;
	flex-direction: column; /* Aligne les éléments verticalement */
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	background: #f9fafb;
	font-family: var(--font-primary);
	padding: 1rem;
	box-sizing: border-box;
}


/* ==========================================================================
   3. BLOC DE CONNEXION PRINCIPAL
   ========================================================================== */

body.login #login {
	/* APPROCHE MOBILE-FIRST : Largeur fluide par défaut */
	width: 100%;
	max-width: 380px; /* On ajoute une sécurité pour ne jamais dépasser 380px */
	padding: 2.5rem;
	background: #fff;
	border-radius: var(--login-radius-lg);
	box-shadow: var(--login-shadow);
	margin: 1rem auto;
	box-sizing: border-box; /* Assure que le padding est inclus dans la largeur */
}

/* --- Logo Oukaap --- */
body.login #login h1 a {
	/* NOTE: L'URL du logo est gérée par functions.php */
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	width: 160px;
	height: 80px;
	margin: 0 auto 1.5rem;
	display: block;
}

/* On retire les styles par défaut du formulaire de WordPress */
body.login form {
	margin-top: 1rem;
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
}


/* ==========================================================================
   4. CHAMPS DE FORMULAIRE & BOUTONS
   ========================================================================== */

body.login #login label {
	display: inline-block;
	margin-bottom: 8px;
}

/* --- Champs de saisie (texte, mot de passe) --- */
body.login input[type="text"],
body.login input[type="password"] {
	width: 100%;
	height: 48px;
	border-radius: var(--login-radius-md);
	border: 1px solid #d1d5db;
	background-color: #fff;
	font-size: 0.95rem;
	padding: 0 14px;
	margin-top: 0;
	box-sizing: border-box;
	transition: border-color .2s ease, box-shadow .2s ease;
}

body.login input:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(255, 114, 94, 0.12); /* Ombre basée sur le primaire */
	outline: none;
}

/* --- Bouton principal de connexion --- */
body.login .button-primary {
	width: 100%;
	height: 48px;
	border-radius: var(--login-radius-md);
	background: var(--color-primary) !important;
	border: none !important;
	font-weight: 600;
	font-size: 1rem;
	color: #fff !important;
	transition: background-color .2s ease, transform .1s ease;
}

body.login .button-primary:hover {
	background: var(--color-accent) !important; /* Survol en bleu */
}

body.login .button-primary:active {
	transform: scale(0.98);
}

/* === Icône "œil" === */
body.login .wp-pwd {
	position: relative;
}

body.login .wp-pwd .wp-hide-pw {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	box-shadow: none;
	position: absolute;
	top: -5px; 
	right: 5px;
	height: 48px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

body.login .wp-pwd .wp-hide-pw:focus {
	outline: none;
	box-shadow: none;
}

body.login .wp-pwd .dashicons {
	font-size: 22px;
	color: var(--color-secondary);
	transition: color .2s ease;
}

body.login .wp-pwd .wp-hide-pw:hover .dashicons {
	color: var(--color-primary);
}


/* ==========================================================================
   5. LIENS & SÉLECTEUR DE LANGUE
   ========================================================================== */

body.login #nav,
body.login #backtoblog {
	text-align: center;
	margin: 1.5rem 0 0 0;
	padding: 0;
}

body.login #nav a {
	color: var(--color-primary) !important;
	text-decoration: none;
	font-weight: 500;
	margin: 0 8px;
}
body.login #nav a:hover,
body.login #backtoblog a:hover {
	text-decoration: underline;
}

body.login #backtoblog a {
	color: var(--color-secondary);
	font-size: 0.9rem;
	text-decoration: none;
}

/* Cacher le sélecteur de langue */
body.login .language-switcher {
	display: none;
}


/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 480px) {
	body.login #login {
		padding: 2rem 1.5rem;
	}
	body.login #login h1 a {
		width: 140px;
		height: 70px;
	}
}