:root {
    --color-primary: #F39144;
    --color-secondary: #c86f25;
    --page-padding: 15px;
    --color-text: #FbFbFF;
}

/* Pleine page avec bordure blanche */
body {
    background-color: #ffffff;
    height: 100vh;
    margin: 0;
    padding: var(--page-padding);
    display: flex;
    transition: background-color 0.3s ease;
}

/* Mode sombre pour le tour de page */
[data-bs-theme="dark"] body {
    background-color: #212529;
}

.main-container {
    width: 100%;
    display: flex;
    background-color: var(--bs-body-bg);
    border-radius: 0;
}

/* Panneau Gauche */
.left-panel {
    flex: 0 0 50%;
    background: linear-gradient(145deg, #a34e00 0%, #f39144 45%, #ffab40 100%);

    /* L'image remplace le dégradé */
    /*background-image: url("../images/bg_maged.png");*/

    /* Propriétés essentielles pour l'image */
    background-size: cover; /* L'image occupe tout l'espace sans se déformer */
    background-position: center; /* L'image est centrée dans le panneau */
    background-repeat: no-repeat; /* Évite que l'image ne se répète si elle est petite */

    border-radius: 8px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
}

.left-panel .text-bottom h2 {
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1.2;
    max-width: 450px;
    margin-top: 10px;
}

.glass-card {
    /* Fond blanc très transparent */
    background: rgba(255, 255, 255, 0.1);

    /* L'effet de flou (important) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Pour la compatibilité Safari */


    border-radius: 8px;
    padding: 20px;

    /* Ombre légère pour donner de la profondeur */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

}

/* Panneau Droit */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
}

.brand-icon-mini {
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Style des inputs injectés */
.form-content input {
    width: 100%;
    /*border: 1px solid var(--bs-border-color);*/
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 15px;
}

.btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espace automatique entre le texte et l'avion */

    background: linear-gradient(to right, var(--color-primary) 50%, var(--color-secondary) 100%);
    background-size: 200% 100%;
    background-position: left bottom; /* On commence par la gauche (primary) */

    color: var(--color-text);
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;

    transition: all 0.4s ease-out;
    cursor: pointer;
}


.btn-main:hover {
    background-position: right bottom;

    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.02);
}

.btn-main i {
    transition: transform 0.3s ease; /* Transition spécifique pour l'icône */
}

.btn-main:hover i {
    transform: rotate(45deg); /* L'avion décolle ! */
}

.btn-main:active {
    opacity: 0.8;
    transform: scale(0.97);
}

/* État de base de l'icône */
.logo-top i.fa-boxes-stacked {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet rebondi sympa */
}

/* Quand on survole le bouton principal, on cible la carotte */
/* Note : Cela nécessite que le bouton soit "avant" ou que l'on survole le parent */
.main-container:has(.btn-main:hover) .logo-top i.fa-boxes-stacked {
    transform: scale(1.5) rotate(10deg);
    /*color: #ff6b6b; !* Optionnel : change la couleur pour attirer l'oeil *!*/
    color: var(--color-primary);
}

.forgot-pass {
    display: block;
    text-align: right;
    margin-top: -10px;
    text-decoration: none;
    color: var(--color-primary);
    font-size: 0.9rem;
    transition: all .2s ease;
}

.forgot-pass:hover {
    opacity: 0.8;
    transform: scale(0.98);
    text-decoration: underline;
}

@media (max-width: 991px) {
    body {
        padding: 0;
    }

    .left-panel {
        display: none;
    }
}


/*===================
  CHEVRON SELECT
====================*/

/* 1. Retirer la flèche par défaut de Bootstrap */
.form-floating select.form-select,
.form-floating select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important; /* Enlève le SVG de Bootstrap */
    padding-right: 2.5rem !important; /* Laisse de la place pour l'icône */
}

/* 2. Positionner votre chevron Font Awesome */
.select-chevron {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%); /* Centre verticalement */
    pointer-events: none; /* L'icône ne doit pas bloquer le clic sur le select */
    color: #6c757d; /* Couleur grise type Bootstrap */
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

/* Optionnel : faire tourner le chevron quand on clique (si le select est focus) */
.form-floating select:focus ~ .select-chevron {
    transform: translateY(-50%) rotate(180deg);
    color: var(--color-text); /* Change la couleur au focus si vous voulez */
}


/*=========================
    ANIMATION ICON ACTIVE LOAD
==========================*/

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Au-dessus de tout */
    opacity: 0;
    pointer-events: none;
    overflow: hidden; /* Empêche les barres de défilement */
    transition: opacity 0.1s ease;
}

#transition-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Bloque l'écran */
}

/* 1. L'icône Carotte qui fait le FOND (unifié et coloré) */
#transition-overlay i.carrot-background {
    color: var(--color-secondary);
    font-size: 5rem;
    position: absolute;
    transform: scale(0) rotate(0deg);
    opacity: 0;
}

#transition-overlay.active i.carrot-background {
    /* Animation totale ~1.5s, zoom massif cubic-bezier pour l'effet flash */
    animation: carrotFillAndTurn 1.2s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

/* 2. Le Conteneur du Logo SVG FINAL */
#transition-overlay .final-logo-container {
    position: relative;
    z-index: 2; /* Au-dessus de la carotte qui zoom */
    opacity: 0; /* Caché initialement */
    transform: scale(0.8); /* Légèrement plus petit pour l'effet d'apparition */
    max-width: 80%; /* Pour mobile */
}

#transition-overlay.active .final-logo-container {
    /* Apparaît après 1s, quand l'écran est déjà rempli par la couleur unifiée */
    animation: fadeInFinalLogo 0.5s ease-out 0.7s forwards;
}

/* Le SVG lui-même */
#transition-overlay .final-logo-img {
    width: auto;
    height: auto;
    max-height: 250px; /* Taille maximale au centre */
}

/* --- Keyframes des Animations --- */

/* Animation de la Carotte-Fond (Zoom + Rotation + Remplissage) */
@keyframes carrotFillAndTurn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    30% {
        transform: scale(1.5) rotate(720deg); /* Tourne vite sur place */
        opacity: 1;
    }
    /* Zoom massif exponentiel : le centre couvre un écran 4K de couleur unie */
    100% {
        transform: scale(400) rotate(1080deg);
        opacity: 1;
    }
}

/* Animation du Logo Final SVG (Fondu + Léger Zoom) */
@keyframes fadeInFinalLogo {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1); /* Taille normale */
    }
}