/* Variables pour une maintenance facile et un look "Aéro" */

:root {
    --primary-blue: #1a3c5e;
    --accent-gold: #d4af37; /* Le doré pour le liseré */
    --sky-blue: #f8fbff;
    --text-dark: #2d3436;
    --white: #d5d5d8;
    --gray-steel: #999ea1;
    --header-bg: #2c3e50;
}

html, body { 
    height: 100%; 
    margin: 0; 
}
body { 
    display: flex; 
    flex-direction: column; 
    font-family: 'Segoe UI', sans-serif; 
    background-color: #f4f7f6; 
}

/* --- Header : Logo à gauche et Titre aligné --- */
header {
    background-color: var(--header-bg);
    color: var(--white);
    /* Augmentation du padding vertical pour l'espace haut/bas */
    padding: 20px 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    /* Ajout du liseré doré en bas du header */
    border-bottom: 3px solid var(--accent-gold); 
}

.logo {
    /* Gestion de la taille et de l'espacement interne du logo */
    height: 40px; 
    width: auto;
    position: absolute;
    left: 25px;
    /* Le padding ici crée l'espace interne si le SVG est collé aux bords */
    padding: 5px 0; 
}

header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
}

h2 {
    text-align: center; /* Centre tous les <h2> de l'application */
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}
h3 {
    text-align: center; /* Centre tous les <h3> de l'application */
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

/* Masque les flèches sur Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Masque les flèches sur Firefox */
input[type=number] {
  appearance: textfield; /* Propriété standard (VS Code va l'adorer) */
  -moz-appearance: textfield; /* Sécurité pour les anciennes versions de Firefox */
}

/* --- Container & Grille --- */
.container { flex: 1; padding: 20px; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; }

.card { 
    background: var(--white); 
    border-radius: 12px; 
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

/* --- Boutons : Correction des liens vers aspect bouton --- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn.secondary { 
    background-color: var(--gray-steel);
    color: var(--text-dark);
}


.btn:hover { filter: brightness(0.9); transform: translateY(-1px); }

/* --- Grille Pilotes --- */
.pilot-grid {
    display: flex; /* Passage en flex pour faciliter le centrage des éléments */
    flex-wrap: wrap;
    justify-content: center; /* Centre les cartes pilotes horizontalement */
    gap: 15px;
    margin-top: 20px;
}

/* --- Alignement des boutons d'action du pilote --- */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-admin-key {
    background-color: var(--accent-gold, #d4af37);
    color: #2c3e50 !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-admin-key:hover {
    background-color: #bfa030;
}
/*  
.welcome-card {
    background-color: var(--white);
    border-left: 4px solid var(--accent-gold);
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-blue);
}
*/

/* Ajustement responsive mobile - OPTION 1 (Empilement vertical uniforme) */
@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }
    .section-header > div {
        width: 100%;
    }
    .header-actions {
        width: 100%;
        flex-direction: column; /* On empile les boutons les uns sous les autres */
        gap: 10px; /* Espace identique et propre entre chaque bouton */
    }
    .header-actions .btn-edit-profile {
        width: 100%; /* Tous les boutons font exactement la même largeur */
        box-sizing: border-box;
        justify-content: center; 
        margin-bottom: 0; 
    }

    .card.auth-card {
        padding: 1.2rem;               /* Réduit légèrement les marges internes de la carte */
        margin: 20px auto !important;  /* Marge un peu plus faible sur mobile tout en restant centré */
    }

    /* Le texte du bouton étant très long, on empile les boutons l'un sur l'autre  */
    .card.auth-card .form-actions {
        grid-template-columns: 1fr;   
        gap: 12px;                      
    }
   

    /* On force la grille à passer sur 1 seule colonne de large */
    .form-actions {
        grid-template-columns: 1fr !important;
        display: grid !important; /* Assure le comportement en grille */
        gap: 12px;                /* Espace confortable entre les boutons */
        margin-top: 25px;
    }

    /* Optimisation de la taille des boutons pour les écrans tactiles */
    .form-actions .btn {
        width: 100%;
        box-sizing: border-box;
        padding: 14px 15px;       /* Boutons un peu plus épais, plus faciles à cibler au doigt */
        font-size: 0.95rem;       /* Lisibilité parfaite du texte */
        text-align: center;
        justify-content: center;  /* Centre bien les icônes/textes à l'intérieur */
    }
}

/* --- Grille Administration centrée --- 
.admin-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
*/

/* --- Alignement horizontal et uniforme de la zone d'administration (Accueil) --- */
/* --- Zone Administration de l'Accueil (Responsive Nettoyé) --- */
.admin-grid {
    display: flex;
    flex-direction: column; /* Par défaut sur smartphone : empilement vertical */
    gap: 12px;
    margin-top: 20px;
}

.admin-grid .btn {
    display: inline-flex;
    align-items: center;    /* Centre le texte verticalement */
    justify-content: center;/* Centre le texte horizontalement */
    text-align: center;
    padding: 15px 15px;
    box-sizing: border-box;
    height: auto;          /* Hauteur naturelle et compacte sur mobile */
}

.pilot-card {
    background: var(--sky-blue);
    border: 2px solid var(--primary-blue);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    min-width: 130px;
    transition: transform 0.2s;
}
.pilot-card:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   ALIGNEMENT DES CASES À COCHER (Formulaire Pilote)
   ========================================================================== */

.field-est_instructeur,
.field-classe_1_paramoteur, 
.field-classe_2_pendulaire, 
.field-classe_3_multiaxe, 
.field-classe_4_autogire, 
.field-classe_5_aerostat, 
.field-classe_6_helicoptere {
    flex-direction: row-reverse !important; /* Met la case à cocher à gauche du texte */
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 4px 0;
}

.field-est_instructeur input,
.field-classe_1_paramoteur input, 
.field-classe_2_pendulaire input, 
.field-classe_3_multiaxe input, 
.field-classe_4_autogire input, 
.field-classe_5_aerostat input, 
.field-classe_6_helicoptere input {
    width: 18px !important;
    height: 18px !important;
    margin: 0;
    cursor: pointer;
}

.field-est_instructeur label,
.field-classe_1_paramoteur label, 
.field-classe_2_pendulaire label, 
.field-classe_3_multiaxe label, 
.field-classe_4_autogire label, 
.field-classe_5_aerostat label, 
.field-classe_6_helicoptere label {
    margin-bottom: 0 !important;
    cursor: pointer;
    font-weight: 500;
}

/* --- Mise en forme des Formulaires --- */
.form-container, .container-mobile {
    max-width: 600px;
    margin: 20px auto;
    width: 95%;
}

.aero-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Stylisation des labels 
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-blue);
}
*/

