/* Styles communs pour l'application de gestion de garage */

/* ===== CSS CUSTOM PROPERTIES (Variables) ===== */
:root {
    /* PRIMAIRES */
    --primary: #3498DB;           /* Bleu (boutons CTA, actions principales) */
    --primary-dark: #2980B9;      /* Bleu foncé (hover) */
    --primary-light: #5DADE2;     /* Bleu clair */

    /* NAVY DOMINANT */
    --navy: #0A0E27;              /* Navy MonGaragePro (header, footer, titres) */
    --navy-light: #1A1E37;        /* Navy légèrement plus clair */

    /* ACCENT ORANGE */
    --accent-brand: #FF4D00;      /* Orange MonGaragePro (logo "Garage", icônes) */
    --accent-brand-light: #FF7A3D; /* Orange clair */

    /* AUTRES ACCENTS */
    --accent-success: #28A745;    /* Vert (succès, validations) */
    --accent-warning: #FFC107;    /* Jaune (alertes) */
    --accent-danger: #DC3545;     /* Rouge (erreurs) */

    /* NEUTRES */
    --text-dark: #2C3E50;         /* Texte principal */
    --text-medium: #6B7280;       /* Texte secondaire */
    --text-light: #999999;        /* Texte tertiaire */

    /* BACKGROUNDS */
    --bg-body: #F4F4F4;           /* Background principal */
    --bg-white: #FFFFFF;          /* Cards, modals */
    --bg-light: #F8F9FA;          /* Info-items, sections alternées */
    --border: #DDDDDD;            /* Bordures */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-body);
}

/* Header */
.header {
    background: var(--navy);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: background 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.nav a.active {
    background: var(--primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
        margin: 15px auto;
    }
}

/* Alertes */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert .close-btn {
    margin-left: auto;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    opacity: 0.7;
}

.alert .close-btn:hover {
    opacity: 1;
}

/* Boutons - Charte graphique standardisée */
.btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: middle;
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(34, 153, 84, 0.3);
}

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

/* Variante primaire (vert) - par défaut */
.btn-primary {
    background: var(--primary);
}

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

/* Variante secondaire (bleu) */
.btn-secondary {
    background: var(--primary);
}

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

/* Variante info (cyan) */
.btn-info {
    background: #17a2b8;
}

.btn-info:hover {
    background: #138496;
}

/* Variante succès (vert clair) */
.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

/* Variante avertissement (orange) */
.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Variante danger (rouge) */
.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Variante secondaire/outline (violet) */
.btn-purple {
    background: #6f42c1;
}

.btn-purple:hover {
    background: #5a32a3;
}

/* Tailles des boutons */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-md {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--navy);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background: #f8f8f8;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Cards */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 5px;
}

.stat-card .label {
    color: #666;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 20px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions a {
    padding: 5px 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

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

.actions a.delete {
    background: #dc3545;
}

.actions a.delete:hover {
    background: #c82333;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-label {
    font-weight: bold;
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    color: var(--navy);
}

/* Filtres inline par colonne (liste_interventions) */
tr.filter-row th {
    padding: 5px 8px;
    background: #0d1230;
}

tr.filter-row input[type="text"],
tr.filter-row select.filter-select {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 3px;
    background: rgba(255,255,255,0.10);
    color: white;
    box-sizing: border-box;
}

tr.filter-row input[type="text"]::placeholder {
    color: rgba(255,255,255,0.45);
}

tr.filter-row input[type="text"]:focus,
tr.filter-row select.filter-select:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.18);
    outline: none;
}

tr.filter-row select.filter-select option {
    background: var(--navy);
    color: white;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    background: var(--navy);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #ccc;
}

.modal-body {
    padding: 25px;
}

