/**
 * Sigma - Page de connexion moderne (Split-screen)
 * Utilise les design tokens de sigma.css
 */

/* ============================
   LAYOUT PRINCIPAL (Split-screen)
   ============================ */

.sigma-login-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100%;
	background: #ffffff;
	position: relative;
}

/* Accent de couleur subtil en haut */
.sigma-login-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #0052ff 0%, #5ad44a 100%);
	z-index: 10;
}

/* Partie gauche : Formulaire */
.sigma-login-form-section {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: #ffffff;
	overflow-y: auto;
	position: relative;
}

/* Motif subtil de points en arrière-plan gauche */
.sigma-login-form-section::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, rgba(0, 82, 255, 0.03) 1px, transparent 1px);
	background-size: 24px 24px;
	opacity: 0.5;
	pointer-events: none;
}

.sigma-login-form-container {
	width: 100%;
	max-width: 480px;
	position: relative;
	z-index: 1;
}

/* Partie droite : Illustration SVG animée */
.sigma-login-visual-section {
	flex: 1;
	position: relative;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden; /* Masque le débordement */
	padding: 0;
	min-height: 100vh;
}

/* Conteneur SVG */
.sigma-login-visual-section svg {
	width: 130%;
	height: 130%;
	max-width: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}

/* Animation des traits (polygones) - apparaître et disparaître en boucle */
.sigma-login-visual-section svg polygon,
.sigma-login-visual-section svg line,
.sigma-login-visual-section svg polyline {
	opacity: 0;
	animation: fadeInOut 4s ease-in-out infinite;
}

/* Les cercles (paths) restent visibles en permanence */
.sigma-login-visual-section svg path,
.sigma-login-visual-section svg circle,
.sigma-login-visual-section svg ellipse {
	opacity: 1;
	transform-origin: center;
	/* Pas d'animation, juste visibles */
}

/* Animation d'apparition et disparition des traits (polygones) */
@keyframes fadeInOut {
	0% {
		opacity: 0;
		transform: scale(0.95);
	}
	25% {
		opacity: 1;
		transform: scale(1);
	}
	75% {
		opacity: 1;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		transform: scale(0.95);
	}
}

.sigma-login-visual-content {
	display: none;
}

/* ============================
   HEADER (Logo + Titre)
   ============================ */

.sigma-login-header {
	text-align: center;
	margin-bottom: 32px;
}

.sigma-login-logo {
	height: 48px;
	width: auto;
	margin-bottom: 24px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.sigma-login-title {
	font-size: 32px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 12px 0;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.sigma-login-subtitle {
	font-size: 16px;
	color: #6b7280;
	margin: 0;
	font-weight: 400;
	line-height: 1.5;
}

/* ============================
   CARTE DE CONNEXION
   ============================ */

.sigma-login-card {
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	margin-bottom: 16px;
	transition: box-shadow 0.3s ease;
}

.sigma-login-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================
   FORMULAIRE
   ============================ */

.sigma-form-body {
	margin-bottom: 24px;
}

.sigma-form-group {
	margin-bottom: 20px;
}

.sigma-form-group:last-child {
	margin-bottom: 0;
}

.sigma-form-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 8px;
}

.sigma-form-label i {
	font-size: 18px;
	color: #0052ff;
}

.sigma-form-control {
	width: 100%;
	padding: 14px 16px;
	font-size: 15px;
	font-family: 'Roboto', sans-serif;
	color: #1f2937;
	background: #ffffff;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	transition: all 0.2s ease;
	outline: none;
}

.sigma-form-control:hover {
	border-color: #d1d5db;
}

.sigma-form-control:focus {
	border-color: #0052ff;
	box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
	background: #ffffff;
}

.sigma-form-control::placeholder {
	color: var(--text-muted);
}

.sigma-form-control:disabled {
	background: var(--surface-hover);
	cursor: not-allowed;
	opacity: 0.6;
}

/* Champ mot de passe avec toggle */
.sigma-password-wrapper {
	position: relative;
}

.sigma-password-wrapper .sigma-form-control {
	padding-right: 48px;
}

.sigma-password-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--text-secondary);
	transition: color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.sigma-password-toggle i {
	font-size: 18px;
}

/* Footer du formulaire */
.sigma-form-footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 12px;
}

/* ============================
   BOUTONS
   ============================ */

.sigma-form-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.btn {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	border-radius: calc(var(--border-radius) - 2px);
	transition: all 0.2s ease;
	border: none;
	cursor: pointer;
	outline: none;
}

.btn-block {
	width: 100%;
	padding: 12px 24px;
	font-size: 15px;
}