/* Stylisation des champs (input, select, textarea) */
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-steel);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
/* On cible spécifiquement les checkboxes pour qu'elles ne prennent pas 100% de largeur */
.form-group input[type="checkbox"] {
    width: auto;         /* Annule le width 100% */
    margin-right: 10px;  /* Espace entre la case et le texte */
    cursor: pointer;
    transform: scale(1.2); /* Rend la case un peu plus grosse pour le tactile */
    vertical-align: middle;
}

/* Alignement du label quand il accompagne une checkbox */
.form-group label {
    display: block;
    margin-top: 13px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Optionnel : si vous voulez que le label et la case soient sur la même ligne */
.form-group:has(input[type="checkbox"]) {
    display: flex;
    flex-direction: row-reverse; /* Met la case à gauche du texte */
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.form-group:has(input[type="checkbox"]) label {
    margin-bottom: 0; /* Aligne verticalement avec la case */
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}
.form-control {
    width: 100%;
    padding: 3px;
    /* border: 2px solid var(--secondary-gray); */
    border: 1px solid var(--header-bg);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Important pour le padding */
}

.form-control:focus {
    border-color: var(--primary-blue);
    outline: none;
    background-color: #fff;
}

/* Boutons spéciaux pour le profil */
.btn-edit-profile {
    background-color: var(--accent-gold);
    color: var(--primary-blue);
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-edit-profile:hover {
    background-color: #c5a028;
}
/* Bouton spécifique pour l'ajout d'un pilote par l'administrateur */
.btn-admin-add {
    background-color: #34495e;
    color: white !important; /* Assure que le texte reste blanc malgré les règles globales sur les liens */
    transition: background-color 0.2s;
}
.btn-quitte {
    background-color: #5d5d5e;
    color: white !important;
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid rgb(246, 4, 4);
}
.btn-admin-add:hover {
    background-color: #2c3e50; /* Un ton plus foncé au survol pour un retour visuel propre */
}
/* Gestion des erreurs Django */
.error-tag {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Alignement des boutons d'action */
.form-actions, .button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* --- Styles pour choix_avion.html --- */

.section-title {
    margin: 0;
}

.pilot-info {
    color: var(--text-dark);
}

/* Style pour la carte "Autre / Extérieur" */
.card-external {
    border-style: dashed !important;
    background-color: #f0f8ff !important;
}

/* Espacement pour le bouton de retour en bas de carte */
.card .form-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background-color: var(--gray-steel);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.vols-liste {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vol-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--gray-steel);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s;
}

.vol-item:hover {
    border-color: var(--accent-gold);
    transform: translateX(5px);
}

.vol-duree {
    font-weight: bold;
    color: var(--primary-blue);
}

.vol-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}
.detail-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-steel);
    text-transform: uppercase;
    font-weight: bold;
}
.detail-group p {
    margin: 5px 0 0 0;
    font-size: 1.1rem;
    color: var(--primary-blue);
}
.highlight-text {
    font-size: 1.4rem !important;
    font-weight: bold;
    color: var(--accent-gold) !important;
}
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.badge-success { 
    background: #e6fffa; 
    color: #2ecc71; 
    border: 1px solid #2ecc71; 
}
.badge-warning { 
    background: #fffaf0; 
    color: #f39c12; 
    border: 1px solid #f39c12; }
.observations-box {
    background: var(--sky-blue);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.alert-warning-aero {
    background-color: #ffeaa7; 
    color: #d63031; 
    padding: 10px; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    border-left: 5px solid #d63031;
}
.alert-danger-aero {
    background-color: #ffeaa7; 
    color: #e17055; 
    padding: 10px; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    border-left: 5px solid #e17055;
}
.mt-20 {
    margin-top: 12px !important;
}

/* --- Historique des Corrections Réglementaires --- */
.history-card {
    margin-top: 20px;
    border-left: 4px solid #e74c3c;
    background-color: #fff5f5;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.history-title {
    font-size: 1rem;
    color: #c0392b;
    margin-top: 0;
    margin-bottom: 15px;
}

.history-list {
    font-size: 0.9rem;
    padding-left: 0;
    margin-bottom: 0;
    list-style-type: none;
}

.history-item {
    margin-bottom: 15px;
    border-bottom: 1px dashed #fab1a0;
    padding-bottom: 10px;
}

.history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.history-content {
    color: #2c3e50;
    font-family: sans-serif;
    line-height: 1.5;
    display: block;
    margin-top: 8px;
}

/* --- Styles pour l'annulation de vol (Soft Delete) --- */
.card-danger {
    border-top: 4px solid #d63031;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    background: white;
    border-radius: 8px;
}
.cancel-title {
    color: #c0392b;
    margin-top: 0;
    font-size: 1.4rem;
}
.cancel-text {
    color: #2c3e50;
}
.impact-box {
    background-color: #fff5f5;
    border-left: 4px solid #e74c3c;
    padding: 10px 15px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #c0392b;
}
.separator-light {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}
.form-label-bold {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}
.textarea-custom {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-family: inherit;
    box-sizing: border-box;
}
.flex-actions-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.btn-cancel-back {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    line-height: 1.5;
}
.btn-danger-aero {
    background-color: #d63031;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-danger-aero:hover {
    background-color: #c0392b;
}

/* --- Écran intermédiaire Choix Action Vol --- */
.action-choice-container {
    max-width: 600px; 
    margin: 40px auto; 
    text-align: center;
}

.action-choice-card {
    padding: 30px;
}

.action-choice-subtitle {
    color: var(--gray-steel); 
    margin-bottom: 30px;
}

.action-choice-accent {
    color: var(--primary-blue);
}

.action-buttons-stack {
    display: flex; 
    flex-direction: column; 
    gap: 20px;
}

.btn-direct-flight {
    width: 100%; 
    padding: 15px; 
    font-size: 1.1rem; 
    background-color: #2ecc71; 
    border-color: #27ae60;
    color: white;
}

.btn-direct-flight:hover {
    background-color: #27ae60;
}

.btn-past-flight {
    padding: 15px; 
    font-size: 1.1rem; 
    text-decoration: none; 
    display: block; 
    background-color: var(--primary-blue); 
    color: white;
}

.btn-back-gray {
    background: #95a5a6; 
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
}

.btn-back-gray:hover {
    background: #7f8c8d;
}

/* --- Écran Vol En Cours (Chrono) --- */
.chrono-container {
    text-align: center;
    padding: 30px 20px;
}

.status-pulse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fff5f5;
    color: #e74c3c;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #ffcccc;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.chrono-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    background: #eef2f7;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 2px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
    margin: 15px 0 30px 0;
    min-width: 250px;
}

.btn-stop-flight {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background-color: #d63031;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-stop-flight:hover {
    background-color: #c0392b;
}

.actions-chrono {
    text-align: center;
    margin-top: 25px;
}

.btn-retour-vol {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #7f8c8d;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.btn-retour-vol:hover {
    background-color: #95a5a6;
}

/* --- Styles spécifiques au Formulaire de Clôture --- */
.cloture-container {
    max-width: 600px; 
    margin: 40px auto;
}

.cloture-card {
    padding: 30px;
}

.cloture-subtitle {
    margin-bottom: 5px;
}

.cloture-badge {
    margin-bottom: 25px; 
    display: inline-block;
}

.cloture-grid {
    grid-template-columns: 1fr 1fr; 
    background: #f8fbff; 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    gap: 15px; 
    text-align: left;
}

.cloture-text-bold {
    font-size: 1.1rem; 
    font-weight: bold; 
    margin: 2px 0 0 0;
}

.cloture-text-success {
    color: #2ecc71;
}

.cloture-text-normal {
    font-size: 1rem; 
    margin: 2px 0 0 0;
}

.cloture-form-group {
    margin-bottom: 20px; 
    text-align: left;
}

.cloture-label {
    display: block; 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: var(--primary-blue);
}

.cloture-error {
    color: #d63031; 
    font-size: 0.85rem; 
    margin-top: 5px;
}

.cloture-actions {
    margin-top: 30px;
}

.btn-submit-cloture {
    background-color: #2ecc71; 
    border-color: #27ae60; 
    width: 100%; 
    padding: 12px; 
    font-size: 1.1rem;
}

/* --- Styles de la Fiche d'Information Réglementaire --- */
.fiche-container {
    max-width: 700px;
    margin: 30px auto;
}

.fiche-card {
    padding: 30px;
}

.fiche-header {
    text-align: center;
    margin-bottom: 25px;
}

.fiche-icon {
    font-size: 2.5rem;
}

.fiche-title {
    margin-top: 10px;
}

.legal-text-box {
    background: #ffffff;
    border: 1px solid var(--gray-steel);
    padding: 20px;
    border-radius: 6px;
    max-height: 350px;
    overflow-y: scroll;
    font-size: 0.95rem;
    text-align: left;
    line-height: 1.5;
    color: #2c3e50;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.legal-section-title {
    color: var(--primary-blue);
    margin-top: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.legal-section-title:first-child {
    margin-top: 0;
}

.fiche-form-group {
    text-align: left;
    margin-bottom: 20px;
}

.fiche-form-label {
    font-weight: bold;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 8px;
}

.engagement-box {
    text-align: left;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-gold);
    margin-bottom: 25px;
}

.engagement-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c3e50;
}