/* Page Garages */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #f0f7ff;
    border: 1px solid #c7d9f0;
    border-radius: 6px;
    overflow: hidden;
}
.help-table tr + tr {
    border-top: 1px solid #dce8f5;
}
.help-table td {
    padding: 10px 14px;
    vertical-align: top;
    line-height: 1.5;
}
.help-table td:first-child {
    white-space: nowrap;
    font-weight: 600;
    color: #1a4a7a;
    width: 180px;
    background: #e0edf9;
}
.help-table td:last-child {
    color: #2d3748;
}

.garages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .garages-grid {
        grid-template-columns: 1fr;
    }
}

.garage-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.garage-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.garage-card.inactive {
    opacity: 0.6;
}

.garage-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.garage-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.garage-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.garage-info h3 {
    margin: 0;
    color: var(--navy);
}

.garage-status {
    font-size: 12px;
    font-weight: 500;
}

.garage-status.active {
    color: var(--primary);
}

.garage-status.inactive {
    color: #95a5a6;
}

.garage-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--navy);
}

.garage-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.garage-footer {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Button sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Form styles */
.form-container {
    max-width: 600px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--navy);
}

/* Labels for checkboxes without for attribute - inline */
.form-group > label:has(input[type="checkbox"]),
.form-group > label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 10px;
    cursor: pointer;
}