.btn-primary {
	background: linear-gradient(135deg, #0052ff 0%, #0041cc 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(0, 82, 255, 0.2);
	font-weight: 600;
	letter-spacing: 0.3px;
	position: relative;
	overflow: hidden;
}


.btn-primary:hover {
	box-shadow: 0 4px 16px rgba(0, 82, 255, 0.3);
	transform: translateY(-2px);
	border: 1px solid #0052ff;
	color: #0052ff;
	background: white;

}

.btn-primary span {
	position: relative;
	z-index: 1;
}


.btn-secondary {
	background: var(--surface);
	border: 1px solid var(--primary);
	color: var(--text-primary);
}

.btn-secondary:hover {
	background: var(--surface-hover);
	border-color: var(--primary);
}

/* ============================
   LIENS
   ============================ */

.sigma-link-primary {
	color: #0052ff;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
	position: relative;
}

.sigma-link-primary::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #0052ff 0%, #5ad44a 100%);
	transition: width 0.3s ease;
}

.sigma-link-primary:hover::after {
	width: 100%;
}

.sigma-link-secondary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #6b7280;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s ease;
	justify-content: center;
}

.sigma-link-secondary:hover {
	color: #0052ff;
}

.sigma-link-secondary i {
	font-size: 16px;
}

/* ============================
   INSCRIPTION / SIGNUP
   ============================ */

.sigma-signup-link {
	text-align: center;
	font-size: 14px;
	color: var(--text-secondary);
	padding: 16px;
}

/* ============================
   FOOTER
   ============================ */

.sigma-login-footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
}

.sigma-footer-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
}

.sigma-footer-text {
	font-size: 12px;
	color: #9ca3af;
	font-weight: 400;
}

.sigma-footer-company {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	letter-spacing: 0.3px;
}

/* ============================
   DIVIDER (Séparateur "ou")
   ============================ */

.sigma-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 24px 0;
	color: var(--text-muted);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sigma-divider::before,
.sigma-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid var(--border);
}

.sigma-divider span {
	padding: 0 16px;
}

/* ============================
   SOCIAL LOGINS
   ============================ */

.sigma-social-logins {
	margin-top: 24px;
}

.sigma-social-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sigma-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
	background: var(--surface);
	border: 1px solid lightgray;
	border-radius: calc(var(--border-radius) - 2px);
	text-decoration: none;
	transition: all 0.2s ease;
}

.sigma-social-btn:hover {
	background: var(--surface-hover);
	border-color: var(--primary);
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}

.sigma-social-btn i {
	font-size: 18px;
}

.sigma-social-btn img {
	width: 18px;
	height: 18px;
}

/* ============================
   ALERTES
   ============================ */

.sigma-alert {
	display: flex;
	gap: 12px;
	padding: 16px;
	border-radius: calc(var(--border-radius) - 2px);
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.5;
}

.sigma-alert i {
	font-size: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}

.sigma-alert-warning {
	background: rgba(250, 220, 10, 0.1);
	color: var(--text-primary);
	border: 1px solid rgba(250, 220, 10, 0.3);
}

.sigma-alert-warning i {
	color: var(--tout-faire);
}

