 :root {
     --vert: #009e60;
     --vert-dark: #007d4c;
     --vert-light: rgba(0, 158, 96, 0.10);
     --jaune: #fcd116;
     --bleu: #3a75c4;
     --bleu-dark: #2d5fa8;
 }

 *,
 *::before,
 *::after {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
 }

 body {
     font-family: 'Inter', 'Segoe UI', sans-serif;
     font-size: 0.9rem;
     background: #0d1e35;
     color: #1e293b;
     min-height: 100vh;
     overflow-x: hidden;
 }

 /* ─── FLAG BAR ─── */
 .flag-bar {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     height: 4px;
     display: flex;
     z-index: 9999;
 }

 .flag-bar span {
     flex: 1;
 }

 .flag-bar .f-vert {
     background: linear-gradient(90deg, #006e42, var(--vert), #00c97a);
 }

 .flag-bar .f-jaune {
     background: linear-gradient(90deg, #e6bc00, var(--jaune), #ffe44d);
 }

 .flag-bar .f-bleu {
     background: linear-gradient(90deg, #2356a8, var(--bleu), #6ea8fe);
 }

 /* ─── LAYOUT ─── */
 .login-wrapper {
     min-height: 100vh;
     display: flex;
     padding-top: 4px;
 }

 /* ─── PANNEAU GAUCHE ─── */
 .left-panel {
     flex: 1;
     background: linear-gradient(145deg, #0a1628 0%, #0d2a16 45%, #0a1628 80%, #111d40 100%);
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     padding: 3rem 3.5rem;
     position: relative;
     overflow: hidden;
 }

 /* Bulles d'arrière-plan */
 .left-panel::before {
     content: '';
     position: absolute;
     top: -80px;
     right: -80px;
     width: 360px;
     height: 360px;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(0, 158, 96, 0.18), transparent 70%);
     animation: floatA 8s ease-in-out infinite;
 }

 .left-panel::after {
     content: '';
     position: absolute;
     bottom: -100px;
     left: -60px;
     width: 320px;
     height: 320px;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(58, 117, 196, 0.15), transparent 70%);
     animation: floatB 11s ease-in-out infinite;
 }

 @keyframes floatA {

     0%,
     100% {
         transform: translateY(0) scale(1)
     }

     50% {
         transform: translateY(-20px) scale(1.04)
     }
 }

 @keyframes floatB {

     0%,
     100% {
         transform: translateY(-10px)
     }

     50% {
         transform: translateY(12px)
     }
 }

 @keyframes fadeUp {
     from {
         opacity: 0;
         transform: translateY(20px)
     }

     to {
         opacity: 1;
         transform: translateY(0)
     }
 }

 @keyframes pulse {

     0%,
     100% {
         opacity: 1
     }

     50% {
         opacity: 0.6
     }
 }

 @keyframes spin {
     to {
         transform: rotate(360deg)
     }
 }

 .left-content {
     position: relative;
     z-index: 2;
 }

 /* Brand */
 .brand-area {
     display: flex;
     align-items: center;
     gap: 0.9rem;
     margin-bottom: 3rem;
 }

 .brand-logo-box {
     width: 48px;
     height: 48px;
     border-radius: 14px;
     overflow: hidden;
     box-shadow: 0 6px 18px rgba(0, 158, 96, 0.35);
     flex-shrink: 0;
 }

 .brand-logo-box img {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 .brand-logo-fb {
     width: 48px;
     height: 48px;
     border-radius: 14px;
     background: linear-gradient(135deg, var(--vert), var(--bleu));
     display: flex;
     align-items: center;
     justify-content: center;
     color: #fff;
     font-size: 1.1rem;
     font-weight: 800;
 }

 .brand-texts strong {
     color: #fff;
     font-family: 'Poppins', sans-serif;
     font-size: 1.05rem;
     font-weight: 800;
     display: block;
 }

 .brand-texts small {
     color: rgba(255, 255, 255, 0.35);
     font-size: 0.65rem;
 }

 /* Titre principal */
 .hero-badge {
     display: inline-flex;
     align-items: center;
     gap: 0.4rem;
     background: rgba(0, 230, 110, 0.12);
     border: 1px solid rgba(0, 230, 110, 0.25);
     padding: 0.28rem 0.85rem;
     border-radius: 20px;
     font-size: 0.68rem;
     font-weight: 800;
     color: #00e06e;
     margin-bottom: 1rem;
 }

 .hero-title {
     font-family: 'Poppins', sans-serif;
     font-size: 1.85rem;
     font-weight: 800;
     color: #fff;
     line-height: 1.25;
     letter-spacing: -0.4px;
     margin-bottom: 0.85rem;
 }

 .hero-title span {
     background: linear-gradient(90deg, var(--vert), var(--jaune));
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 .hero-desc {
     font-size: 0.84rem;
     color: rgba(255, 255, 255, 0.55);
     line-height: 1.7;
     max-width: 440px;
     margin-bottom: 2.25rem;
 }

 /* Fonctionnalités */
 .feature-list {
     display: flex;
     flex-direction: column;
     gap: 0.85rem;
 }

 .feature-item {
     display: flex;
     align-items: flex-start;
     gap: 0.85rem;
     animation: fadeUp 0.6s ease both;
 }

 .feature-item:nth-child(1) {
     animation-delay: 0.1s;
 }

 .feature-item:nth-child(2) {
     animation-delay: 0.2s;
 }

 .feature-item:nth-child(3) {
     animation-delay: 0.3s;
 }

 .feature-item:nth-child(4) {
     animation-delay: 0.4s;
 }

 .feature-icon {
     width: 38px;
     height: 38px;
     border-radius: 10px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1rem;
     flex-shrink: 0;
 }

 .feature-icon.vert {
     background: rgba(0, 158, 96, 0.18);
     color: #00e06e;
 }

 .feature-icon.bleu {
     background: rgba(58, 117, 196, 0.18);
     color: #6ea8fe;
 }

 .feature-icon.jaune {
     background: rgba(252, 209, 22, 0.16);
     color: var(--jaune);
 }

 .feature-icon.rouge {
     background: rgba(239, 68, 68, 0.15);
     color: #fc8585;
 }

 .feature-text strong {
     color: #fff;
     font-size: 0.84rem;
     display: block;
     font-weight: 700;
 }

 .feature-text small {
     color: rgba(255, 255, 255, 0.38);
     font-size: 0.72rem;
 }

 /* Stats rapides en bas */
 .left-stats {
     position: relative;
     z-index: 2;
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 1rem;
     padding-top: 2rem;
     border-top: 1px solid rgba(255, 255, 255, 0.07);
 }

 .left-stat-item {
     text-align: center;
 }

 .left-stat-value {
     font-family: 'Poppins', sans-serif;
     font-size: 1.4rem;
     font-weight: 800;
     background: linear-gradient(135deg, #00e06e, #00c97a);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 .left-stat-value.b {
     background: linear-gradient(135deg, #6ea8fe, #3a75c4);
     -webkit-background-clip: text;
     background-clip: text;
 }

 .left-stat-value.y {
     background: linear-gradient(135deg, #ffe44d, #fcd116);
     -webkit-background-clip: text;
     background-clip: text;
 }

 .left-stat-label {
     font-size: 0.67rem;
     color: rgba(255, 255, 255, 0.35);
     font-weight: 600;
     margin-top: 0.2rem;
 }

 /* Icônes décoratives flottantes */
 .deco-icons {
     position: absolute;
     inset: 0;
     z-index: 1;
     pointer-events: none;
     overflow: hidden;
 }

 .deco-icon {
     position: absolute;
     opacity: 0.04;
     font-size: 4rem;
     color: #fff;
     animation: floatA 10s ease-in-out infinite;
 }

 .deco-icon:nth-child(1) {
     top: 15%;
     right: 8%;
     font-size: 5rem;
     animation-delay: 0s;
 }

 .deco-icon:nth-child(2) {
     top: 42%;
     right: 14%;
     font-size: 3.5rem;
     animation-delay: 2s;
 }

 .deco-icon:nth-child(3) {
     bottom: 20%;
     right: 6%;
     font-size: 4.5rem;
     animation-delay: 4s;
 }

 .deco-icon:nth-child(4) {
     top: 65%;
     left: 5%;
     font-size: 3rem;
     animation-delay: 1s;
     opacity: 0.03;
 }

 /* ─── PANNEAU DROIT (formulaire) ─── */
 .right-panel {
     width: 480px;
     min-width: 420px;
     background: #f0f4f8;
     display: flex;
     flex-direction: column;
     justify-content: center;
     padding: 3rem 2.75rem;
     position: relative;
 }

 .form-header {
     margin-bottom: 2rem;
 }

 .form-eyebrow {
     font-size: 0.7rem;
     font-weight: 800;
     letter-spacing: 1.2px;
     text-transform: uppercase;
     color: var(--vert);
     margin-bottom: 0.5rem;
     display: flex;
     align-items: center;
     gap: 0.4rem;
 }

 .form-eyebrow::before {
     content: '';
     width: 18px;
     height: 2px;
     background: var(--vert);
     border-radius: 1px;
 }

 .form-title {
     font-family: 'Poppins', sans-serif;
     font-size: 1.6rem;
     font-weight: 800;
     color: #0f172a;
     line-height: 1.2;
     letter-spacing: -0.3px;
 }

 .form-subtitle {
     font-size: 0.8rem;
     color: #64748b;
     margin-top: 0.4rem;
 }

 /* Champs */
 .field-wrap {
     margin-bottom: 1.25rem;
 }

 .field-label {
     font-size: 0.8rem;
     font-weight: 700;
     color: #334155;
     display: flex;
     align-items: center;
     gap: 0.35rem;
     margin-bottom: 0.45rem;
 }

 .field-label i {
     color: var(--vert);
     font-size: 0.82rem;
 }

 .input-group-custom {
     position: relative;
 }

 .input-group-custom .field-icon {
     position: absolute;
     left: 0.9rem;
     top: 50%;
     transform: translateY(-50%);
     color: #94a3b8;
     font-size: 0.95rem;
     pointer-events: none;
     transition: color 0.2s;
     z-index: 2;
 }

 .input-group-custom input {
     width: 100%;
     background: #fff;
     border: 1.5px solid #e2e8f0;
     border-radius: 11px;
     padding: 0.7rem 2.6rem 0.7rem 2.6rem;
     font-size: 0.87rem;
     color: #0f172a;
     outline: none;
     transition: all 0.25s;
     font-family: 'Inter', sans-serif;
 }

 .input-group-custom input:focus {
     border-color: rgba(0, 158, 96, 0.4);
     box-shadow: 0 0 0 3px rgba(0, 158, 96, 0.09);
     background: #fff;
 }

 .input-group-custom input:focus+.field-icon,
 .input-group-custom:focus-within .field-icon {
     color: var(--vert);
 }

 .input-group-custom input::placeholder {
     color: #cbd5e1;
 }

 .toggle-pw {
     position: absolute;
     right: 0.9rem;
     top: 50%;
     transform: translateY(-50%);
     background: none;
     border: none;
     cursor: pointer;
     color: #94a3b8;
     font-size: 0.9rem;
     padding: 0;
     transition: color 0.2s;
     z-index: 2;
 }

 .toggle-pw:hover {
     color: var(--vert);
 }

 /* Rôle selector */
 .role-selector {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 0.6rem;
     margin-bottom: 1.25rem;
 }

 .role-option {
     border: 1.5px solid #e2e8f0;
     border-radius: 10px;
     padding: 0.6rem 0.75rem;
     cursor: pointer;
     transition: all 0.2s;
     display: flex;
     align-items: center;
     gap: 0.55rem;
     background: #fff;
 }

 .role-option:hover {
     border-color: rgba(0, 158, 96, 0.3);
     background: rgba(0, 158, 96, 0.03);
 }

 .role-option.selected {
     border-color: var(--vert);
     background: rgba(0, 158, 96, 0.06);
     box-shadow: 0 0 0 3px rgba(0, 158, 96, 0.08);
 }

 .role-option input[type="radio"] {
     display: none;
 }

 .role-dot {
     width: 16px;
     height: 16px;
     border-radius: 50%;
     border: 2px solid #cbd5e1;
     flex-shrink: 0;
     transition: all 0.2s;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .role-option.selected .role-dot {
     border-color: var(--vert);
     background: var(--vert);
 }

 .role-option.selected .role-dot::after {
     content: '';
     width: 6px;
     height: 6px;
     border-radius: 50%;
     background: #fff;
 }

 .role-icon {
     font-size: 0.95rem;
 }

 .role-icon.admin {
     color: #dc2626;
 }

 .role-icon.manager {
     color: #92700a;
 }

 .role-icon.user {
     color: var(--bleu);
 }

 .role-icon.viewer {
     color: #64748b;
 }

 .role-text {
     font-size: 0.78rem;
     font-weight: 700;
     color: #334155;
     line-height: 1.2;
 }

 .role-desc {
     font-size: 0.62rem;
     color: #94a3b8;
     font-weight: 500;
 }

 /* Checkbox + lien */
 .form-options {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.5rem;
 }

 .check-label {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     cursor: pointer;
     font-size: 0.8rem;
     color: #475569;
     user-select: none;
 }

 .check-label input[type="checkbox"] {
     width: 16px;
     height: 16px;
     accent-color: var(--vert);
     cursor: pointer;
 }

 .forgot-link {
     font-size: 0.78rem;
     font-weight: 700;
     color: var(--vert);
     text-decoration: none;
     transition: color 0.2s;
 }

 .forgot-link:hover {
     color: var(--vert-dark);
     text-decoration: underline;
 }

 /* Bouton connexion */
 .btn-login {
     width: 100%;
     background: linear-gradient(135deg, var(--vert), #00c478);
     color: #fff;
     border: none;
     padding: 0.82rem 1.5rem;
     border-radius: 12px;
     font-size: 0.9rem;
     font-weight: 800;
     font-family: 'Poppins', sans-serif;
     letter-spacing: 0.3px;
     cursor: pointer;
     transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
     box-shadow: 0 8px 20px rgba(0, 158, 96, 0.28);
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.6rem;
     position: relative;
     overflow: hidden;
 }

 .btn-login::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;
 }

 .btn-login:hover::before {
     width: 400px;
     height: 400px;
 }

 .btn-login:hover {
     transform: translateY(-3px);
     box-shadow: 0 12px 28px rgba(0, 158, 96, 0.38);
 }

 .btn-login:active {
     transform: translateY(0);
 }

 .btn-login .spinner {
     width: 18px;
     height: 18px;
     border: 2px solid rgba(255, 255, 255, 0.4);
     border-top-color: #fff;
     border-radius: 50%;
     animation: spin 0.7s linear infinite;
     display: none;
 }

 /* Séparateur */
 .divider {
     display: flex;
     align-items: center;
     gap: 0.75rem;
     margin: 1.25rem 0;
 }

 .divider span {
     font-size: 0.73rem;
     color: #94a3b8;
     font-weight: 600;
     white-space: nowrap;
 }

 .divider::before,
 .divider::after {
     content: '';
     flex: 1;
     height: 1px;
     background: #e2e8f0;
 }

 /* Accès rapide visiteur */
 .guest-btn {
     width: 100%;
     background: #fff;
     border: 1.5px solid #e2e8f0;
     color: #334155;
     border-radius: 12px;
     padding: 0.72rem 1.5rem;
     font-size: 0.84rem;
     font-weight: 700;
     cursor: pointer;
     transition: all 0.25s;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.55rem;
 }

 .guest-btn:hover {
     border-color: rgba(58, 117, 196, 0.35);
     background: rgba(58, 117, 196, 0.04);
     color: var(--bleu);
     transform: translateY(-2px);
     box-shadow: 0 4px 14px rgba(58, 117, 196, 0.12);
 }

 /* Alerte d'erreur */
 .alert-login {
     background: rgba(239, 68, 68, 0.08);
     border: 1px solid rgba(239, 68, 68, 0.2);
     border-radius: 10px;
     padding: 0.75rem 1rem;
     font-size: 0.82rem;
     font-weight: 600;
     color: #dc2626;
     display: flex;
     align-items: center;
     gap: 0.5rem;
     margin-bottom: 1.25rem;
     display: none;
 }

 /* Pied de formulaire */
 .form-footer {
     margin-top: 2rem;
     padding-top: 1.25rem;
     border-top: 1px solid #e9eef5;
     text-align: center;
 }

 .form-footer p {
     font-size: 0.72rem;
     color: #94a3b8;
 }

 .form-footer a {
     color: var(--vert);
     font-weight: 700;
     text-decoration: none;
 }

 .form-footer a:hover {
     text-decoration: underline;
 }

 .security-badges {
     display: flex;
     justify-content: center;
     gap: 1rem;
     margin-top: 1rem;
 }

 .sec-badge {
     display: flex;
     align-items: center;
     gap: 0.3rem;
     font-size: 0.65rem;
     color: #94a3b8;
     font-weight: 600;
 }

 .sec-badge i {
     color: var(--vert);
     font-size: 0.75rem;
 }

 /* ─── MOBILE ─── */
 @media (max-width: 768px) {
     .left-panel {
         display: none;
     }

     .right-panel {
         width: 100%;
         min-width: 0;
         padding: 2rem 1.5rem;
     }

     .login-wrapper {
         justify-content: center;
     }
 }

 @media (max-width: 480px) {
     .right-panel {
         padding: 1.5rem 1.25rem;
     }

     .role-selector {
         grid-template-columns: 1fr;
     }
 }