.form-group > label:has(input[type="checkbox"]) input[type="checkbox"],
.form-group > label:has(input[type="radio"]) input[type="radio"] {
    margin-right: 8px;
    margin-bottom: 0;
    width: auto;
    cursor: pointer;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Checkboxes and radio buttons standalone */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Font Awesome - Ajustements icônes
   ============================================ */

/* Espacement uniforme */
.intervention-category-title i,
.checkbox-label i {
    margin-right: 6px;
    width: 16px;
    display: inline-block;
    text-align: center;
}

/* Icônes doubles - réduire espacement */
.checkbox-label i + i {
    margin-right: 4px;
    margin-left: -2px;
}

/* Taille catégories */
.intervention-category-title i {
    font-size: 16px;
}

/* Couleurs par catégorie */
.intervention-category:nth-child(1) .intervention-category-title i { color: #f39c12; } /* Vidange */
.intervention-category:nth-child(2) .intervention-category-title i { color: #e74c3c; } /* Freinage */
.intervention-category:nth-child(3) .intervention-category-title i { color: var(--navy); } /* Pneus */
.intervention-category:nth-child(4) .intervention-category-title i { color: #7f8c8d; } /* Moteur */
.intervention-category:nth-child(5) .intervention-category-title i { color: var(--primary); } /* Direction */
.intervention-category:nth-child(6) .intervention-category-title i { color: #9b59b6; } /* Transmission */
.intervention-category:nth-child(7) .intervention-category-title i { color: #f1c40f; } /* Électricité */
.intervention-category:nth-child(8) .intervention-category-title i { color: #95a5a6; } /* Divers */

/* Effet hover */
.checkbox-label:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* ============================================
   Optimisation du tableau des interventions
   ============================================ */

/* Wrapping pour colonnes de texte */
table td:nth-child(3) {  /* Véhicule */
    word-break: break-word;
}
table td:nth-child(6) {  /* Interventions */
    text-align: center;
    word-break: break-word;
}

/* Colonne Actions - flexbox pour wrapping des boutons */
table td:nth-child(10) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: auto;
}

/* Actions - boutons côte à côte */
.actions {
    gap: 8px;
    justify-content: center;
}

.actions a {
    padding: 6px 8px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Grille responsive pour documents (CT et carte grise)
   ============================================ */
.documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Responsive utilities
   ============================================ */

/* Column visibility helpers for tables */
@media (max-width: 768px) {
    .col-hide-mobile {
        display: none;
    }
}

/* Page header responsive */
@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .page-header h1 {
        font-size: 20px;
    }
}

/* Touch-friendly minimum tap targets on mobile */
@media (max-width: 768px) {
    .actions a,
    .actions button {
        min-height: 36px;
        padding: 8px 12px;
    }
}

/* Client portal header - responsive fix */
@media (max-width: 600px) {
    .client-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
    }
    .client-info {
        width: 100%;
        justify-content: space-between;
    }
    .client-name {
        font-size: 14px;
    }
    .btn-logout {
        padding: 6px 12px;
        font-size: 13px;
    }
    .client-logo h1 {
        font-size: 16px;
    }
}

/* ============================================================================ */
/* SYSTÈME D'ONGLETS - v2.18.0 Contrôle de géométrie */
/* ============================================================================ */

.intervention-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin: 20px 0 0 0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
}

.tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}


.tab-content {
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    display: none;
    margin-bottom: 25px;
}

.tab-content.active {
    display: block;
}

/* ============================================================================ */
/* CONTRÔLE DE GÉOMÉTRIE - Formulaire et affichage */
/* ============================================================================ */


/* Geometry form grid */
.geometry-type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.prerequis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.prerequis-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    flex-wrap: wrap;
}

.prerequis-item input[type="checkbox"],
.prerequis-item input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.prerequis-item select {
    flex: 1;
    min-width: 100px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.prerequis-input {
    width: 100px;
    padding: 5px;
    font-size: 12px;
}

/* Measurement sections */
.measurement-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.measurement-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--navy);
}

.tolerance-info {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: auto;
}

.measurement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.measurement-column {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.column-header {
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.measurement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.measurement-row label {
    width: 60px;
    font-size: 13px;
}

.geometry-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.geometry-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Conformity indicators */
.conformity-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.conformity-indicator.conforme {
    background: #d4edda;
    color: #155724;
}

.conformity-indicator.warning {
    background: #fff3cd;
    color: #856404;
}

.conformity-indicator.non-conforme {
    background: #f8d7da;
    color: #721c24;
}

/* Conformity selector for global result */
.conformity-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.conformity-option {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.conformity-option input {
    display: none;
}

.conformity-option input:checked + span {
    font-weight: bold;
}

.conformity-option.conforme:has(input:checked) {
    border-color: #28a745;
    background: #d4edda;
}

.conformity-option.partiellement:has(input:checked) {
    border-color: #ffc107;
    background: #fff3cd;
}

.conformity-option.non-conforme:has(input:checked) {
    border-color: #dc3545;
    background: #f8d7da;
}

/* Card styling */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.card-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--navy);
}

/* Responsive adjustments for geometry */
@media (max-width: 768px) {
    .intervention-tabs {
        flex-direction: column;
        border-radius: 8px;
    }

    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        justify-content: flex-start;
    }

    .tab-btn.active {
        border-left-color: var(--primary);
        border-bottom-color: transparent;
    }

    .tab-content {
        border-radius: 0 0 8px 8px;
    }

    .measurement-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

    .conformity-selector {
        flex-direction: column;
    }

    .conformity-option {
        min-width: unset;
    }
}

@media (max-width: 600px) {
    .tab-btn {
        padding: 12px 15px;
        font-size: 13px;
    }

    .measurement-row {
        flex-wrap: wrap;
    }

    .measurement-row label {
        width: 100%;
    }

    .geometry-input {
        width: 100%;
    }

    .measurement-column {
        padding: 10px;
    }

    .prerequis-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== AFFICHAGE VISUEL GÉOMÉTRIE - Schéma professionnel ===== */

.geometry-visual-display {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.geometry-header {
    margin-bottom: 20px;
}

.geometry-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--navy);
}

.geometry-prerequisites {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.geometry-prerequisites h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--primary);
}

.prereq-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.prereq-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.prereq-obs {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #333;
}

/* Schéma visuel principal */
.geometry-schema-container {
    margin: 30px 0;
}