.sigma-alert strong {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.sigma-alert p {
	margin: 0;
	color: var(--text-secondary);
}

/* ============================
   PARTIE VISUELLE DROITE
   ============================ */

.sigma-visual-title {
	font-size: 36px;
	font-weight: 700;
	margin: 0 0 16px 0;
	line-height: 1.2;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sigma-visual-description {
	font-size: 18px;
	margin: 0 0 32px 0;
	opacity: 0.95;
	line-height: 1.6;
}

.sigma-visual-features {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sigma-feature-item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: calc(var(--border-radius) - 2px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.sigma-feature-item i {
	font-size: 24px;
	color: white;
	flex-shrink: 0;
}

/* ============================
   ANIMATIONS
   ============================ */

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

.sigma-login-form-container {
	animation: fadeInUp 0.6s ease-out;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 1024px) {
	.sigma-login-visual-section {
		display: none;
	}

	.sigma-login-form-section {
		flex: 1;
	}
}

@media (max-width: 640px) {
	.sigma-login-form-section {
		padding: 24px 16px;
	}

	.sigma-login-card {
		padding: 24px;
	}

	.sigma-login-title {
		font-size: 24px;
	}

	.sigma-login-subtitle {
		font-size: 14px;
	}

	.sigma-visual-title {
		font-size: 28px;
	}

	.sigma-visual-description {
		font-size: 16px;
	}
}

/* ============================
   DARK MODE
   ============================ */

[data-theme="dark"] .sigma-login-wrapper {
	background: #0f1419;
}

[data-theme="dark"] .sigma-login-form-section {
	background: #0f1419;
}

[data-theme="dark"] .sigma-login-visual-section {
	background: linear-gradient(135deg, #1a1f26 0%, #0f1419 100%);
}

/* Ajuster l'opacité du SVG en dark mode */
[data-theme="dark"] .sigma-login-visual-section svg {
	opacity: 0.9;
}

/* Changer les couleurs du SVG en dark mode (appliqué via JS) */
[data-theme="dark"] .sigma-login-visual-section svg path,
[data-theme="dark"] .sigma-login-visual-section svg line,
[data-theme="dark"] .sigma-login-visual-section svg polyline {
	filter: brightness(1.2);
}

[data-theme="dark"] .sigma-login-visual-section svg circle,
[data-theme="dark"] .sigma-login-visual-section svg ellipse {
	filter: brightness(1.2);
}

[data-theme="dark"] .sigma-login-card {
	background: #1a1f26;
	border-color: #2d3748;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .sigma-login-title {
	color: #f7fafc;
}

[data-theme="dark"] .sigma-login-subtitle {
	color: #a0aec0;
}

[data-theme="dark"] .sigma-form-label {
	color: #e2e8f0;
}

[data-theme="dark"] .sigma-form-control {
	background: #0f1419;
	border-color: #2d3748;
	color: #f7fafc;
}

[data-theme="dark"] .sigma-form-control:hover {
	border-color: #4a5568;
}

[data-theme="dark"] .sigma-form-control:focus {
	border-color: #0052ff;
	box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.15);
	background: #0f1419;
}

[data-theme="dark"] .sigma-social-btn {
	background: #1a1f26;
	border-color: #2d3748;
	color: #e2e8f0;
}

[data-theme="dark"] .sigma-social-btn:hover {
	background: #2d3748;
	border-color: #0052ff;
}

[data-theme="dark"] .sigma-login-footer {
	border-top-color: #2d3748;
}

[data-theme="dark"] .sigma-footer-text {
	color: #6b7280;
}

[data-theme="dark"] .sigma-footer-company {
	color: #e2e8f0;
}

/* ============================
   COMPATIBILITÉ FRAPPE
   ============================ */

/* Masquer les éléments Frappe par défaut */
.sigma-login-wrapper .web-footer,
.sigma-login-wrapper .navbar {
	display: none !important;
}

/* Assurer que le body prend toute la hauteur */
body.login-page {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

/* Cacher les sections non actives */
.sigma-login-wrapper section:not(.for-login) {
	display: none;
}

.sigma-login-wrapper section.for-login {
	display: block;
}

/* ============================
   VARIANTES D'AFFICHAGE DE L'ILLUSTRATION
   ============================ */

/*
   Pour changer le style d'affichage de l'illustration,
   ajoutez une de ces classes à .sigma-login-visual-section
   dans le fichier login.html
*/

/* Option 1: Illustration centrée (défaut - déjà appliqué) */
.illustration-center .sigma-login-visual-section::before {
	background-position: center;
	transform: scale(1.1);
}

/* Option 2: Illustration décalée vers la droite */
.illustration-right .sigma-login-visual-section::before {
	background-position: right center;
	transform: scale(1.2) translateX(10%);
}

/* Option 3: Illustration décalée vers la gauche */
.illustration-left .sigma-login-visual-section::before {
	background-position: left center;
	transform: scale(1.2) translateX(-10%);
}

/* Option 4: Illustration en plein écran (cover) */
.illustration-cover .sigma-login-visual-section::before {
	background-size: cover;
	background-position: center;
	transform: scale(1);
	opacity: 0.3;
}

/* Option 5: Illustration plus grande */
.illustration-large .sigma-login-visual-section::before {
	background-size: 120%;
	transform: scale(1) translateX(5%);
}

/* Option 6: Illustration sans animation */
.illustration-static .sigma-login-visual-section::before {
	animation: none;
	transform: scale(1.1) translateX(5%);
}

/* Option 7: Illustration avec effet de profondeur */
.illustration-depth .sigma-login-visual-section::before {
	filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
	opacity: 0.9;
}

/* Option 8: Mode SVG optimisé (si vous utilisez .svg) */
.illustration-svg .sigma-login-visual-section::before {
	background-image: url('/assets/sigma/images/login-illustration.svg');
	filter: brightness(1.1);
	/* Tourner le svg de 90 degrés */
	background-size: 110%;
	transform: scale(1) rotate(90deg);
}

/* ============================
   AJUSTEMENTS POUR DIFFÉRENTS RATIOS D'IMAGE
   ============================ */

/* Si votre illustration est en format portrait */
.illustration-portrait .sigma-login-visual-section::before {
	background-size: 100% 100%;
	background-position: center;
}

/* Si votre illustration est en format paysage large */
.illustration-landscape .sigma-login-visual-section::before {
	background-size: 90% 100%;
	background-position: center right;
}

/* ============================
   ALTERNATIVES DE GRADIENT
   ============================ */

/* Gradient plus sombre pour illustration claire */
.gradient-dark .sigma-login-visual-section {
	background: linear-gradient(135deg, #1a4d9e 0%, #015a5f 100%);
}

/* Gradient plus clair pour illustration sombre */
.gradient-light .sigma-login-visual-section {
	background: linear-gradient(135deg, #4a8fff 0%, #02a5ac 100%);
}

/* Gradient vertical */
.gradient-vertical .sigma-login-visual-section {
	background: linear-gradient(180deg, var(--primary) 0%, var(--agro) 100%);
}

/* Gradient radial depuis le centre */
.gradient-radial .sigma-login-visual-section {
	background: radial-gradient(
		ellipse at center,
		var(--primary) 0%,
		var(--agro) 100%
	);
}

@media (min-width: 1440px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}
@media (min-width: 1200px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}
@media (min-width: 992px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}
@media (min-width: 576px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}
.container {
    padding-left: 0;
    padding-right: 0;
	max-width: 100%;
}