/* ========================= */
/* Styles globaux            */
/* ========================= */
body {
    font-family: Arial, sans-serif; /* Police par défaut */
    margin: 0;
    background-color: white; /* Fond blanc */
    color: #000; /* Texte noir */
}

.container {
    padding: 40px 60px; /* Espacement intérieur */
}

/* ========================= */
/* Header                    */
/* ========================= */
header {
    background-color: white;
    color: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: relative;
}

.logo {
    height: 70px; /* Taille du logo */
}

.header-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centre le bouton dans le header */
    background-color: #001F5B;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    padding: 14px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Ombre */
    cursor: default; /* Pas de pointeur car non cliquable */
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Espacement entre les éléments */
    color: #222; /* Couleur du texte utilisateur */
    font-size: 14px;
    text-align: center;
}

.avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%; /* Avatar circulaire */
}

/* ========================= */
/* Footer                    */
/* ========================= */
footer {
    background-color: #001F5B; /* Bleu foncé */
    height: 60px;
    margin-top: auto; /* Place le footer en bas */
}

/* ========================= */
/* Main - Zone principale   */
/* ========================= */
main {
    display: flex;
    justify-content: space-between;
    padding: 50px 40px;
    gap: 50px; /* Espacement entre le formulaire et l'aperçu */
}

/* ========================= */
/* Formulaire                */
/* ========================= */
.formulaire {
    flex: 1;
    max-width: 450px; /* Largeur maximale du formulaire */
}

.formulaire label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.formulaire input[type="text"],
.formulaire input[type="number"],
.formulaire select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px; /* Coins arrondis */
}

.formulaire input[type="checkbox"] {
    margin-top: 15px;
}

.formulaire button {
    margin-top: 25px;
    padding: 12px 20px;
    background-color: #001F5B; /* Bleu foncé */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

/* ========================= */
/* Aperçu de la demande      */
/* ========================= */
.preview {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex: 1;
}

.preview-card {
    background-color: #f4f4f4; /* Fond gris clair */
    padding: 25px;
    border-radius: 20px;
    width: 320px;
    text-align: left;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); /* Ombre */
    position: relative;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 14px;
    padding: 0 5px;
}

.preview-id {
    color: #333; /* Couleur de l'ID de la proposition */
}

.preview-ville {
    color: #555; /* Couleur de la ville */
}

.preview-icon-box {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.preview-icon {
    width: 70px;
    height: 70px; /* Taille de l'icône de formation */
}

.preview-nom {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}

/* ========================= */
/* Autocomplétion            */
/* ========================= */
.autocomplete-wrapper {
    position: relative;
}

#autocomplete-formation {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none; /* Pas de bordure supérieure pour se connecter au champ */
    max-height: 200px;
    overflow-y: auto; /* Défilement si trop d'éléments */
    z-index: 10; /* Au-dessus des autres éléments */
    border-radius: 0 0 10px 10px;
}

.suggestions div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestions div:hover {
    background-color: #f2f2f2; /* Surbrillance au survol */
}

/* ========================= */
/* Modale                    */
/* ========================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Fond semi-transparent */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999; /* Au-dessus de tout */
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Ombre prononcée */
}

.modal-content h3 {
    margin-top: 0;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

/* ========================= */
/* Groupes de familles      */
/* ========================= */
.famille-group {
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.famille-group:hover {
    background-color: #f2f2f2; /* Surbrillance au survol */
}

.famille-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: #f0f0f0; /* En-tête de groupe */
}

.famille-header img.famille-icon {
    width: 18px;
    height: 18px; /* Icône de famille */
}

.famille-group div:not(.famille-header) {
    padding: 8px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.famille-group div:not(.famille-header):hover {
    background-color: #dcdcdc; /* Surbrillance des éléments de groupe */
}

/* ========================= */
/* Bouton demi-journée       */
/* ========================= */
.btn-toggle-demi {
    background-color: #eee; /* Fond gris clair par défaut */
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.75em;
    line-height: 1;
    transition: all 0.2s ease; /* Animation */
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* Empêche le retour à la ligne */
}

.btn-toggle-demi.active {
    background-color: #d9534f; /* Rouge quand actif */
    color: white;
    border-color: #d43f3a;
}