/* Grille 2x2 avec SVG au centre sur 2 lignes */
.geometry-vehicle-grid {
    display: grid;
    grid-template-columns: 1fr 400px 1fr;
    grid-template-rows: auto auto;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

/* Positionnement du SVG au centre (colonne 2, rows 1-3) */
.geometry-vehicle-grid .vehicle-center {
    grid-column: 2;
    grid-row: 1 / 3;
}

/* Positionnement des roues */
.geometry-vehicle-grid .wheel-avg {
    grid-column: 1;
    grid-row: 1;
}

.geometry-vehicle-grid .wheel-avd {
    grid-column: 3;
    grid-row: 1;
}

.geometry-vehicle-grid .wheel-arg {
    grid-column: 1;
    grid-row: 2;
}

.geometry-vehicle-grid .wheel-ard {
    grid-column: 3;
    grid-row: 2;
}

.geometry-main-grid {
    display: grid;
    grid-template-columns: 1fr 400px 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

/* Blocs de valeurs par roue */
.wheel-values {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.wheel-values h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    text-align: center;
}

.measure-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.measure-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.measure-label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value-pair {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
}

.value-pair .before {
    color: #888;
}

.value-pair .arrow {
    color: var(--primary);
    font-weight: bold;
}

.value-pair .after {
    color: #333;
    font-weight: 600;
}

.tolerance {
    display: block;
    font-size: 11px;
    color: #888;
    font-style: italic;
    margin-top: 3px;
}

/* Schéma SVG */
.vehicle-schema {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.vehicle-schema svg {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

/* Spacer pour grille arrière */
.spacer {
    /* Vide pour aligner les roues arrière avec le schéma */
}

/* Badges de conformité */
.conformity-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.conformity-badge.conforme {
    background: #28a745;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.conformity-badge.conforme:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.conformity-badge.warning {
    background: #ffc107;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.conformity-badge.warning:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

.conformity-badge.non-conforme {
    background: #dc3545;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.conformity-badge.non-conforme:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.conformity-badge.conformity-na {
    background: #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.6;
}

/* Background de conformité par valeur (before/after) */
.before.conformity-conforme,
.after.conformity-conforme {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.before.conformity-warning,
.after.conformity-warning {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.before.conformity-non-conforme,
.after.conformity-non-conforme {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.before.conformity-na,
.after.conformity-na {
    background: #e2e3e5;
    color: #383d41;
    padding: 4px 8px;
    border-radius: 3px;
    opacity: 0.7;
}

/* Totaux et angle de poussée */
.geometry-totals-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.total-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.total-item:last-child {
    margin-bottom: 0;
}

.total-item .label {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.total-item .value-before {
    color: #888;
    font-family: 'Courier New', monospace;
}

.total-item .arrow {
    color: var(--primary);
    font-weight: bold;
}

.total-item .value-after {
    color: #333;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.angle-poussee {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

/* Résultat global */
.result-status {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.result-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.result-badge.conforme {
    background: #d4edda;
    color: #155724;
}

.result-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.result-badge.non-conforme {
    background: #f8d7da;
    color: #721c24;
}

.result-obs {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* ===== RESPONSIVE AFFICHAGE GÉOMÉTRIE ===== */

@media (max-width: 1200px) {
    .geometry-main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .vehicle-schema {
        max-width: 300px;
    }

    .wheel-values {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .geometry-visual-display {
        padding: 15px;
    }

    .geometry-main-grid {
        gap: 10px;
    }

    .wheel-values {
        padding: 12px;
    }

    .wheel-values h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .measure-row {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

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

    .value-pair {
        font-size: 13px;
    }

    .tolerance {
        font-size: 10px;
    }
}

@media (max-width: 600px) {
    .geometry-main-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-schema {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .wheel-values h4 {
        font-size: 13px;
    }

    .value-pair {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .total-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .total-item .label {
        min-width: auto;
    }
}

/* ===== FORMULAIRE GÉOMÉTRIE VISUEL ===== */

.geometry-form-visual {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.prerequis-section {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.prerequis-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--primary);
}

.wheel-form-column {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.wheel-form-column h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.measure-input-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.measure-input-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.measure-input-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-pair {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.input-pair input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.input-pair input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.vehicle-schema-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0.7;
    pointer-events: none; /* Visuel seulement */
}

.vehicle-schema-form svg {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.measurement-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.measurement-section h5 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.form-group textarea {
    font-family: Arial, sans-serif;
    resize: vertical;
}

.conformity-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + .radio-visual {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.radio-visual {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-visual.conforme {
    background: #28a745;
}

.radio-visual.warning {
    background: #ffc107;
}

.radio-visual.non-conforme {
    background: #dc3545;
}

/* ===== RESPONSIVE FORMULAIRE GÉOMÉTRIE ===== */

@media (max-width: 1200px) {
    .geometry-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .vehicle-schema-form {
        max-width: 300px;
    }

    .wheel-form-column {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .geometry-form-visual {
        padding: 15px;
    }

    .wheel-form-column {
        padding: 12px;
    }

    .wheel-form-column h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .measure-input-group {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .input-pair {
        flex-wrap: wrap;
    }

    .input-pair input {
        flex: 1;
        min-width: 100px;
    }

    .conformity-selector {
        flex-wrap: wrap;
    }

    .radio-label {
        flex: 0 1 calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .geometry-form-grid {
        gap: 10px;
    }

    .vehicle-schema-form {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .input-pair {
        flex-direction: column;
    }

    .input-pair input {
        width: 100%;
    }

    .conformity-selector {
        flex-direction: column;
    }

    .radio-label {
        flex: 0 1 auto;
    }
}

/* ============================================================
   PLANNING / CALENDRIER (EventCalendar) - v3.19.0
   ============================================================ */

/* --- Filtres en chips --- */
.planning-filters {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.planning-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.planning-filter-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--navy);
    flex-shrink: 0;
    min-width: 110px;
}

.planning-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.planning-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 16px;
    background: white;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
    line-height: 1.3;
}

.planning-chip:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.planning-chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.planning-chip.active .planning-chip-dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.planning-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.planning-hint {
    font-size: 12px;
    color: #888;
    margin: 0 0 12px;
}

.planning-calendar {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

/* --- Thème EventCalendar aux couleurs projet --- */
.ec-toolbar .ec-button {
    background: white;
    border: 1px solid #ddd;
    color: var(--navy);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.ec-toolbar .ec-button:hover:not(:disabled) {
    background: #f0f7ff;
    border-color: var(--primary);
}

.ec-toolbar .ec-button.ec-active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: white;
}

.ec-toolbar .ec-title {
    color: var(--navy);
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
}

.ec-event {
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.ec-today {
    background: #f0f7ff !important;
}

.ec-now-indicator {
    border-color: #e74c3c;
}

/* Événement fantôme (placement RDV dans la modale) */
.ec-event.ec-ghost-event {
    border: 2px dashed rgba(255, 255, 255, 0.9);
    opacity: 0.85;
}

/* --- Popover détail RDV --- */
.event-popover {
    position: fixed;
    z-index: 1100;
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    font-size: 13px;
}

.event-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    background: var(--navy);
    color: white;
    border-radius: 8px 8px 0 0;
}

.event-popover-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.event-popover-body {
    padding: 12px 14px;
}

.event-popover-line {
    margin-bottom: 7px;
    color: #444;
}

.event-popover-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.event-popover-footer {
    padding: 10px 14px;
    border-top: 1px solid #eee;
}

/* --- Toasts --- */
.gc-toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.gc-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    animation: gc-toast-in 0.25s ease;
    max-width: 90vw;
}

.gc-toast--success { background: #27ae60; }
.gc-toast--error   { background: #e74c3c; }
.gc-toast--info    { background: var(--navy); }

.gc-toast--hide {
    opacity: 0;
    transition: opacity 0.3s;
}

.gc-toast-action {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.gc-toast-action:hover {
    background: white;
}

.gc-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes gc-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Modale RDV plein écran --- */
.rdv-modal--fullscreen > div {
    width: 98vw !important;
    max-width: 98vw !important;
    margin: 1vh auto !important;
    max-height: 98vh !important;
}

.rdv-modal--fullscreen #rdvCalendar {
    height: 70vh !important;
}