/* --- Bandeau d'alerte Vol En Cours --- */
/* ******* */
.banner-vol-encours {
    background-color: #e74c3c;
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
    border-bottom: 2px solid #c0392b;
    
    /* 📱 Améliorations spécifiques Mobile & Accessibilité */
    position: sticky;
    top: 0;
    flex-wrap: wrap; /* Permet au lien du chrono de passer en dessous sur les petits écrans */
}

.banner-vol-encours a {
    color: #fff;
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.banner-vol-encours a:hover {
    background-color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

/* Animation optionnelle pour l'icône flash rouge */
.pulse-icon {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* --- Styles spécifiques à l'authentification Club --- */
.auth-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 0;
}
/*  
.auth-card {
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.auth-card {
    max-width: 500px;         
    width: 100%;              
    margin: 30px auto;        
    box-sizing: border-box;   
}
*/
/* On cible .card.auth-card pour augmenter la précision et le rendre prioritaire */
.card.auth-card {
    max-width: 500px;                 /* Largeur élégante et compacte sur ordinateur */
    width: 100%;                      /* S'adapte sur les écrans intermédiaires */
    margin: 40px auto !important;     /* 40px haut/bas, et 'auto' + '!important' FORCENT le centrage horizontal */
    box-sizing: border-box;           /* Inclut les paddings dans le calcul de la largeur */
    display: block;                   /* Assure le comportement de bloc pour le centrage auto */
}

.auth-card h2 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.form-help {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    opacity: 0.8;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.alert-danger {
    background-color: #fde8e8;
    color: #c0392b;
    border: 1px solid #f8b4b4;
}
/* --- Indicateurs de champs obligatoires et erreurs de formulaires --- */
.required-asterisk {
    color: var(--error-color, #e53e3e);
    font-weight: bold;
    margin-left: 2px;
}
.field-error {
    color: var(--error-color, #e53e3e);
    font-size: 0.95rem;
    margin-top: 5px;
    text-align: left;
    font-weight: 500;
}

/* --- Bouton d'alerte / Déconnexion --- */
.btn.danger {
    margin-top: 50px;
    /* background-color: #e74c3c; */
    background-color: #0227bac6;
    color: #ffffff;
    border: 1px solid #c0392b;
    /* min-height: 50px; */
}

.btn.danger:hover {
    background-color: #c0392b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* --- PAGE CARNET DE VOL ACCESSIBLE --- */
.carnet-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
}

.carnet-header {
    margin-bottom: 25px;
    text-align: center;
}

.carnet-header h2 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.pilot-name {
    font-size: 1.2rem;
    color: #4a5568;
}

/* --- BLOCS INSTRUMENTS (COMPTEURS) --- */
.instruments-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.instrument-card {
    flex: 1;
    min-width: 250px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.instrument-label {
    display: block;
    font-size: 0.95rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.instrument-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #2d3748;
}

/* Mise en valeur du Grand Total (Couleur Aero Blue) */
.total-general-card {
    border: 3px solid var(--primary-blue);
    background-color: #ebf8ff;
}

.total-general-card .instrument-label {
    color: var(--primary-blue);
}

.total-general-card .instrument-value {
    color: var(--primary-blue);
    font-size: 2.2rem; /* Encore plus gros */
}

/* --- DETAILS PAR NATURE --- */
.nature-card {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
}

.nature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.nature-item {
    font-size: 1.1rem;
    background: #f7fafc;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-gold);
}

/* --- TABLEAU TYPE CARNET PAPIER --- */
.logbook-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.logbook-card h3 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.table-responsive {
    width: 100%;
    overflow-x: auto; /* Permet de glisser le tableau sur petit smartphone */
}

.logbook-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1.05rem; /* Confort de lecture augmenté */
}

.logbook-table th {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 12px 15px;
    font-weight: 600;
    border: 1px solid #34495e;
}

.logbook-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

/* Alternance des lignes pour guider l'œil horizontalement */
.logbook-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.cell-bold {
    font-weight: 700;
}

.cell-immat {
    font-weight: bold;
    color: var(--primary-blue);
    letter-spacing: 0.5px;
}

.cell-duration {
    font-weight: bold;
    color: #27ae60;
    text-align: right;
    padding-right: 25px !important;
}

.table-empty {
    text-align: center;
    color: #718096;
    padding: 30px !important;
    font-style: italic;
}

/* --- BOUTON RETOUR GEANT --- */
.btn-large-return {
    display: inline-block;
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #718096;
    color: white !important;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    margin: 20px auto 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
}

.btn-large-return:hover {
    background-color: #4a5568;
}

/* --- BARRE DE PAGINATION ACCESSIBLE --- */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e2e8f0;
}

.btn-nav {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--primary-blue);
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: background-color 0.2s;
}

.btn-nav:hover {
    background-color: #2c3e50;
}

/* Style pour le bouton grisé s'il n'y a pas de page avant/après */
.btn-nav.disabled {
    background-color: #e2e8f0;
    color: #a0aec0 !important;
    cursor: not-allowed;
    box-shadow: none;
}

.page-indicator {
    font-size: 1.1rem;
    color: #4a5568;
}

/* Bouton d'action dans le tableau du carnet de vol */
.btn-table-action {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f1f5f9;
    color: var(--primary-blue) !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-table-action:hover {
    background-color: var(--primary-blue);
    color: white !important;
    border-color: var(--primary-blue);
}
.btn-table-action, .btn-table-action:hover, .btn-table-action:visited {
    text-decoration: none !important; /* Force la suppression du soulignement */
}

/* --- RESPONSIVE HEADER (ÉVITE LE CHEVAUCHEMENT) --- */
@media (max-width: 650px) {
    header {
        flex-direction: column; /* Aligne le logo et le titre verticalement */
        gap: 10px;              /* Ajoute un espace propre entre les deux */
        padding: 15px 10px;     /* Réduit un peu l'épaisseur du bandeau */
    }

    .logo {
        position: static;       /* Annule la position absolue pour revenir dans le flux */
        height: 35px;           /* Réduit légèrement la taille du logo sur mobile */
        padding: 0;
    }

    header h1 {
        font-size: 1.2rem;      /* Adapte la taille du texte à un écran de téléphone */
        letter-spacing: 1px;
    }
    .pagination-bar {
        flex-wrap: wrap;             /* Permet le passage à la ligne */
        justify-content: center;
        gap: 12px;
    }
    
    .pagination-bar .page-indicator {
        width: 100%;                 /* L'indicateur "Page X sur Y" prend toute la largeur */
        text-align: center;
        order: -1;                   /* On le place au-dessus des boutons */
        margin-bottom: 5px;
    }
    
    .pagination-bar .btn-nav {
        flex: 1;                     /* FORCE les deux boutons à avoir exactement la même taille (50/50) */
        text-align: center;
        padding: 10px 5px;
        font-size: 0.9rem;
        white-space: nowrap;         /* Évite que le texte saute à la ligne interne */
    }
}

/* --- 2. Fix pour le Tableau -> Transformation en flux de cartes sur Mobile --- */
@media (max-width: 768px) {
    
    /* Désactivation de la structure de tableau classique */
    .logbook-table thead {
        display: none;               /* On cache les en-têtes de colonnes devenus inutiles */
    }
    
    .logbook-table, 
    .logbook-table tbody, 
    .logbook-table tr {
        display: block;              /* On transforme les lignes en blocs empilés */
        width: 100%;
    }
    
    /* Chaque ligne de vol devient une "Carte" indépendante */
    .logbook-table tr {
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        position: relative;          /* Indispensable pour caler la loupe de manière absolue */
        box-sizing: border-box;
        box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    }
    
    /* Retouche des cellules pour les empiler proprement */
    .logbook-table td {
        display: block;
        padding: 5px 0;
        border: none !important;     /* Supprime les bordures de tableau standard */
        text-align: left;
        color: var(--text-dark);
    }
    
    /* --- Mise en page stylisée des informations de la carte --- */
    
    /* Date du vol */
    .logbook-table td.cell-bold {
        font-size: 1.1rem;
        color: var(--primary-blue);
        display: inline-block;       /* Se met côte à côte avec l'immatriculation */
        margin-right: 10px;
    }
    
    /* Immatriculation de la machine */
    .logbook-table td.cell-immat {
        display: inline-block;       /* Se met côte à côte avec la date */
        background: #eef2f7;
        padding: 2px 8px;
        border-radius: 4px;
        font-weight: bold;
    }
    
    /* Parcours (Départ ➔ Arrivée) */
    .logbook-table td:nth-child(3) {
        font-weight: 600;
        font-size: 1.05rem;
        margin: 4px 0;
    }
    
    /* Nature du vol (ex: Instruction, Solo...) : On lui rajoute un label automatique */
    .logbook-table td:nth-child(4)::before {
        content: "Nature : ";
        color: #718096;
        font-weight: normal;
    }
    
    /* Temps de vol : On lui rajoute un label automatique et on le colore */
    .logbook-table td.cell-duration {
        font-weight: bold;
        color: var(--primary-blue);
    }
    .logbook-table td.cell-duration::before {
        content: "Durée : ";
        color: #718096;
        font-weight: normal;
    }
    
    /* --- Positionnement de la loupe d'action --- */
    /* On la coince idéalement en haut à droite de la carte, parfait pour le pouce ! */
    .logbook-table td:last-child {
        position: absolute;
        top: 15px;
        right: 15px;
        padding: 0;
    }
    
    .logbook-table .btn-table-action {
        padding: 10px 14px;
        font-size: 1.1rem;
        background-color: var(--sky-blue);
        border: 1px solid var(--primary-blue);
        border-radius: 6px;
    }
}

/* Format Tablette (Écrans moyens - à partir de 600px) */
@media (min-width: 600px) {
    .admin-grid {
        display: grid;        
        grid-template-columns: repeat(2, 1fr); /* Grille équilibrée de 2x2 */
    }
}

/* Format Ordinateur / PC (Grands écrans - à partir de 1024px) */
@media (min-width: 1024px) {
    .admin-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* Force les 4 boutons sur la même ligne */
        grid-auto-rows: 1fr; /* Force une hauteur identique pour les 4 boutons alignés */
    }
}
/* --- Footer --- */
footer { 
    background-color: #2c3e50; 
    color: var(--gray-steel); 
    text-align: center; 
    padding: 15px; 
    font-size: 0.8rem; 
}

/* ==========================================================================
   MODULE : ESPACE ADMINISTRATION & BOUTONS SPECIFIQUES
   ========================================================================== */

/* Ajustements mise en page entête Admin */
.admin-header-layout {
    margin-bottom: 25px;
}

.admin-buttons-group {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-separator {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

.admin-section-subtitle {
    color: var(--primary-blue);
    margin-top: 20px;
}

.admin-notice-text {
    font-size: 0.9rem;
    color: #718096;
}

/* Tableau de gestion des Pilotes */
.admin-management-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 20px;
}

.admin-management-table thead tr {
    border-bottom: 2px solid var(--primary-blue);
    background-color: var(--sky-blue);
}

.admin-management-table th, 
.admin-management-table td {
    padding: 12px 10px;
}

.admin-management-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.admin-management-table tbody tr:hover {
    background-color: #fcfdfe;
}

.cell-pilot-name {
    font-size: 1rem;
}

.cell-pilot-email {
    color: #4a5568;
}

/* Alignements et dimensions des cellules */
.cell-center {
    text-align: center;
}

.col-admin-width {
    width: 180px;
}

/* Éléments de formulaire de l'administration */
.admin-checkbox-scale {
    transform: scale(1.3);
}

.row-clickable {
    cursor: pointer;
}

.admin-self-badge {
    display: block;
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 2px;
}

.admin-form-actions {
    margin-top: 25px;
    text-align: right;
}

/* Boutons d'actions aux couleurs thématiques */
.btn-admin-submit {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
}

.btn-admin-submit:hover {
    background-color: #27ae60;
}

/* Surcharges de couleurs pour les liens d'action */
.btn-success {
    background-color: #2ecc71 !important;
    color: white !important;
}
.btn-success:hover {
    background-color: #27ae60 !important;
}

.btn-danger {
    background-color: #e74c3c !important;
    color: white !important;
}
.btn-danger:hover {
    background-color: #c0392b !important;
}

.btn-back {
    background-color: #718096 !important;
    color: white !important;
}
.btn-back:hover {
    background-color: #4a5568 !important;
}

/* --- Styles pour le détail des vols (Textes spécifiques) --- */
.text-muted-italic {
    color: #7f8c8d;
    font-style: italic;
}

.text-instruction-bold {
    color: #d35400;
    font-weight: bold;
}

.text-success-bold {
    color: #27ae60;
    font-weight: bold;
}

.text-muted {
    color: #7f8c8d;
}

/* ==========================================================================
   🖋️ ZONE DE SIGNATURE NUMÉRIQUE & CONTROLE MINEURS (FICHE INFORMATION)
   ========================================================================== */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.checkbox-label {
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Zone dynamique pour les mineurs */
.bloc-mineur-section {
    display: none; /* Piloté par le JavaScript */
    border-left: 4px solid var(--accent-gold);
    padding-left: 20px;
    margin-top: 15px;
    margin-bottom: 25px;
    background-color: rgba(212, 175, 55, 0.04);
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 0 8px 8px 0;
}

/* Encapsulation des pads de signature */
.signature-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.signature-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-dark);
}

.signature-label.parent-label {
    color: var(--primary-blue);
}

.signature-pad-wrapper {
    border: 2px dashed var(--gray-steel);
    background: #ffffff;
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.signature-canvas {
    width: 100%;
    height: 160px;
    display: block;
    cursor: crosshair;
    touch-action: none;
}

.btn-clear {
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    background-color: #e2e8f0;
    color: var(--text-dark);
    border-radius: 4px;
}

.fiche-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit-fiche {
    flex: 2;
    background-color: #2c3e50 !important;
    border-color: #1a252f !important;
    color: #ffffff !important;
}

.btn-submit-fiche:hover {
    background-color: #1a252f !important;
}

.btn-cancel-fiche {
    flex: 1;
    text-align: center;
}

/* Version mobile responsive pour empiler les boutons d'action */
@media (max-width: 600px) {
    .fiche-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-submit-fiche, .btn-cancel-fiche {
        width: 100%;
    }
}

/* ==========================================================================
   🖨️ MODULE D'AFFICHAGE ET D'IMPRESSION DE LA FICHE REGLEMENTAIRE
   ========================================================================== */
.print-fiche-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 20px auto;
}
.print-header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border-bottom: 2px solid #1a3c5e;
    padding-bottom: 15px;
}
.fiche-data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0;
    background: #f8fbff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.data-item label {
    font-weight: bold;
    color: #1a3c5e;
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.data-item p {
    margin: 0;
    font-size: 1.1rem;
    color: #2d3436;
}
.print-signature-box {
    margin-top: 40px;
    border: 1px solid #999ea1;
    padding: 15px;
    border-radius: 6px;
    display: inline-block;
    background: #fff;
}
.print-signature-img {
    max-width: 300px;
    height: auto;
    display: block;
    margin-top: 10px;
}

/* 🖨️ REGLES DE L'IMPRESSION : Masque tout le superflu sur le papier ou PDF */
@media print {
    header, footer, .no-print, .btn {
        display: none !important;
    }
    body {
        background: #fff !important;
    }
    .print-fiche-card {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .fiche-data-grid {
        background: transparent !important;
        border: 1px solid #000 !important;
    }
}

/* ==========================================================================
   COMPLÉMENTS POUR LES FICHES D'INFORMATION
   ========================================================================== */

/* --- Pour fiche_information.html (Formulaire de saisie) --- */
.bloc-mineur-section {
    display: none; /* Géré dynamiquement par le JavaScript */
}

.btn-submit-fiche {
    flex: 2;
    background-color: #2c3e50 !important;
    border-color: #1a252f !important;
    color: #ffffff !important;
}

.btn-cancel-fiche {
    flex: 1;
    text-align: center;
    justify-content: center;
}

/* --- Pour voir_fiche_information.html (Visualisation & Impression) --- */
.fiche-actions-bar {
    max-width: 800px;
    margin: 0 auto 15px auto;
    display: flex;
    justify-content: space-between;
}

.btn-print {
    background-color: #2ecc71 !important;
    border-color: #27ae60 !important;
    color: white !important;
}

.print-header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a3c5e;
}

.print-header-date {
    text-align: right;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.print-fiche-desc {
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
}

.print-engagement-statement {
    margin-top: 30px;
    font-size: 0.9rem;
    border-left: 3px solid #999ea1;
    padding-left: 15px;
    color: #555;
}

.print-signature-label {
    font-weight: bold;
    color: #1a3c5e;
    display: block;
    font-size: 0.9rem;
}

.print-signature-error {
    color: #e74c3c;
    margin: 10px 0 0 0;
    font-weight: bold;
}

/* ==========================================================================
   BANDEAU D'ALERTES DES ÉCHÉANCES PILOTE (choix_avion.html)
   ========================================================================== */

.alert-banner {
    margin-top: 13px;
    background-color: #fff3cd; /* Fond jaune d'avertissement doux */
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.alert-list {
    margin: 8px 0 0 20px;
    padding: 0;
}

.alert-item {
    margin-bottom: 4px;
}

/* Badge rouge vif pour alerter sur une date complètement dépassée */
.badge-error {
    color: #b71c1c;
    background-color: #f8d7da;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    display: inline-block;
}

/* Texte orange/marron pour une date qui approche à grands pas */
.badge-warning-text {
    color: #b85c00;
    font-weight: bold;
}

/* ==========================================================================
   SECTION EXPÉRIENCE RÉCENTE (TABLEAU DE BORD)
   ========================================================================== */
.experience-recent-box {
    background-color: #f4f7f9;
    border-left: 4px solid #2a6f97; /* Bleu aéronautique */
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.experience-title {
    margin-top: 0;
    margin-bottom: 12px;
    color: #012a4a;
    font-size: 1.1rem;
    font-weight: 600;
}

.experience-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.total-landings {
    margin: 0;
    font-size: 1rem;
    color: #013a63;
}

/* Grille responsive pour l'affichage par classe ULM */
.stats-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.stat-class-item {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #617d98;
}

.stat-value {
    font-size: 0.95rem;
    color: #012a4a;
}

.text-muted-italic {
    font-style: italic;
    color: #829ab1;
    margin: 0;
}

/* ==========================================================================
   INTERACTIVITÉ DES VOLETS (DETAILS / SUMMARY)
   ========================================================================== */
summary.collapsible-header {
    cursor: pointer;
    font-size: 0.90rem;
    list-style: none; /* Supprime le triangle par défaut du navigateur */
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

summary.collapsible-header::-webkit-details-marker {
    display: none; /* Supprime le triangle sur Safari/Chrome */
}

/* Petite flèche d'indication à droite */
summary.collapsible-header::after {
    content: "▼";
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

/* Rotation de la flèche quand le volet est ouvert */
details[open] summary.collapsible-header::after {
    transform: rotate(180deg);
}

.mt-10 {
    margin-top: 10px !important;
}

/* ==========================================================================
   SECTION CHECK-LIST VLO
   ========================================================================== */
.checklist-vlo-box {
    background-color: #fdfbf7; /* Teinte crème aéronautique douce pour les cartes/checklists */
    border-left: 4px solid var(--accent-gold); /* Rappel esthétique du liseré doré */
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.checklist-item {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.checklist-icon {
    color: #2ecc71; /* Vert aéronautique pour les validations */
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
}

/* Style pour une classe d'ULM dont l'expérience récente est insuffisante (< 3) */
.stat-class-insufficient {
    border-color: #f5c6cb !important;
    background-color: #fdf3f4 !important; /* Fond rosé/saumon très doux */
}

.stat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Aligné en haut pour gérer les blocs multilignes */
    flex-wrap: wrap;
    gap: 8px;
}

/* Badge d'alerte réglementaire pour l'expérience récente */
.vlo-warning-badge {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    flex-direction: column; /* Aligne le titre de l'alerte et le rappel l'un sous l'autre */
    gap: 2px;
    text-align: right;
}

/* Petit texte de rappel réglementaire */
.vlo-reminder-text {
    font-weight: normal;
    font-size: 0.7rem;
    color: #664d03;
    opacity: 0.9;
}
.vlo-info-text {
    font-weight: normal;
    font-size: 0.90rem;    
}

/* Accentuation de la valeur numérique si elle est en alerte */
.text-danger-weight {
    color: #721c24;
}

.mt-5 {
    margin-top: 5px !important;
}


/* --- Alignement du titre et du bouton de gestion flotte --- */
.section-header-title-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 600px) {
    .section-header-title-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .section-header-title-block .btn-edit-profile {
        width: 100%;
        justify-content: center;
    }
}

/* --- Action de masquage et bandeau de rappel VLO/VLD --- */
.vlo-hide-action {
    text-align: right;
    margin-top: 5px;
    margin-bottom: 15px;
}

.vlo-hide-link {
    font-size: 0.85rem;
    color: var(--gray-steel);
    text-decoration: underline;
}

.vlo-hide-link:hover {
    color: var(--primary-blue);
}

.vlo-disabled-reminder {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background-color: var(--sky-blue);
    border: 1px dashed var(--gray-steel);
    border-radius: 6px;
}

.vlo-disabled-reminder span {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.vlo-disabled-reminder a {
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-left: 10px;
    text-decoration: underline;
    font-weight: bold;
}


/* Container principal de la présentation page landing*/
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: sans-serif;
}

.landing-header {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 40px;
    background-color: var(--gray-steel);
}

/* Grille tarifaire adaptative (Responsive Grid) */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Cartes des tarifs */
.pricing-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background-color: #fff;
}

/* Pied de page et liens d'accès direct */
.landing-footer {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-top: 30px;
    padding: 10px;
    background-color: var(--gray-steel);
    max-width: 50%;
}
.landing-footer a {
    color: var(--primary-blue);
    text-decoration: underline;    
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

.promo-badge {
    display: inline-block;
    background-color: #e6f4ea;
    color: #137333;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.pricing-card-featured {
    border: 2px solid #1a73e8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.features-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #1a73e8;
    font-weight: bold;
}

/* --- Base des Formulaires d'Inscription (Étape suivante) --- */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Classe utilitaire pour masquer dynamiquement via JavaScript */
.hidden {
    display: none !important;
}

/* Alignement du bouton central unique de la landing page */
.landing-cta-center {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

/* Alignement des actions côte à côte du formulaire (Valider et Retour) */
.form-actions-inscription {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

/* Interface écran de succès */
.success-screen {
    text-align: center;
    padding: 40px 20px;
}

.success-text {
    font-size: 1.1rem;
    color: #2e7d32;
    margin-bottom: 30px;
}

.actions-group {
    display: flex;
    justify-content: center;
}
.alert-container {
    margin-bottom: 25px;
}

/* ==========================================================================
   🔔 SYSTÈME DE MESSAGES ET D'ALERTES DJANGO
   ========================================================================== */

.messages-container {
    width: 100%;
    margin-bottom: 20px;
}

/* Style de base pour toutes les alertes (complément aux règles existantes) */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    border-left: 5px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Succès (Vert Aéro) */
.alert-success {
    background-color: #ebfbf2;
    color: #1b5e20;
    border: 1px solid #c3e6cb;
    border-left: 5px solid #2ecc71;
}

/* Info (Bleu ciel) */
.alert-info {
    background-color: #eef7fc;
    color: #1d4ed8;
    border: 1px solid #bee3f8;
    border-left: 5px solid #3182ce;
}

/* Attention / Warning (Jaune/Orange) */
.alert-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
    border-left: 5px solid #f59e0b;
}

/* Erreur (Rouge intense - remplace ou complète l'existant) */
.alert-error, .alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
    border-left: 5px solid #e73c3c;
}
