:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #18212f;
    --text-soft: #667085;

    --border: #e4e7ec;

    --primary: #c62828;
    --primary-dark: #9f1f1f;
    --primary-soft: #fdecec;

    --warning: #d97706;
    --warning-soft: #fff7e6;

    --shadow:
        0 1px 2px rgba(16, 24, 40, 0.04),
        0 4px 12px rgba(16, 24, 40, 0.06);

    --radius: 14px;
}


/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   BARRE SUPÉRIEURE
   ========================================================= */

.topbar {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 12px 28px;

    background: var(--surface);
    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background: var(--primary);
    color: #ffffff;

    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.topbar h1 {
    margin: 0;

    font-size: 20px;
    font-weight: 750;
    line-height: 1.2;
}

.topbar p {
    margin: 3px 0 0;

    color: var(--text-soft);
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;

    color: var(--text-soft);
    font-size: 14px;
}


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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 8px 14px;

    border-radius: 9px;
    border: 1px solid transparent;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

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

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--surface-soft);
}


/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */

.page {
    width: min(1440px, 100%);
    margin: 0 auto;

    padding: 30px 28px 48px;
}


/* =========================================================
   EN-TÊTE DE PAGE
   ========================================================= */

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.page-header p {
    margin: 7px 0 0;

    color: var(--text-soft);
    font-size: 15px;
}


/* =========================================================
   CARTES STATISTIQUES
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 24px;
}

.stat-card {
    min-height: 145px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.stat-label {
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 650;
}

.stat-value {
    margin: 10px 0;

    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-detail {
    color: var(--text-soft);

    font-size: 12px;
}

.stat-card-alert {
    background: var(--warning-soft);
    border-color: #fed7aa;
}

.stat-card-alert .stat-value {
    color: var(--warning);
}


/* =========================================================
   GRILLE DU TABLEAU DE BORD
   ========================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 20px;
}


/* =========================================================
   PANNEAUX
   ========================================================= */

.panel {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 20px 22px;

    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    margin: 0;

    font-size: 17px;
    font-weight: 750;
}

.panel-header p {
    margin: 4px 0 0;

    color: var(--text-soft);
    font-size: 13px;
}


/* =========================================================
   LISTE DES SÉANCES
   ========================================================= */

.session-list {
    display: flex;
    flex-direction: column;
}

.session-row {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 16px 22px;

    border-bottom: 1px solid var(--border);
}

.session-row:last-child {
    border-bottom: 0;
}

.session-row:hover {
    background: var(--surface-soft);
}

.session-date {
    width: 54px;
    height: 58px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--primary-soft);

    border-radius: 11px;
}

