/* ══ Variables palette sécurité ══════════════════════════ */
    :root {
        --bleu:          #002654;
        --bleu-fonce:    #001534;
        --bleu-mid:      #1a4a8a;
        --bleu-clair:    #e8eef8;
        --vert:          #198754;
        --vert-clair:    #eefbf4;
        --rouge:         #c82333;
        --rouge-clair:   #fff5f5;
        --orange:        #b8860b;
        --orange-clair:  #fdf8ee;
        --gris-fond:     #f3f5f9;
        --gris-bordure:  #cfd7e8;
        --gris-texte:    #5a6474;
        --texte:         #1a1e2a;
        --blanc:         #ffffff;
        --ombre:         0 2px 8px rgba(0,38,84,0.09);
        --ombre-card:    0 4px 14px rgba(0,38,84,0.11);
        --rayon:         6px;
    }

    /* ══ Reset ════════════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; }

    /* body: sticky footer ci-dessous */

    /* ══ Navigation (identique à consulter-fichiers-police) ══ */
    .nav-cerpeg {
        background: var(--blanc);
        border-bottom: 2px solid var(--gris-bordure);
        padding: 10px 24px;
        box-shadow: 0 2px 6px rgba(0,38,84,0.07);
    }
    .nav-inner {
        max-width: 960px; margin: 0 auto;
        display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    .nav-btn {
        display: inline-flex; align-items: center; gap: 7px;
        border-radius: var(--rayon); padding: 8px 15px;
        font-family: inherit; font-size: 13px; font-weight: 700;
        cursor: pointer; text-decoration: none;
        transition: background 0.2s, color 0.2s;
        border: 1px solid var(--gris-bordure);
        background: var(--bleu-clair); color: var(--bleu);
        white-space: nowrap;
    }
    .nav-btn:hover { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
    .nav-badge {
        margin-left: auto;
        background: var(--bleu-clair); border: 1px solid var(--bleu-mid); color: var(--bleu);
        padding: 3px 11px; border-radius: 20px;
        font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    }

    /* ══ Wrapper principal ════════════════════════════════════ */
    .main-wrapper {
        max-width: 960px;
        margin: 0 auto;
        padding: 20px 20px 48px;
    }

    /* ══ En-tête page (modèle  card-header) ═════════════ */
    .page-titre {
        background: var(--bleu); border-radius: var(--rayon);
        padding: 18px 24px; margin-bottom: 24px;
        display: flex; align-items: center; gap: 16px;
        box-shadow: var(--ombre-card);
    }
    .page-titre-icon {
        width: 48px; height: 48px;
        background: rgba(255,255,255,0.18); border-radius: 10px;
        display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .page-titre-text h1 {
        color: var(--blanc); font-size: 17px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.03em; margin: 0;
    }
    .page-titre-text p { color: rgba(255,255,255,0.75); font-size: 12px; margin: 3px 0 0; font-style: italic; }

    /* ══ Titres de section (modèle  .section-title) ══════ */
    h2 {
        color: var(--bleu);
        font-size: 12px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.06em;
        margin: 24px 0 14px; padding-bottom: 8px;
        border-bottom: 2px solid var(--bleu-clair);
        display: flex; align-items: center; gap: 8px;
    }
    h3 { color: var(--bleu); font-size: 13px; font-weight: 700; margin-bottom: 10px; }

    /* ══ Cartes de section (modèle  .card) ═══════════════ */
    .form-section {
        background: var(--blanc);
        border: 1px solid var(--gris-bordure);
        border-radius: var(--rayon);
        box-shadow: var(--ombre);
        margin-bottom: 16px;
        overflow: visible;
    }

    .form-section-header {
        background: var(--bleu-clair);
        border-bottom: 1px solid var(--gris-bordure);
        padding: 10px 18px;
        font-size: 12px; font-weight: 700; color: var(--bleu);
        text-transform: uppercase; letter-spacing: 0.05em;
        display: flex; align-items: center; gap: 8px;
    }

    .form-section-body { padding: 16px 18px; }

    /* ══ Grille formulaire ════════════════════════════════════ */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-bottom: 8px;
    }
    .full-width { grid-column: 1 / -1; }

    /* ══ Champs ════════════════════════════════ */
    label {
        font-size: 12px; font-weight: 700;
        color: var(--gris-texte); display: block; margin-bottom: 4px;
    }
    input, select, textarea {
        width: 100%; padding: 9px 12px;
        border: 1.5px solid var(--gris-bordure); border-radius: var(--rayon);
        font-family: inherit; font-size: 14px;
        color: var(--texte); background: var(--blanc);
        transition: border-color 0.18s; box-sizing: border-box;
    }
    input:focus, select:focus, textarea:focus {
        outline: none; border-color: var(--bleu);
        box-shadow: 0 0 0 3px rgba(0,38,84,0.10);
    }
    input::placeholder { color: var(--gris-texte); opacity: 0.6; }
    textarea { resize: vertical; min-height: 80px; }

    /* ══ Boutons (modèle ) ═══════════════════════════════ */
    .btn-group { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
    .action-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

    .btn {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 10px 20px; border-radius: var(--rayon);
        font-size: 13px; font-weight: 700; cursor: pointer;
        border: none; transition: all 0.2s; font-family: inherit;
        text-transform: uppercase; letter-spacing: 0.04em; flex: 1;
    }
    .btn { background: var(--bleu); color: var(--blanc); }
    .btn:hover { background: var(--bleu-fonce); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,38,84,0.22); }
    .btn:disabled { background: var(--gris-bordure); color: var(--gris-texte); cursor: not-allowed; transform: none; box-shadow: none; }

    .btn-add {
        display: inline-flex; align-items: center; gap: 6px;
        background: var(--bleu-mid); color: var(--blanc); border: none;
        padding: 7px 14px; font-size: 12px; border-radius: var(--rayon);
        cursor: pointer; font-family: inherit; font-weight: 700; transition: background 0.2s;
    }
    .btn-add:hover { background: var(--bleu-fonce); }

    .btn-delete {
        display: inline-flex; align-items: center; gap: 6px;
        background: var(--rouge-clair); color: var(--rouge);
        border: 1.5px solid var(--rouge);
        padding: 7px 14px; font-size: 12px; border-radius: var(--rayon);
        cursor: pointer; font-family: inherit; font-weight: 700; transition: background 0.2s, color 0.2s;
    }
    .btn-delete:hover { background: var(--rouge); color: var(--blanc); }

    .btn-copy {
        background: var(--gris-texte); color: var(--blanc); border: none;
        padding: 9px 14px; border-radius: var(--rayon);
        cursor: pointer; font-weight: 700; font-family: inherit; margin-top: 12px;
        display: inline-flex; align-items: center; gap: 6px; font-size: 13px; transition: background 0.2s;
    }
    .btn-copy:hover { background: var(--texte); }

    /* ══ États de validation (modèle ) ═══════════════════ */
    .hidden { display: none !important; }

    .champ-obligatoire.champ-invalide {
        border: 2px solid var(--rouge) !important;
        background: var(--rouge-clair);
    }
    .champ-obligatoire.champ-valide {
        border: 2px solid var(--vert) !important;
        background: var(--vert-clair);
    }
    .champ-obligatoire.champ-invalide:focus { box-shadow: 0 0 0 3px rgba(200,35,51,0.15) !important; }
    .champ-obligatoire.champ-valide:focus   { box-shadow: 0 0 0 3px rgba(25,135,84,0.15) !important; }

    /* ══ Zone résultat ════════════════════════════════════════ */
    #zone-resultat { display: none; margin-top: 24px; }
    pre {
        white-space: pre-wrap; font-family: 'Segoe UI', Arial, sans-serif;
        font-size: 13px; background: var(--gris-fond);
        padding: 16px; border-radius: var(--rayon);
        border: 1px solid var(--gris-bordure); margin: 0; color: var(--texte);
    }
    .info-rgpd { font-size: 10px; color: var(--rouge); font-style: italic; margin-bottom: 16px; text-align: center; font-weight: 700; }

    /* ══ Boutons icônes impression ════════════════════════════ */
    .btn-icon-action {
        background: var(--blanc); border: 2px solid currentColor;
        padding: 7px 9px; border-radius: var(--rayon); cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center;
        margin-top: 12px; margin-left: 8px;
        transition: background 0.18s, color 0.18s; line-height: 1; vertical-align: middle;
    }
    .btn-icon-copy  { color: var(--gris-texte); }
    .btn-icon-copy:hover  { background: var(--gris-texte); color: var(--blanc); }
    .btn-icon-print { color: var(--bleu); }
    .btn-icon-print:hover { background: var(--bleu); color: var(--blanc); }
    .conseil-pdf { margin: 8px 0 0; font-size: 10px; color: var(--gris-texte); font-style: italic; display: none; }

    /* ══ Système de modales (modèle ) ═══════════════════ */
    .modal-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.52);
        display: flex; align-items: center; justify-content: center;
        z-index: 9000; animation: overlayIn 0.15s ease;
    }
    .modal-overlay.hidden { display: none !important; }
    @keyframes overlayIn { from{opacity:0} to{opacity:1} }

    .modal-box {
        background: var(--blanc); border-radius: 8px; padding: 26px 28px 22px;
        width: 420px; max-width: 95vw;
        box-shadow: 0 12px 40px rgba(0,0,0,0.20);
        animation: boxIn 0.18s ease;
    }
    @keyframes boxIn {
        from{opacity:0;transform:translateY(-12px) scale(0.97)}
        to{opacity:1;transform:translateY(0) scale(1)}
    }
    .modal-box h3 {
        color: var(--bleu); margin: 0 0 16px;
        font-size: 14px; font-weight: 700;
        border-bottom: 2px solid var(--bleu-clair); padding-bottom: 8px;
        text-transform: uppercase; letter-spacing: 0.04em;
    }
    .modal-box label { font-weight: 700; display: block; margin: 10px 0 3px; color: var(--gris-texte); font-size: 12px; }
    .modal-box input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--gris-bordure); border-radius: var(--rayon); box-sizing: border-box; font-family: inherit; font-size: 14px; }
    .modal-box input:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(0,38,84,0.10); }
    .modal-actions { display: flex; gap: 10px; margin-top: 18px; }
    .modal-actions button { flex: 1; padding: 10px; border: none; border-radius: var(--rayon); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13px; transition: background 0.15s; }

    #modal-identite  { z-index: 9200; }
    #modal-alerte    { z-index: 9500; }
    .modal-alerte-box { text-align: center; }
    .modal-alerte-icone { display: flex; justify-content: center; margin-bottom: 14px; }
    .modal-alerte-titre { font-size: 13px; font-weight: 700; color: var(--bleu); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
    .modal-alerte-message { font-size: 13px; color: var(--gris-texte); line-height: 1.55; margin: 0 0 20px; }
    .btn-alerte-ok { background: var(--bleu); color: var(--blanc); border: none; padding: 10px 38px; border-radius: var(--rayon); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13px; transition: background 0.15s; display: block; margin: 0 auto; }
    .btn-alerte-ok:hover         { background: var(--bleu-fonce); }
    .btn-alerte-ok.rouge         { background: var(--rouge); }
    .btn-alerte-ok.rouge:hover   { background: #a01929; }
    .btn-alerte-ok.orange        { background: var(--orange); }
    .btn-alerte-ok.orange:hover  { background: #8f6a08; }

    /* ══ Identification agent ════════════════════════════════ */
    #modal-identite-agent { z-index: 9200; }
    #modal-identite-agent .modal-box h3 { color: var(--bleu); border-bottom: 2px solid var(--bleu-clair); }
    .modal-id-actions { display: flex; gap: 10px; margin-top: 18px; }
    .modal-id-actions button { flex: 1; padding: 10px; border: none; border-radius: var(--rayon); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13px; transition: background 0.15s; }
    .btn-id-confirmer { background: var(--bleu); color: var(--blanc); }
    .btn-id-confirmer:hover { background: var(--bleu-fonce); }

    /* ══ Toast ═══════════════════════════════════════════════ */
    #toast-notif {
        position: fixed; bottom: 26px; right: 26px;
        background: #1b3d1b; color: var(--blanc);
        padding: 12px 18px; border-radius: var(--rayon);
        font-size: 13px; font-weight: 700;
        display: flex; align-items: center; gap: 10px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.26); z-index: 9999;
        max-width: 340px; animation: toastIn 0.22s ease;
    }
    #toast-notif.hidden { display: none !important; }
    #toast-notif.toast-erreur { background: #6b1520; }
    @keyframes toastIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
    .toast-icone { flex-shrink: 0; }

  
    
    

    /* ══ Responsive ══════════════════════════════════════════ */
    @media (max-width: 768px) {
        .btn-group { flex-direction: column; }
        .form-grid { grid-template-columns: 1fr; }
        .main-wrapper { padding: 14px 14px 32px; }
        .page-titre { flex-wrap: wrap; }
    }
    @media (max-width: 600px) {
        
        .nav-badge { display: none; }
        .nav-cerpeg { padding: 10px 12px; }
    }

    /* ══ Cartes étapes PVE ═══════════════════════════════════ */
    .card {
        background: var(--blanc);
        border: 1px solid var(--gris-bordure);
        border-radius: var(--rayon);
        box-shadow: var(--ombre-card);
        margin-bottom: 18px;
        overflow: visible;
    }
    .card > h2:first-child, .card > *:first-child { margin-top: 0; }

    /* padding interne des cartes */
    .card { padding: 22px 24px; }

    /* ══ Boites statut ════════════════════════════════════════ */
    .status-box, .warning-box, .error-box {
        padding: 12px 16px; border-radius: var(--rayon);
        font-size: 13px; line-height: 1.5; font-weight: 600;
        margin-bottom: 16px;
    }
    .status-box  { background: var(--bleu-clair);  border: 1px solid #b8caee; border-left: 4px solid var(--bleu);  color: var(--bleu);  }
    .warning-box { background: var(--orange-clair); border: 1px solid #dfc060; border-left: 4px solid var(--orange); color: #7a5200; }
    .error-box   { background: var(--rouge-clair);  border: 1px solid #f5b8bc; border-left: 4px solid var(--rouge); color: var(--rouge); }

    /* ══ Grille et champs PVE ═════════════════════════════════ */
    .grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
    .field { display: flex; flex-direction: column; gap: 6px; position: relative; }

    /* ══ Actions PVE ══════════════════════════════════════════ */
    .actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
    .actions .btn { flex: unset; }

    /* Variantes boutons PVE */
    .btn-retour   { background: var(--blanc); color: var(--gris-texte); border: 1.5px solid var(--gris-bordure); flex: unset; padding: 10px 18px; }
    .btn-retour:hover { background: var(--gris-fond); color: var(--texte); transform: none; box-shadow: none; }
    .btn-confirm, .btn-secondary { background: var(--bleu); color: var(--blanc); flex: unset; padding: 10px 18px; }
    .btn-confirm:hover, .btn-secondary:hover { background: var(--bleu-fonce); }
    .btn-danger   { background: var(--blanc); color: var(--rouge); border: 1.5px solid var(--rouge); flex: unset; padding: 10px 18px; }
    .btn-danger:hover { background: var(--rouge); color: var(--blanc); }
    .btn-success  { background: var(--vert); color: var(--blanc); flex: unset; padding: 10px 18px; }
    .btn-success:hover { background: #156940; }
    .btn-disabled, .btn:disabled { background: var(--gris-bordure) !important; color: var(--gris-texte) !important; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; opacity: 0.75; }

    /* ══ Suggestions ══════════════════════════════════════════ */
    .suggestions {
        position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
        background: var(--blanc); border: 1.5px solid var(--gris-bordure); border-radius: var(--rayon);
        box-shadow: var(--ombre-card); max-height: 240px; overflow-y: auto;
    }
    
    
    

    /* ══ Infraction sélectionnée / synthèse ══════════════════ */
    .selected-offense, .summary-block {
        background: var(--gris-fond); border: 1px solid var(--gris-bordure);
        padding: 14px; margin-top: 18px; border-radius: var(--rayon);
    }
    .selected-offense p, .summary-block p { margin: 5px 0; line-height: 1.5; font-size: 13px; }
    .choice-box { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
    .choice-btn { min-width: 130px; flex: unset; }

    /* ══ Tableau ══════════════════════════════════════════════ */
    .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--blanc); min-width: 420px; }
    th, td { border: 1px solid var(--gris-bordure); padding: 10px 12px; text-align: left; vertical-align: top; font-size: 13px; }
    th { background: var(--bleu-clair); color: var(--bleu); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
    tbody tr:nth-child(even) { background: var(--gris-fond); }
    tbody tr:hover { background: var(--bleu-clair); }

    .footer-note { margin-top: 20px; text-align: center; color: var(--rouge); font-weight: 700; font-style: italic; font-size: 12px; }

    /* ══ Bouton imprimer PVE ══════════════════════════════════ */
    .btn-imprimer-pve {
        background: var(--blanc); border: 2px solid var(--bleu); color: var(--bleu);
        padding: 9px 16px; border-radius: var(--rayon); cursor: pointer;
        font-weight: 700; font-family: inherit; font-size: 13px;
        display: inline-flex; align-items: center; gap: 7px;
        transition: background 0.18s, color 0.18s; text-transform: uppercase; letter-spacing: 0.04em;
        flex: unset;
    }
    .btn-imprimer-pve:hover { background: var(--bleu); color: var(--blanc); }

    /* ══ Modale AFD ═══════════════════════════════════════════ */
    .modal-box h3.red { color: var(--rouge); }

    /* ══ Responsive PVE ═══════════════════════════════════════ */
    @media (max-width: 768px) {
        .grid { grid-template-columns: 1fr; }
        .actions { flex-direction: column; }
        .actions .btn, .actions .btn-retour, .actions .btn-danger,
        .actions .btn-success, .btn-imprimer-pve { width: 100%; justify-content: center; }
        .card { padding: 16px; }
    }

#zone-impression-pve {
            display: none;
            font-family: Arial, sans-serif;
            font-size: 9pt;
            color: #000;
            line-height: 1.4;
            background: #fff;
            box-sizing: border-box;
        }

        /* ── Styles impression PVE ── */
        .pve-bandeau {
            background: #002147;
            color: #fff;
            text-align: center;
            padding: 3pt 8pt;
            font-size: 7pt;
            font-weight: bold;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: 6pt;
        }
        .pve-entete {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            border-top: 2pt solid #002147;
            border-bottom: 2pt solid #002147;
            padding: 6pt 0;
            margin-bottom: 7pt;
            gap: 8pt;
        }
        .pve-entete-gauche { font-size: 7.5pt; color: #333; line-height: 1.6; min-width: 100pt; }
        .pve-entete-gauche .pve-service { font-size: 9pt; font-weight: bold; color: #002147; text-transform: uppercase; display: block; margin-bottom: 2pt; }
        .pve-titre-central { text-align: center; flex: 1; }
        .pve-titre-doc { font-size: 12pt; font-weight: bold; color: #002147; text-transform: uppercase; letter-spacing: 1px; display: block; line-height: 1.25; }
        .pve-ref { font-size: 7pt; color: #666; display: block; margin-top: 3pt; }
        .pve-entete-droite { font-size: 7.5pt; text-align: right; color: #333; line-height: 1.6; min-width: 100pt; }
        .pve-classif { border: 1pt solid #002147; padding: 2pt 5pt; font-weight: bold; font-size: 6.5pt; text-transform: uppercase; letter-spacing: 0.5px; color: #002147; display: inline-block; margin-bottom: 3pt; }
        .pve-section { margin-bottom: 7pt; border: 1pt solid #ccc; border-radius: 2pt; overflow: hidden; }
        .pve-section-titre { background: #002147; color: #fff; padding: 3pt 8pt; font-size: 8pt; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
        .pve-section-corps { padding: 6pt 8pt; }
        .pve-row { display: flex; gap: 6pt; margin-bottom: 3pt; flex-wrap: wrap; }
        .pve-label { font-weight: bold; font-size: 8pt; color: #555; min-width: 90pt; flex-shrink: 0; }
        .pve-val { font-size: 8.5pt; flex: 1; }
        .pve-table { width: 100%; border-collapse: collapse; font-size: 8pt; }
        .pve-table th { background: #e8ecf2; color: #002147; border: 0.5pt solid #aaa; padding: 3pt 5pt; text-align: left; font-size: 7.5pt; }
        .pve-table td { border: 0.5pt solid #ccc; padding: 3pt 5pt; vertical-align: top; }
        .pve-table tr:nth-child(even) td { background: #f8f9fa; }
        .pve-signature {
            display: flex;
            gap: 12pt;
            margin-top: 10pt;
            padding-top: 6pt;
            border-top: 1pt solid #002147;
        }
        .pve-signature-bloc { flex: 1; }
        .pve-signature-label { font-size: 7.5pt; font-weight: bold; color: #333; margin-bottom: 4pt; }
        .pve-signature-ligne { border-bottom: 1pt solid #555; height: 20pt; }
        .pve-signature-nom { font-size: 8pt; text-align: center; margin-top: 2pt; font-weight: bold; color: #002147; }
        .pve-pied { display: flex; justify-content: space-between; margin-top: 8pt; padding-top: 4pt; border-top: 0.5pt solid #ccc; font-size: 6.5pt; color: #888; }

        @media print {
            body > *:not(#zone-impression-pve) { display: none !important; }
            #zone-impression-pve { display: block !important; padding: 0; margin: 0; }
        }
    
    /* ══ Body sticky footer ══════════════════════════════════ */
    html { height: 100%; }
    body {
        font-family: 'Segoe UI', Arial, sans-serif;
        font-size: 14px;
        color: var(--texte);
        background: var(--gris-fond);
        min-height: 100vh;
        margin: 0; padding: 0;
        display: flex;
        flex-direction: column;
    }
    .nav-cerpeg { flex-shrink: 0; }
    .main-wrapper { flex: 1; }

    /* ══ Footer gris sobre identique sur les 3 fichiers ═════ */
    .main-footer, footer.main-footer {
        background: #eaecf2;
        color: #8a96a8;
        text-align: center;
        padding: 10px 24px;
        font-size: 11px;
        line-height: 1.6;
        border-top: 1px solid #d0d8e8;
        flex-shrink: 0;
        margin-top: 0;
    }
    .main-footer strong { color: #6a7280; font-weight: 600; }

    
    /* ══ Véhicule : 3 colonnes ═══════════════════════════════ */
    #stepVehicle .grid { grid-template-columns: repeat(3, 1fr); }

    /* ══ Marges externes champs ══════════════════════════════ */
    .card { margin-bottom: 18px; }
    .grid { gap: 14px 18px; }

    /* ══ Responsive PVE grilles ══════════════════════════════ */
    @media (max-width: 1040px) {
        #stepVehicle .grid { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 480px) {
        #stepVehicle .grid { grid-template-columns: 1fr; }
    }

/* ══ Suggestions — numéro + libellé ════════════════════════ */




.suggestion-item:hover 

.suggestion-item:hover 

/* ══ Recherche infraction — pleine largeur stable ═══════════ */
.search-offense-field {
    width: 100%;
    margin-bottom: 4px;
}
.search-offense-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gris-texte);
    display: block;
    margin-bottom: 5px;
}
.search-offense-wrap {
    position: relative;   /* ancre le dropdown */
    width: 100%;
}
.search-offense-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gris-bordure);
    border-radius: var(--rayon);
    font-family: inherit;
    font-size: 14px;
    color: var(--texte);
    background: var(--blanc);
    transition: border-color 0.18s;
    box-sizing: border-box;
}
.search-offense-wrap input:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(0,38,84,0.10);
}

/* ══ Dropdown suggestions — largeur fixe, texte tronqué ═════ */
.suggestions {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;          /* même largeur que l'input parent */
    z-index: 1000;
    background: var(--blanc);
    border: 1.5px solid var(--bleu);
    border-radius: var(--rayon);
    box-shadow: 0 8px 24px rgba(0,38,84,0.14);
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;  /* aucun débordement horizontal */
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--gris-bordure);
    min-width: 0;        /* permet la troncature */
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item.active { background: var(--bleu-clair); }

.sug-natinf {
    font-weight: 800;
    font-size: 11.5px;
    color: var(--bleu);
    background: var(--bleu-clair);
    border: 1px solid var(--bleu-mid);
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}
.suggestion-item:hover .sug-natinf,
.suggestion-item.active .sug-natinf {
    background: var(--bleu);
    color: var(--blanc);
    border-color: var(--bleu-fonce);
}
.sug-label {
    font-size: 13px;
    color: var(--texte);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.suggestion-item:hover .sug-label,
.suggestion-item.active .sug-label { color: var(--bleu-fonce); font-weight: 600; }

/* ══ main-wrapper : largeur fixe, jamais élargie ════════════ */
.main-wrapper {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 48px;
    box-sizing: border-box;
    overflow-x: hidden;   /* sécurité anti-débordement */
}

/* ════════════════════════════════════════════════════════════════
   ZONE IMPRESSION — cachée à l'écran
════════════════════════════════════════════════════════════════ */
#zone-impression-pve {
    display: none;
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: 9pt;
    color: #000;
    background: #fff;
    box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════════
   IMPRESSION @media print
════════════════════════════════════════════════════════════════ */
@media print {
    @page {
        size: A4 portrait;
        margin: 14mm 12mm 14mm 12mm;
    }

    /* Masquer tout sauf la zone d'impression */
    body > *:not(#zone-impression-pve) { display: none !important; }

    #zone-impression-pve {
        display: block !important;
        width: 100%;
        padding: 0;
        margin: 0;
        font-size: 8.5pt;
        font-family: 'Arial Narrow', Arial, sans-serif;
        color: #000;
        background: #fff;
    }

    /* ── Bandeau RF ─────────────────────────────────────── */
    .ipv-bandeau {
        background: #002654 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #fff !important;
        text-align: center;
        padding: 4pt 0 3pt;
        margin-bottom: 5pt;
    }
    .ipv-rf {
        font-size: 11pt;
        font-weight: bold;
        letter-spacing: 2px;
        text-transform: uppercase;
    }
    .ipv-soustitre {
        font-size: 7pt;
        opacity: .85;
        letter-spacing: 1.5px;
        margin-top: 1pt;
    }

    /* ── En-tête tri-colonnes ───────────────────────────── */
    .ipv-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-top: 2pt solid #002654;
        border-bottom: 1.5pt solid #002654;
        padding: 5pt 0 4pt;
        margin-bottom: 6pt;
        gap: 6pt;
    }
    .ipv-header-left  { font-size: 7.5pt; line-height: 1.5; min-width: 80pt; }
    .ipv-header-right { font-size: 7.5pt; text-align: right; min-width: 80pt; line-height: 1.5; }
    .ipv-service-label { font-size: 6.5pt; color: #555; text-transform: uppercase; letter-spacing: .5px; }
    .ipv-service-value { font-size: 9pt; font-weight: bold; color: #002654; }
    .ipv-header-center { text-align: center; flex: 1; }
    .ipv-doc-title {
        font-size: 13pt;
        font-weight: bold;
        color: #002654;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        line-height: 1.2;
    }
    .ipv-doc-ref { font-size: 6.5pt; color: #666; margin-top: 2pt; }
    .ipv-classif {
        display: inline-block;
        border: 1pt solid #002654;
        padding: 1.5pt 5pt;
        font-size: 6pt;
        font-weight: bold;
        color: #002654;
        text-transform: uppercase;
        letter-spacing: .5px;
        margin-bottom: 3pt;
    }
    .ipv-date-label { font-size: 7.5pt; font-weight: bold; }

    /* ── Sections ───────────────────────────────────────── */
    .ipv-section {
        border: .75pt solid #b0bcd4;
        border-radius: 2pt;
        overflow: hidden;
        margin-bottom: 5pt;
        break-inside: avoid;
    }
    .ipv-section-head {
        background: #002654 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #fff !important;
        padding: 2.5pt 7pt;
        font-size: 7.5pt;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: .7px;
    }
    .ipv-section-body { padding: 5pt 7pt; }
    .ipv-section-body--table { padding: 0; }

    /* ── Grilles de champs ──────────────────────────────── */
    .ipv-row-1, .ipv-row-2, .ipv-row-3 {
        display: flex;
        gap: 6pt;
        margin-bottom: 3pt;
    }
    .ipv-row-1 .ipv-cell { flex: 1; }
    .ipv-row-2 .ipv-cell { flex: 1; }
    .ipv-row-3 .ipv-cell { flex: 1; }
    .ipv-cell {
        display: flex;
        flex-direction: column;
        gap: 1.5pt;
        border-bottom: .5pt solid #dde3ee;
        padding-bottom: 3pt;
    }
    .ipv-lbl {
        font-size: 6.5pt;
        color: #556;
        text-transform: uppercase;
        letter-spacing: .4px;
        font-weight: bold;
    }
    .ipv-val {
        font-size: 8.5pt;
        font-weight: bold;
        color: #000;
    }
    .ipv-immat {
        font-size: 10pt;
        font-family: 'Courier New', monospace;
        letter-spacing: 1px;
    }

    /* ── Tableau infractions ────────────────────────────── */
    .ipv-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 7.5pt;
    }
    .ipv-table thead th {
        background: #e8eef8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #002654;
        border: .5pt solid #aab8d4;
        padding: 2.5pt 5pt;
        font-size: 7pt;
        font-weight: bold;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: .4px;
    }
    .ipv-table tbody td {
        border: .5pt solid #cdd5e4;
        padding: 2.5pt 5pt;
        vertical-align: top;
    }
    .ipv-row-even td { background: #f8f9fb !important; print-color-adjust: exact; }
    .ipv-tc { text-align: center; }
    .ipv-natinf-cell { font-weight: bold; color: #002654; }
    .ipv-montant { font-weight: bold; }

    /* ── Totaux & avertissement AFD ─────────────────────── */
    .ipv-totaux {
        display: flex;
        gap: 18pt;
        justify-content: flex-end;
        padding: 4pt 7pt;
        font-size: 8pt;
        font-weight: bold;
        border-top: .5pt solid #cdd5e4;
    }
    .ipv-total-item { color: #002654; }
    .ipv-afd-warn {
        background: #fff8e1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border-top: 1pt solid #f0a500;
        padding: 4pt 7pt;
        font-size: 7pt;
        font-style: italic;
        color: #7a5200;
    }

    /* ── Mesures complémentaires ────────────────────────── */
    .ipv-mesure {
        font-size: 7.5pt;
        margin-bottom: 2pt;
        padding: 2pt 0;
        border-bottom: .5pt dotted #ccc;
    }

    /* ── Signatures ─────────────────────────────────────── */
    .ipv-signatures {
        display: flex;
        gap: 10pt;
        margin-top: 8pt;
        padding-top: 5pt;
        border-top: 1.5pt solid #002654;
        break-inside: avoid;
    }
    .ipv-sig-bloc { flex: 1; }
    .ipv-sig-bloc--large { flex: 2; }
    .ipv-sig-label {
        font-size: 7pt;
        font-weight: bold;
        color: #333;
        text-transform: uppercase;
        letter-spacing: .4px;
        margin-bottom: 3pt;
    }
    .ipv-sig-valeur { font-size: 8pt; font-weight: bold; margin-bottom: 3pt; }
    .ipv-sig-ligne {
        border-bottom: 1pt solid #555;
        height: 18pt;
    }
    .ipv-sig-ligne--large { height: 22pt; }
    .ipv-sig-nom {
        font-size: 7.5pt;
        text-align: center;
        margin-top: 2pt;
        font-weight: bold;
        color: #002654;
    }

    /* ── Pied de page ───────────────────────────────────── */
    .ipv-footer {
        display: flex;
        justify-content: space-between;
        margin-top: 6pt;
        padding-top: 3pt;
        border-top: .5pt solid #bbb;
        font-size: 6pt;
        color: #888;
        font-style: italic;
    }
}


/* ══════════════════════════════════════════════════════════════
   MODALE ALERTE AFD — à ajouter dans proces-verbal-electronique.css
══════════════════════════════════════════════════════════════ */

/* ── Priorité z-index ── */
#afdModal { z-index: 9500; }

/* ── Boîte : bordure top orange ── */
#afdModal .modal-box {
    border-top: 4px solid var(--orange);
    padding: 0;
    overflow: hidden;
}

/* ── En-tête h3 avec fond orange clair ── */
#afdModal .modal-box h3 {
    background: var(--orange-clair);
    color: var(--orange);
    border-bottom: 1px solid #dfc060;
    margin: 0;
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#afdModal .modal-box h3::before {
    content: "⚠";
    font-size: 15px;
}

/* ── Corps du texte ── */
#afdModal #afdModalText {
    display: block;
    font-size: 13px;
    color: var(--gris-texte);
    line-height: 1.6;
    padding: 20px 24px 0;
    margin: 0;
}

/* ── Conteneur bouton ── */
#afdModal .modal-actions {
    justify-content: center;
    padding: 18px 24px 22px;
}

/* ── Bouton Fermer : surcharge .btn et .btn-danger ── */
#afdModal .modal-actions .btn.btn-danger {
    flex: unset;
    min-width: 130px;
    background: var(--blanc) !important;
    color: var(--orange) !important;
    border: 1.5px solid var(--orange) !important;
    transform: none !important;
    box-shadow: none !important;
}

#afdModal .modal-actions .btn.btn-danger:hover {
    background: var(--orange) !important;
    color: var(--blanc) !important;
    transform: translateY(-1px) !important;
}

/* ── Erreur inline dans modal-identite-agent ── */
#modal-identite-agent .modal-error {
    display: block;
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--rouge);
    background: var(--rouge-clair);
    border: 1px solid var(--rouge);
    border-radius: var(--rayon);
    padding: 8px 12px;
}

/* ── Erreur inline dans #modal-identite-agent ── */
#modal-identite-agent .modal-error {
    display: block;
    margin: 8px 0 0;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rouge);
    background: var(--rouge-clair);
    border: 1px solid var(--rouge);
    border-radius: var(--rayon);
}