.session-day {
    color: var(--primary);

    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.session-month {
    margin-top: 4px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.session-content {
    min-width: 0;
}

.session-title {
    margin-bottom: 4px;

    font-size: 15px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-meta {
    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   ÉTAT VIDE
   ========================================================= */

.empty-state {
    padding: 40px 24px;

    text-align: center;

    color: var(--text-soft);
}

.empty-state strong {
    display: block;

    margin-bottom: 5px;

    color: var(--text);
    font-size: 15px;
}

.empty-state p {
    margin: 0;

    font-size: 13px;
}


/* =========================================================
   ACCÈS RAPIDES
   ========================================================= */

.quick-panel {
    margin-top: 20px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 14px;

    padding: 20px;
}

.quick-card {
    min-height: 130px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 18px;

    background: var(--surface-soft);

    border: 1px solid var(--border);
    border-radius: 12px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.quick-card:hover {
    transform: translateY(-2px);

    background: var(--surface);
    border-color: #cfd4dc;

    box-shadow: var(--shadow);
}

.quick-icon {
    display: block;

    margin-bottom: 10px;

    font-size: 24px;
}

.quick-card strong {
    font-size: 14px;
}

.quick-card > span:last-child {
    margin-top: 4px;

    color: var(--text-soft);
    font-size: 12px;
}


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

.footer {
    padding: 18px 28px 30px;

    text-align: center;

    color: var(--text-soft);
    font-size: 12px;
}


/* =========================================================
   TABLETTES
   ========================================================= */

@media (max-width: 1150px) {

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   PETITES TABLETTES
   ========================================================= */

@media (max-width: 800px) {

    .topbar {
        align-items: flex-start;

        padding: 12px 18px;
    }

    .topbar-user {
        flex-direction: column;
        align-items: flex-end;

        gap: 7px;
    }

    .page {
        padding: 24px 18px 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   SMARTPHONES
   ========================================================= */

@media (max-width: 560px) {

    .topbar {
        position: static;

        flex-direction: column;
        align-items: stretch;

        gap: 12px;

        padding: 14px 15px;
    }

    .topbar-user {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;

        width: 100%;
    }

    .logo {
        width: 42px;
        height: 42px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .page {
        padding: 20px 14px 32px;
    }

    .page-header {
        margin-bottom: 18px;
    }

    .page-header h2 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .stat-card {
        min-height: 125px;

        padding: 15px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 30px;
    }

    .stat-detail {
        font-size: 11px;
    }

    .dashboard-grid {
        gap: 14px;
    }

    .panel-header {
        padding: 17px;
    }

    .session-row {
        gap: 12px;

        padding: 14px 16px;
    }

    .session-date {
        width: 48px;
        height: 52px;
    }

    .session-title {
        font-size: 14px;
    }

    .session-meta {
        font-size: 12px;
    }

    .quick-panel {
        margin-top: 14px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;

        padding: 14px;
    }

    .quick-card {
        min-height: 115px;

        padding: 14px;
    }

    .quick-icon {
        font-size: 22px;
    }

}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media (max-width: 380px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

}




/* =========================================================
   PAGE DE CONNEXION
   ========================================================= */

/*
   La page occupe toute la hauteur de l'écran
   et centre la carte de connexion.
*/
.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: var(--bg);
}


/*
   Carte principale contenant le logo,
   le formulaire et les messages éventuels.
*/
.login-card {
    width: 100%;
    max-width: 430px;

    padding: 32px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}


/*
   Logo et nom PrepFormation.
*/
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 30px;
}

.login-brand h1 {
    margin: 0;

    font-size: 22px;
    font-weight: 800;
}

.login-brand p {
    margin: 3px 0 0;

    color: var(--text-soft);
    font-size: 13px;
}


/*
   Titre "Connexion" et texte d'explication.
*/
.login-header {
    margin-bottom: 24px;
}

.login-header h2 {
    margin: 0;

    font-size: 25px;
}

.login-header p {
    margin: 6px 0 0;

    color: var(--text-soft);
    font-size: 14px;
}


/*
   Organisation verticale du formulaire.
*/
.login-form {
    display: flex;
    flex-direction: column;

    gap: 18px;
}


/*
   Chaque groupe contient un label + un champ.
*/
.form-group {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
}


/*
   Apparence des champs identifiant et mot de passe.
*/
.form-group input {
    width: 100%;
    min-height: 46px;

    padding: 10px 12px;

    font: inherit;
    font-size: 15px;

    color: var(--text);

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/*
   Mise en évidence du champ actif.
*/
.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px var(--primary-soft);
}


/*
   Message affiché si les identifiants sont incorrects.
*/
.form-error {
    padding: 11px 13px;

    color: #991b1b;
    background: #fef2f2;

    border: 1px solid #fecaca;
    border-radius: 9px;

    font-size: 13px;
}


/*
   Le bouton de connexion occupe toute la largeur.
*/
.login-button {
    width: 100%;
    min-height: 46px;

    margin-top: 4px;
}


/* =========================================================
   CONNEXION — SMARTPHONES
   ========================================================= */

@media (max-width: 560px) {

    /*
       Réduction des marges pour conserver
       un maximum de place sur petit écran.
    */
    .login-page {
        align-items: flex-start;

        padding: 20px 14px;
    }

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

}


/* =========================================================
   PAGE STAGIAIRES — FILTRES
   ========================================================= */

/*
   Espace sous le panneau de recherche.
*/
.filter-panel {
    margin-bottom: 20px;
}


/*
   Le formulaire de recherche utilise une grille.

   Sur grand écran :
   - recherche libre plus large
   - formation
   - statut
   - boutons
*/
.filters-form {
    display: grid;
    grid-template-columns:
        minmax(240px, 2fr)
        minmax(200px, 1fr)
        minmax(190px, 1fr)
        auto;

    gap: 16px;

    align-items: end;

    padding: 20px 22px;
}


/*
   Chaque filtre contient :
   - un libellé
   - un champ ou une liste déroulante
*/
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-field label {
    font-size: 13px;
    font-weight: 700;
}


/*
   Apparence commune des champs de recherche
   et listes déroulantes.
*/
.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 42px;

    padding: 9px 11px;

    font: inherit;
    font-size: 14px;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/*
   Mise en évidence du champ actuellement sélectionné.
*/
.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px var(--primary-soft);
}


/*
   Les boutons Rechercher et Réinitialiser
   restent côte à côte sur grand écran.
*/
.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* =========================================================
   PAGE STAGIAIRES — TABLEAU
   ========================================================= */

/*
   Permet au tableau de défiler horizontalement
   sur un petit écran au lieu de casser la mise en page.
*/
.table-responsive {
    width: 100%;
    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


/*
   Tableau principal utilisé pour afficher les stagiaires.
*/
.data-table {
    width: 100%;
    min-width: 900px;

    border-collapse: collapse;
}


/*
   En-tête du tableau.
*/
.data-table thead {
    background: var(--surface-soft);
}

.data-table th {
    padding: 12px 16px;

    color: var(--text-soft);

    border-bottom: 1px solid var(--border);

    font-size: 12px;
    font-weight: 750;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.3px;

    white-space: nowrap;
}


/*
   Cellules contenant les données.
*/
.data-table td {
    padding: 15px 16px;

    border-bottom: 1px solid var(--border);

    font-size: 14px;

    vertical-align: middle;
}


/*
   La dernière ligne n'a pas besoin
   d'une bordure inférieure.
*/
.data-table tbody tr:last-child td {
    border-bottom: 0;
}


/*
   Mise en évidence légère au survol.
   Cela facilitera plus tard l'accès à la fiche du stagiaire.
*/
.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: var(--surface-soft);
}


/* =========================================================
   CELLULE STAGIAIRE
   ========================================================= */

.person-cell {
    display: flex;
    flex-direction: column;

    min-width: 160px;
}

.person-cell strong {
    font-weight: 700;
}


/* =========================================================
   FORMATION
   ========================================================= */

/*
   Petit badge contenant le code de la formation,
   par exemple EQPS.
*/
.formation-badge {
    display: inline-flex;
    align-items: center;

    padding: 4px 8px;

    background: var(--primary-soft);
    color: var(--primary);

    border-radius: 6px;

    font-size: 12px;
    font-weight: 800;
}


/*
   Texte secondaire placé sous certaines informations,
   par exemple le nom complet d'une formation.
*/
.table-secondary {
    margin-top: 4px;

    color: var(--text-soft);
    font-size: 12px;
}


/*
   Valeur volontairement vide ou inconnue.
*/
.table-muted {
    color: var(--text-soft);
}


/* =========================================================
   STATUTS DES STAGIAIRES
   ========================================================= */

/*
   Style commun à tous les badges de statut.
*/
.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}


/*
   Préparation encore en cours.
*/
.status-preparation {
    color: #1d4ed8;
    background: #eff6ff;
}


/*
   Échéance atteinte :
   attire davantage l'attention.
*/
.status-warning {
    color: #b45309;
    background: #fff7ed;
}


/*
   Préparation terminée.
*/
.status-success {
    color: #166534;
    background: #f0fdf4;
}


/*
   Préparation abandonnée ou état neutre.
*/
.status-neutral {
    color: #475467;
    background: #f2f4f7;
}


/* =========================================================
   ACTIF / INACTIF
   ========================================================= */

.active-indicator,
.inactive-indicator {
    display: inline-flex;
    align-items: center;

    font-size: 12px;
    font-weight: 700;
}


/*
   Ajout d'un petit point avant le texte.
*/
.active-indicator::before,
.inactive-indicator::before {
    content: "";

    width: 7px;
    height: 7px;

    margin-right: 6px;

    border-radius: 50%;
}


/*
   Utilisateur / stagiaire actif.
*/
.active-indicator {
    color: #166534;
}

.active-indicator::before {
    background: #22c55e;
}


/*
   Utilisateur / stagiaire inactif.
*/
.inactive-indicator {
    color: var(--text-soft);
}

.inactive-indicator::before {
    background: #98a2b3;
}


/* =========================================================
   PAGE STAGIAIRES — TABLETTES
   ========================================================= */

@media (max-width: 1100px) {

    /*
       Sur tablette, le formulaire passe sur deux lignes.
    */
    .filters-form {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    /*
       Les boutons prennent toute la largeur disponible.
    */
    .filter-actions {
        align-self: end;
    }

}


/* =========================================================
   PAGE STAGIAIRES — SMARTPHONES
   ========================================================= */

@media (max-width: 600px) {

    /*
       Sur téléphone, chaque filtre occupe une ligne complète.
    */
    .filters-form {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 16px;
    }

    /*
       Les boutons sont suffisamment grands
       pour être utilisés facilement au doigt.
    */
    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
    }

    /*
       On réduit légèrement les cellules du tableau.
       Le défilement horizontal reste disponible.
    */
    .data-table th {
        padding: 11px 13px;
    }

    .data-table td {
        padding: 13px;
    }

}

/* =========================================================
   FORMULAIRES METIER
   ========================================================= */

/*
   Panneau contenant un formulaire de creation
   ou de modification d'une fiche.
*/
.form-panel {
    max-width: 950px;
}


/*
   Zone principale du formulaire.
*/
.entity-form {
    padding: 22px;
}


/*
   Organisation des champs sur deux colonnes
   lorsque l'ecran est suffisamment large.
*/
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px 24px;
}


/*
   Structure commune d'un champ :
   libelle, champ, aide et erreur eventuelle.
*/
.form-field {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


/*
   Certains champs, comme la formation,
   utilisent toute la largeur du formulaire.
*/
.form-field-wide {
    grid-column: 1 / -1;
}


/*
   Libelle place au-dessus des champs.
*/
.form-field > label {
    font-size: 13px;
    font-weight: 700;
}


/*
   Apparence commune des champs texte,
   dates et listes deroulantes.
*/
.form-field input[type="text"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 44px;

    padding: 10px 12px;

    font: inherit;
    font-size: 14px;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/*
   Mise en evidence du champ actuellement utilise.
*/
.form-field input[type="text"]:focus,
.form-field input[type="date"]:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px var(--primary-soft);
}


/*
   Zone contenant une case a cocher
   et son libelle.
*/
.checkbox-field {
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 9px;
}


/*
   Case a cocher suffisamment grande
   pour etre facilement utilisable au doigt.
*/
.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;

    margin: 0;

    accent-color: var(--primary);
}


/*
   Texte d'aide affiche sous certains champs.
*/
.field-help {
    color: var(--text-soft);

    font-size: 12px;
}


/*
   Message d'erreur rattache a un champ.
*/
.field-error {
    color: #b42318;

    font-size: 12px;
    font-weight: 600;
}


/*
   Zone contenant les boutons Annuler / Enregistrer.
*/
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 10px;

    margin-top: 26px;
    padding-top: 20px;

    border-top: 1px solid var(--border);
}


/* =========================================================
   FORMULAIRES — SMARTPHONES
   ========================================================= */

@media (max-width: 650px) {

    /*
       Sur telephone, tous les champs passent
       les uns sous les autres.
    */
    .form-grid {
        grid-template-columns: 1fr;

        gap: 17px;
    }

    .form-field-wide {
        grid-column: auto;
    }


    /*
       Reduction des marges internes.
    */
    .entity-form {
        padding: 17px;
    }


    /*
       Les boutons deviennent plus faciles
       a utiliser sur petit ecran.
    */
    .form-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

}


/* =========================================================
   NOUVEAU FORMULAIRE PERSONNEL / PREPARATION
   ========================================================= */


/*
   Conteneur general de l'application.
*/
.app-container {
    min-height: 100vh;
}


/*
   En-tete de la page.
*/
.app-header {
    max-width: 1180px;

    margin: 0 auto;
    padding: 22px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid var(--border);
}


/*
   Logo et titre PrepFormation.
*/
.header-brand {
    display: flex;
    align-items: center;

    gap: 14px;
}


.header-brand .logo {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-size: 18px;
    font-weight: 800;
}


.header-brand h1 {
    margin: 0;

    font-size: 24px;
    line-height: 1.2;
}


.header-brand p {
    margin: 4px 0 0;

    color: var(--text-soft);

    font-size: 13px;
}


/*
   Actions placees a droite de l'en-tete.
*/
.header-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


/*
   Contenu principal de la page.
*/
.main-content {
    width: min(1100px, calc(100% - 48px));

    margin: 0 auto;
    padding: 32px 0 50px;
}


/*
   Titre et introduction.
*/
.page-heading {
    margin-bottom: 24px;
}


.page-heading h2 {
    margin: 0 0 6px;

    font-size: 28px;
    line-height: 1.2;
}


.page-heading p {
    margin: 0;

    color: var(--text-soft);

    line-height: 1.5;
}


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

.button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 16px;

    border: 1px solid transparent;
    border-radius: 9px;

    font: inherit;
    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


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


.button-secondary {
    background: var(--surface);
    color: var(--text);

    border-color: var(--border);
}


.button:hover {
    text-decoration: none;
}


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

.business-form {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
}


/*
   Une section correspond a un groupe logique :
   identite, preparation, etc.
*/
.form-section {
    padding: 24px;

    border-bottom: 1px solid var(--border);
}


/*
   En-tete interne d'une section.
*/
.form-section-header {
    margin-bottom: 22px;
}


.form-section-header h3 {
    margin: 0 0 5px;

    font-size: 18px;
}


.form-section-header p {
    margin: 0;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   CHAMP E-MAIL
   ========================================================= */

/*
   Le champ email n'etait pas present dans
   l'ancien formulaire.
*/
.form-field input[type="email"] {
    width: 100%;
    min-height: 44px;

    padding: 10px 12px;

    font: inherit;
    font-size: 14px;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.form-field input[type="email"]:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px var(--primary-soft);
}


/* =========================================================
   CASES A COCHER
   ========================================================= */

.form-checkbox-row {
    margin-top: 20px;

    display: flex;
    align-items: center;

    gap: 9px;
}


.form-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;

    margin: 0;

    accent-color: var(--primary);
}


.form-checkbox-row label {
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


/* =========================================================
   INFORMATION
   ========================================================= */

.form-info {
    margin: 24px;

    padding: 16px 18px;

    background: var(--primary-soft);

    border-radius: 10px;
}


.form-info strong {
    display: block;

    margin-bottom: 5px;
}


.form-info p {
    margin: 0;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.5;
}


/*
   Notre nouveau HTML utilise .button
   dans la zone des actions.
*/
.business-form .form-actions {
    margin: 0;
    padding: 20px 24px 24px;

    border-top: 0;
}


/* =========================================================
   SMARTPHONES
   ========================================================= */

@media (max-width: 650px) {

    .app-header {
        padding: 16px;

        align-items: flex-start;
    }


    .header-brand .logo {
        width: 42px;
        height: 42px;

        border-radius: 10px;
    }


    .header-brand h1 {
        font-size: 20px;
    }


    .header-brand p {
        font-size: 12px;
    }


    .main-content {
        width: calc(100% - 28px);

        padding: 22px 0 35px;
    }


    .page-heading h2 {
        font-size: 23px;
    }


    .form-section {
        padding: 18px;
    }


    .form-info {
        margin: 18px;
    }


    .business-form .form-actions {
        padding: 18px;

        flex-direction: column-reverse;
    }


    .business-form .form-actions .button {
        width: 100%;
    }

}
