/* --- DESIGN GLOBAL & LAYOUT --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f0e1;
    color: #1e3d59;
    overflow-x: hidden;
}
img, table, video, iframe, svg {
    max-width: 100%;
    height: auto;
}
.app-layout {
    display: flex;
    height: 100vh;
    position: relative;
}
/* Barre latérale (RÉDUITE POUR GAGNER DE LA PLACE) */
.sidebar {
    width: 170px;
    min-width: 170px;
    background-color: #1e3d59;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px 12px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease, padding 0.3s ease, min-width 0.3s ease;
}
.app-layout.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
}
.logo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    white-space: nowrap;
}
.sidebar > div:first-child {
    display: flex;
    flex-direction: column;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex-grow: 0;
    margin-top: auto;
    width: 100%;
}
.nav-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.9;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    transition: background 0.2s, opacity 0.2s;
}
.nav-group-title:hover {
    background-color: rgba(255,255,255,0.1);
}
.nav-group-title::after {
    content: '▸';
    font-size: 10px;
    opacity: 0.7;
    margin-left: 8px;
}
.nav-group.open .nav-group-title::after {
    content: '▾';
}
.nav-group:not(.nav-group-standalone) .nav-sub {
    display: none;
}
.nav-group.open:not(.nav-group-standalone) .nav-sub {
    display: block;
}
.nav-sub {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-sub li {
    padding: 6px 10px 6px 24px;
    border-radius: 8px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    white-space: nowrap;
}
.nav-sub li.active, .nav-sub li:hover {
    background-color: #17b978;
}
.nav-group-standalone .nav-sub li {
    padding: 8px 10px;
}
.user-profile {
    font-size: 13px;
    font-weight: bold;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0 10px;
    white-space: nowrap;
    background-color: #1e3d59;
    flex-shrink: 0;
}
/* Zone principale */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    min-width: 0;
    padding: 10px;
    gap: 10px;
    transition: padding 0.3s ease;
}
@media (max-width: 600px) {
    .main-content {
        padding: 8px;
        gap: 8px;
    }
}
#sidebar-toggle {
    position: absolute;
    top: 50%;
    left: 170px;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 44px;
    background: #1e3d59;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 13px;
    z-index: 100;
    opacity: 0.7;
    pointer-events: auto;
    transition: left 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}
#sidebar-toggle:hover,
.sidebar:hover ~ #sidebar-toggle {
    opacity: 1;
}
.app-layout.sidebar-collapsed #sidebar-toggle {
    left: 0;
    opacity: 1;
}
.view-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* En-tête de la page */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.header h2 {
    margin: 0;
    font-size: 22px;
}
.header-sub {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 14px;
}
.planning-titre-groupe {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-legende-couleurs {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #1e3d59;
    background: #fff;
    color: #1e3d59;
    font-weight: 800;
    font-size: 14px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.btn-legende-couleurs:hover {
    background: #1e3d59;
    color: #fff;
}
.legende-ligne {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 7px 0;
}
.legende-pastille {
    width: 26px;
    height: 15px;
    border-radius: 4px;
    flex-shrink: 0;
    border-left: 3px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.legende-separateur {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 12px 0;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-primary {
    background-color: #1e3d59;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: #17b978;
}
.btn-toggle {
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.btn-toggle.active {
    background-color: #10b981;
    color: white;
}
.date-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f0e1;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}
.btn-nav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #1e3d59;
}
/* --- DESIGN DU PLANNING (TIMELINE ELARGIE) --- */
.timeline-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.timeline-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f5f0e1;
    padding-bottom: 6px;
    margin-bottom: 6px;
}
.machine-col-header {
    width: 90px;
    min-width: 90px;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}
#timeline-hours-wrapper {
    flex: 1;
    position: relative;
    height: 20px;
}
#timeline-hours {
    display: flex;
    width: 100%;
    height: 100%;
}
.hour-cell-header {
    flex: 1;
    box-sizing: border-box;
    position: relative;
    font-size: 11px;
    color: #64748b;
}
.hour-cell-header span {
    position: absolute;
    left: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}
.timeline-row {
    display: flex;
    align-items: center;
    position: relative;
    padding: 8px 0;
    border-bottom: 1px solid #f5f0e1;
}
.machine-cell {
    width: 90px;
    min-width: 90px;
    font-weight: bold;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    flex-shrink: 0;
}
/* Statuts de maintenance */
.maintenance-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: help;
    flex-shrink: 0;
}
.status-green { background-color: #2ecc71; }
.status-orange { background-color: #f39c12; }
.status-red { background-color: #e74c3c; }

.maintenance-status[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    background-color: #1e3d59;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: none;
}
.hours-grid-background {
    position: relative !important;
    flex: 1 1 auto;
    height: 32px;
    overflow: hidden;
    display: block;
    z-index: 0;
}
.hours-grid-cells {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}
.grid-hour-block {
    flex: 1;
    border-right: 1px solid #f1f5f9;
    box-sizing: border-box;
    height: 100%;
    cursor: pointer;
    background-color: transparent !important;
    position: relative;
    z-index: 2;
}
.grid-hour-block:last-child {
    border-right: none;
}
.timeline-row.vi-planeur-row .grid-hour-block {
    border-right-color: rgba(0, 0, 0, 0.15);
}
.reservation-bar {
    position: absolute;
    top: 5px;
    height: 25px;
    background-color: #ff6e40;
    color: white;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
    box-sizing: border-box;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 10 !important;
    border-left: 4px solid #1e3d59;
}
.reservation-bar.vi-sans-pilote {
    background-color: #00adb5;
    border-left: 4px solid #112d4e;
}
.reservation-bar.vi-avec-pilote {
    background-color: #e11d48;
    border-left: 4px solid #881337;
}
.reservation-bar.reservation-instruction,
.reservation-bar.reservation-avec-instructeur {
    background-color: #3b82f6;
    color: #ffffff;
}
.reservation-bar.reservation-instruction strong,
.reservation-bar.reservation-avec-instructeur strong {
    color: #ffffff;
}
.reservation-bar.reservation-remorquage {
    background-color: #eab308;
    border-left: 4px solid #854d0e;
}
.reservation-bar.vi-planeur {
    background-color: #8e44ad;
    border-left: 4px solid #5b2c6f;
}
.reservation-bar.ma-reservation {
    background-color: #10b981 !important;
    border-left: 5px solid #047857 !important;
}
.timeline-row.vi-planeur-row {
    background-color: #f8f0fc;
}
.reservation-bar:hover {
    filter: brightness(1.05);
}
.reservation-bar[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e3d59;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: pre;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: none;
}
.reservation-bar strong {
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.reservation-bar span {
    font-size: 10.5px;
    opacity: 0.9;
}
.ghost-bar-preview {
    position: absolute;
    top: 4px !important;
    bottom: 4px !important;
    height: auto !important;
    background-color: rgba(234, 179, 8, 0.25) !important;
    border: 2px dashed #d97706 !important;
    border-radius: 6px !important;
    z-index: 10 !important;
    box-sizing: border-box;
    display: flex;                  /* Permet d'aligner le contenu */
    align-items: center;            /* Centre verticalement */
    justify-content: center;        /* Centre horizontalement */
}
.resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    z-index: 12;
}
.resize-handle-left { left: 0; }
.resize-handle-right { right: 0; }
.resize-handle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-style: italic;
}
#saving-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    background: rgba(30, 61, 89, 0.35);
    align-items: center;
    justify-content: center;
}
.saving-overlay-box {
    background: #fff;
    padding: 24px 36px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 16px;
    color: #1e3d59;
    font-weight: 600;
    font-size: 15px;
}
.saving-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #e2e8f0;
    border-top-color: #1e3d59;
    border-radius: 50%;
    animation: saving-spin 0.8s linear infinite;
}
@keyframes saving-spin {
    to { transform: rotate(360deg); }
}
.reservation-bar.short-reservation {
    padding: 0 4px; 
    justify-content: center;
}
.reservation-bar.short-reservation strong {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    text-align: center;
}
.reservation-bar.short-reservation span {
    font-size: 9px;
    text-align: center;
    display: block;
    white-space: nowrap;
}
.reservation-bar.very-short-reservation {
    padding: 0 2px;
}
.reservation-bar.very-short-reservation strong {
    font-size: 8.5px;
}
.reservation-bar.very-short-reservation span {
    font-size: 7.5px;
}
/* --- SECTIONS INSCRIPTIONS PLANEUR --- */
.glider-presence-section {
    padding: 15px;
    background-color: #ffffff;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.presence-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.glider-presence-section h3 {
    margin-top: 0;
    color: #1e3d59;
    border-bottom: 2px solid #f5f0e1;
    padding-bottom: 6px;
    font-size: 16px;
}
.glider-presence-container {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.presence-card {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.presence-card h4 {
    margin-top: 0;
    text-align: center;
    color: #334155;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
}
.presence-list {
    list-style: none;
    padding: 0;
    margin: 6px 0;
    flex-grow: 1;
}
.presence-list li {
    padding: 5px 8px;
    background: white;
    margin-bottom: 4px;
    border-radius: 4px;
    border-left: 4px solid #ff6e40;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-remove-presence {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
}
.btn-inscription {
    background: none;
    border: none;
    color: #1e3d59;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
    text-align: left;
}
.btn-inscription:hover {
    color: #ff6e40;
}
.btn-comment {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.btn-comment:hover {
    opacity: 1;
}
.comment-text {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}
.presence-heures {
    font-size: 11px;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.presence-briefing {
    font-size: 11px;
    font-weight: 600;
    color: #1e3d59;
    white-space: nowrap;
}
.presence-heures-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.presence-heures-btn:hover {
    background: #bbf7d0;
    outline: 1px dashed #166534;
}
/* --- POP-UP MODALE --- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.close-modal, .close-modal-vi, .close-modal-carnet, .close-modal-gerer-dispos, .close-modal-disponibilite, .close-modal-instructeur-suivi, .close-documents-aeronef {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 24px; cursor: pointer;
    color: #64748b;
}
#carnet-modal .modal-content {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100vh;
    margin: 0;
    padding: 12px 16px;
    overflow-y: auto;
    box-sizing: border-box;
}
#carnet-modal .modal-header {
    margin-bottom: 8px;
}
#carnet-modal .modal-header h3 {
    font-size: 18px;
}
#carnet-modal {
    align-items: center;
    justify-content: center;
    left: var(--carnet-modal-left, 170px);
    width: calc(100% - var(--carnet-modal-left, 170px));
    padding: 10px;
    box-sizing: border-box;
}
#carnet-modal.carnet-modal-jvio .modal-content {
    max-width: 850px;
    height: auto;
    padding: 12px 16px 6px 16px;
}
#carnet-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
#carnet-modal .modal-header h3 {
    margin: 0;
}
#carnet-modal .modal-header .close-modal-carnet {
    position: static;
    top: auto;
    right: auto;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}
.pc-label input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    height: 14px;
    min-height: 0;
    accent-color: #1e3d59;
    cursor: pointer;
}
/* --- GROUPES DE CASES À COCHER --- */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    justify-content: center;
}
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    background: #f8fafc;
    transition: background 0.2s, border-color 0.2s;
}
.checkbox-option:hover {
    background: #e2e8f0;
}
.checkbox-option input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    margin: 0;
}
.checkbox-option.chip-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.checkbox-option.chip-disabled:hover {
    background: #f8fafc;
}
/* --- BOUTONS D'ACTION DU FORMULAIRE --- */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.btn-submit {
    flex: 2;
    background-color: #17b978;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover {
    background-color: #11995d;
}
#btn-delete-reservation, #btn-delete-vi-planeur, #btn-delete-carnet, #btn-delete-membre, #btn-delete-maintenance {
    flex: 1;
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
#btn-delete-reservation:hover, #btn-delete-vi-planeur:hover, #btn-delete-carnet:hover, #btn-delete-membre:hover, #btn-delete-maintenance:hover {
    background-color: #dc2626;
}
#btn-cancel-carnet {
    flex: 1;
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
#btn-cancel-carnet:hover {
    background-color: #dc2626;
}
.carnet-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.carnet-header-controls label {
    margin: 0;
    color: #1e3d59;
    font-weight: 600;
}
#carnet-machine-filtre {
    background-color: #1e3d59;
    color: white;
    border: none;
    padding: 10px 32px 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
#carnet-machine-filtre:hover {
    background-color: #17b978;
}
.carnet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.carnet-table th, .carnet-table td {
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.carnet-table th {
    font-size: 0.8rem;
    background-color: #1e3d59;
    color: #fff;
}
.carnet-table thead .sub-header {
    background-color: #31577c;
}
.carnet-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.carnet-table tbody tr:hover {
    background-color: #f1f5f9;
}
/* --- BORDURES & ZONES DE NUIT / CRÉPUSCULE --- */
.night-zone {
    position: absolute !important;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}
.night-aero {
    background: repeating-linear-gradient(
        45deg,
        rgba(30, 61, 89, 0.18),
        rgba(30, 61, 89, 0.18) 10px,
        rgba(20, 45, 68, 0.28) 10px,
        rgba(20, 45, 68, 0.28) 20px
    ) !important;
    border-right: 1px dashed rgba(30, 61, 89, 0.4);
    border-left: 1px dashed rgba(30, 61, 89, 0.4);
}
.night-civil {
    background-color: rgba(135, 175, 215, 0.25) !important;
}

#suivi-table-body .reservation-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.1;
    cursor: pointer;
    z-index: 5;
}

#select-machine-suivi {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1e3d59;
    background-color: #f1f5f9;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#select-machine-suivi:hover {
    background-color: #e2e8f0;
    border-color: #2563eb;
}

#select-machine-suivi:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Réduction de la taille de la police pour les dates à gauche */
.col-date {
  font-size: 0.85rem; /* Ajustez la taille selon vos préférences */
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  padding: 8px 10px;
}

/* Style pour la colonne du potentiel restant en fin de journée à droite */
.col-potentiel-fin {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  background-color: #f8f9fa; /* Légère distinction visuelle optionnelle */
  border-left: 1px solid #dee2e6;
}

.drag-ghost-preview {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background-color: rgba(30, 61, 89, 0.15);
    border: 2px dashed #1e3d59;
    border-radius: 4px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #1e3d59;
    font-weight: bold;
    z-index: 50;
    box-sizing: border-box;
}

/* --- VUE VOL D'INITIATION --- */
.initiation-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.initiation-tab {
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.initiation-tab.active {
    background-color: #1e3d59;
    color: white;
}
.initiation-filter-btn {
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.initiation-filter-btn.active {
    background-color: #10b981;
    color: white;
}
.initiation-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    min-height: 150px;
}
.initiation-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: box-shadow 0.15s;
}
.initiation-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.initiation-card.disponible {
    border-left: 5px solid #00adb5;
    background: #f4fdfe;
}
.initiation-card.pris {
    border-left: 5px solid #3f51b5;
    background: #f4f5ff;
}
.initiation-card.bloque {
    border-left: 5px solid #cbd5e1;
    background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 10px, #e2e8f0 10px, #e2e8f0 20px);
    color: #64748b;
    opacity: 0.9;
}
.initiation-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #1e3d59;
}
.initiation-info p {
    margin: 0;
    font-size: 13px;
    color: #475569;
}
.initiation-meta {
    text-align: right;
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.initiation-meta .btn-reserver-initiation {
    margin-top: 0;
}
.initiation-empty {
    text-align: center;
    color: #64748b;
    padding: 30px;
    font-style: italic;
}
.btn-reserver-initiation {
    background-color: #00adb5;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
}
.btn-reserver-initiation:hover {
    background-color: #007f86;
}
.btn-supprimer-initiation {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
.btn-supprimer-initiation:hover {
    background: #b91c1c;
}

/* --- GESTION CRÉNEAUX VI --- */
#gestion-vi-toolbar {
    padding: 10px;
    margin-bottom: 10px;
}
#gestion-vi-toolbar h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #1e3d59;
}
#gestion-vi-toolbar .form-group {
    margin-bottom: 0;
}
#gestion-vi-toolbar .form-group input,
#gestion-vi-toolbar .form-group select,
#gestion-vi-toolbar .form-group textarea {
    padding: 6px;
    font-size: 13px;
}
#gv-type {
    width: 100%;
}

/* --- ONGLET À POURVOIR --- */
.initiation-card.apourvoir {
    border-left: 5px solid #f97316;
    background: #fff7ed;
}
.initiation-card.creneaux {
    border-left: 5px solid #00adb5;
    background: #f4fdfe;
}

/* --- CARNET DE ROUTE --- */
.carnet-table-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow-x: auto;
}
.carnet-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.carnet-table thead th {
    background: #1e3d59;
    color: white;
    padding: 12px 10px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.carnet-table thead th small {
    display: block;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 400;
    opacity: 0.9;
}
.carnet-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}
.carnet-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}
.carnet-table tbody tr:hover {
    background-color: #f1f5f9;
}
.carnet-table td {
    padding: 10px;
    vertical-align: top;
    color: #334155;
}
.carnet-table td:first-child {
    white-space: nowrap;
    font-weight: 600;
}
.carnet-empty {
    text-align: center;
    color: #64748b;
    padding: 30px;
    font-style: italic;
}
.carnet-table tfoot .carnet-total-cumule td {
    background: #e2e8f0;
    font-weight: 600;
    color: #1e3d59;
    padding: 10px;
}
.carnet-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 13px;
    color: #1e3d59;
}
.carnet-pagination button {
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1e3d59;
    cursor: pointer;
    font-size: 12px;
}
.carnet-pagination button:hover:not(:disabled) {
    background: #f1f5f9;
}
.carnet-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#carnet-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-content: start;
    align-items: start;
}
#carnet-form .form-group,
#carnet-form .form-actions {
    margin: 0;
}
#carnet-form .form-row {
    display: contents;
}
#carnet-form .full-width {
    grid-column: 1 / -1;
}
#carnet-form .select-recherche {
    display: block;
    width: 100%;
}
@media (max-width: 700px) {
    #carnet-form {
        grid-template-columns: 1fr;
    }
}
#view-instructeur .select-recherche {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 auto;
}

/* --- MINI CALENDRIER --- */
#mini-calendrier {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    font-size: 12px;
    color: #1e3d59;
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: capitalize;
}
.cal-header button {
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: 600;
    color: #1e3d59;
    font-size: 12px;
}
.cal-header button:hover {
    background: #cbd5e1;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.cal-weekday {
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    padding-bottom: 4px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    padding: 2px;
    transition: background 0.15s;
}
.cal-day:hover {
    background: #e2e8f0;
}
.cal-day.empty {
    cursor: default;
}
.cal-day-number {
    line-height: 1;
}
.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #93c5fd;
    margin-top: 2px;
    display: inline-block;
}
.cal-day.has-activity .cal-dot {
    background: #93c5fd;
}
.cal-day.user-activity .cal-dot {
    background: #f59e0b;
}
.cal-day.today {
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
}
.cal-day.selected {
    background: #1e3d59;
    color: white;
}
.cal-day.selected .cal-dot {
    background: white;
}
.cal-footer {
    margin-top: 10px;
    text-align: center;
}
.cal-btn-today {
    background: #1e3d59;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
}
.cal-btn-today:hover {
    background: #2c4f6f;
}

/* --- MINI CALENDRIER INTEGRATION SIDEBAR --- */
#mini-calendrier {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    padding: 0;
    margin-top: 10px;
    margin-bottom: 10px;
}
.cal-header {
    color: #ffffff;
    font-size: 13px;
    padding: 0 4px;
}
.cal-header button {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 2px 5px;
    font-size: 11px;
}
.cal-header button:hover {
    background: rgba(255, 255, 255, 0.25);
}
.cal-month {
    flex: 1;
    text-align: center;
}
.cal-grid {
    gap: 2px;
}
.cal-weekday {
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
}
.cal-day {
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    padding: 1px;
}
.cal-day:hover {
    background: rgba(255, 255, 255, 0.1);
}
.cal-day.today {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.cal-day.selected {
    background: #ffffff;
    color: #1e3d59;
    font-weight: 700;
}
.cal-day.selected .cal-dot {
    background: #1e3d59;
}
.cal-dot {
    width: 4px;
    height: 4px;
    background: #93c5fd;
}
.cal-day.user-activity .cal-dot {
    background: #f59e0b;
}
.cal-day.selected.user-activity .cal-dot {
    background: #f59e0b;
}
.cal-footer {
    margin-top: 8px;
}
.cal-btn-today {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 3px 8px;
    font-size: 10px;
}
.cal-btn-today:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- ÉVÉNEMENTS --- */
#section-evenements {
    margin: 10px 0;
}
#prochains-evenements {
    font-size: 11px;
    color: #cbd5e1;
}
.prochains-evenements-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.prochains-evenements-header h4 {
    margin: 0;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.btn-add-event {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-add-event:hover {
    background: rgba(255, 255, 255, 0.3);
}
#prochains-evenements h4 {
    margin: 0 0 6px;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.prochain-evenement {
    cursor: pointer;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.prochain-evenement:hover {
    color: #ffffff;
}
.prochain-evenement:last-child {
    border-bottom: none;
}
.prochains-evenements-empty,
.evenement-empty {
    font-size: 11px;
    color: #94a3b8;
    padding: 6px 0;
}
.evenements-section {
    background: #1e3d59;
    color: white;
    padding: 10px;
    border-radius: 12px;
    margin: 0;
}
.evenements-section h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 16px;
}
.evenements-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.evenement-card {
    background: #f8fafc;
    color: #1e3d59;
    border-radius: 12px;
    padding: 10px;
    flex: 1 1 220px;
    min-width: 220px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
}
.btn-supprimer-evenement {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
}
.btn-supprimer-evenement:hover {
    color: #b91c1c;
    background: #fee2e2;
}
.evenement-titre {
    font-size: 18px;
    font-weight: 700;
    color: #1e3d59;
    margin-bottom: 4px;
    padding-right: 26px;
}
.evenement-sous-titre {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}
.evenement-description {
    font-size: 13px;
    color: #475569;
    margin-bottom: 10px;
    line-height: 1.4;
}
.evenement-inscrits {
    font-size: 14px;
    color: #334155;
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    min-height: 30px;
}
.inscrit-ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}
.btn-remove-inscrit {
    background: transparent;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    margin-left: 8px;
}
.btn-remove-inscrit:hover {
    color: #b91c1c;
}
.evenement-actions .btn-inscription {
    background: #17b978;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.evenement-actions .btn-inscription:hover {
    background: #059669;
}

/* --- LIGNE PRÉSENCE CLUB + ÉVÉNEMENTS --- */
.club-evenements-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
    margin-top: 0;
}
.club-evenements-row .glider-presence-section,
.club-evenements-row .evenements-section {
    margin: 0;
    min-width: 0;
}
.club-evenements-row .glider-presence-container {
    flex-wrap: wrap;
    gap: 12px;
}
.club-evenements-row .presence-card {
    min-width: 100px;
    padding: 10px;
}

/* --- ACCUEIL MEMBRE --- */
#view-accueil-membre .accueil-profil {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
#view-accueil-membre .accueil-photo-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}
#view-accueil-membre .accueil-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: block;
}
#view-accueil-membre .accueil-photo-input {
    display: none;
}
#view-accueil-membre .accueil-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4px 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    text-align: center;
    border-radius: 0 0 50% 50%;
    cursor: pointer;
}
#view-accueil-membre .accueil-profil-texte {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
#view-accueil-membre .accueil-nom {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
#view-accueil-membre .accueil-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}
.validite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.validite-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}
.validite-experience {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.experience-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
}
.experience-row.suivi-inactif {
    opacity: 0.6;
    background: #f1f5f9;
}
.experience-titre {
    flex: 1 1 100%;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}
.experience-row .activer-suivi {
    font-size: 12px;
    margin-left: auto;
}
.accueil-disclaimer {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
}
.validite-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.validite-pill {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pastille {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.pastille-verte {
    background: #dcfce7;
    color: #166534;
}
.pastille-rouge {
    background: #fee2e2;
    color: #991b1b;
}
.pastille-orange {
    background: #ffedd5;
    color: #9a3412;
}
.pastille-grise {
    background: #f1f5f9;
    color: #64748b;
}
.validite-date {
    font-size: 12px;
    color: #64748b;
}

/* --- ADMIN & EDITION MEMBRE --- */
.accueil-admin-bar {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.accueil-admin-bar label {
    font-weight: 600;
    color: #475569;
}
.accueil-admin-bar select {
    min-width: 180px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}
.validite-input {
    margin-top: 8px;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}
.validite-input[type="checkbox"] {
    width: auto;
    margin-top: 0;
    vertical-align: middle;
}
.btn-enregistrer-validites {
    margin-top: 12px;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.btn-enregistrer-validites:hover {
    background: #2563eb;
}

/* --- DOCUMENTS MEMBRE --- */
.accueil-documents {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}
.accueil-documents h3 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 16px;
}
.accueil-doc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
}
.accueil-doc-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.accueil-doc-form label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}
.accueil-doc-form select,
.accueil-doc-form input[type="file"] {
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
}
.accueil-doc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.accueil-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
}
.accueil-doc-item a {
    color: #166534;
    text-decoration: underline;
    word-break: break-all;
}
.roles-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}
.role-tag input {
    margin: 0;
    cursor: pointer;
}
.membre-nom {
    font-weight: 600;
    cursor: pointer;
}
.activer-suivi {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    cursor: pointer;
}
.suivi-inactif {
    opacity: 0.6;
    background: #f1f5f9 !important;
}
#membres-list tr {
    cursor: pointer;
}
#membres-list tr:hover {
    background-color: #f8fafc;
}
#membres-list tr .roles-cell,
#membres-list tr .roles-cell * {
    cursor: default;
}
.instructeur-dispo-row .machine-cell {
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-weight: 600;
    color: #1e3d59;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}
.instructeur-nom {
    cursor: pointer;
    padding-bottom: 1px;
    display: -webkit-box;
    max-width: 100%;
    max-height: 30px;
    line-height: 1.1;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: break-word;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.instructeur-nom:hover {
    color: #3b82f6;
}
.timeline-row:not(.instructeur-dispo-row) .machine-cell:hover {
    color: #3b82f6;
}
.dispo-grid {
    position: relative;
}
.dispo-hour {
    flex: 1;
    background: #fee2e2;
    border-right: 1px solid rgba(255,255,255,0.6);
    box-sizing: border-box;
    height: 100%;
    opacity: 0.7;
}
.dispo-hour.dispo-green {
    background: #dcfce7;
}
.dispo-hour.dispo-red {
    background: #fee2e2;
}
.dispo-hour-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.35;
    z-index: 3;
    pointer-events: none;
}
.dispo-hour-overlay.dispo-green {
    background: #22c55e;
}
.dispo-hour-overlay.dispo-red {
    background: #ef4444;
}
.dispo-discipline-label {
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #475569;
    background: rgba(255, 255, 255, 0.75);
    padding: 1px 4px;
    border-radius: 3px;
    pointer-events: none;
    line-height: 1.2;
}
#instructeur-suivi-modal .instructeur-suivi-grid {
    overflow-x: auto;
    margin-top: 15px;
}
#instructeur-suivi-modal th,
#instructeur-suivi-modal td {
    border: 1px solid #e2e8f0;
    padding: 6px;
    text-align: left;
    font-size: 12px;
}
#instructeur-suivi-modal th {
    background: #f1f5f9;
    color: #1e3d59;
}
#instructeur-suivi-modal .instructeur-suivi-day {
    display: flex;
    width: 100%;
    min-width: 480px;
    padding: 0;
}
#instructeur-suivi-modal .instructeur-suivi-day .dispo-hour {
    flex: 1;
    height: 24px;
}

/* --- COMPTES PILOTES --- */
.comptes-solde.negatif {
    color: #dc2626;
}
.comptes-solde.attente {
    color: #f59e0b;
}
.comptes-solde.positif {
    color: #16a34a;
}
.comptes-row.debit {
    color: #dc2626;
    background: #fef2f2;
}
.comptes-row.credit {
    color: #16a34a;
    background: #f0fdf4;
}
.comptes-row.attente {
    color: #f59e0b;
    background: #fffbeb;
}
.comptes-list table th,
.comptes-list table td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* --- NOUVEAU DESIGN COMPTES PILOTES --- */
@keyframes spin { to { transform: rotate(360deg); } }

.comptes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 8px;
}
.comptes-titres h2 {
    margin: 0 0 4px;
    font-size: 28px;
    color: #1e3d59;
}
.comptes-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}
.comptes-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.comptes-import-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.comptes-import-btn:hover { background: #15803d; }
#comptes-pilote-select,
#comptes-csv-input {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
}

.comptes-loading {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 16px;
}
.comptes-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #7dd3fc;
    border-top-color: #0369a1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.comptes-summary {
    margin-bottom: 20px;
}
.comptes-summary-card {
    background: #1e3d59;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #fff;
}
.comptes-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 180px;
}
.comptes-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.solde-icon { background: rgba(125, 211, 252, 0.2); color: #7dd3fc; }
.depense-icon { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.recette-icon { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.comptes-summary-label {
    font-size: 11px;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 4px;
}
.comptes-summary-value {
    font-size: 22px;
    font-weight: 700;
}
.solde-val { color: #7dd3fc; }
.depense-val { color: #f87171; }
.recette-val { color: #4ade80; }

.comptes-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .comptes-grid { grid-template-columns: 1fr; }
}

.comptes-form-card {
    background: #1e3d59;
    border-radius: 16px;
    padding: 22px;
    color: #fff;
}
.comptes-form-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
}
.comptes-form-card .comptes-form-group {
    margin-bottom: 14px;
}
.comptes-form-card label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.85;
}
.comptes-form-card input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.comptes-form-card input::placeholder { color: rgba(255,255,255,0.45); }
.comptes-btn-ajouter {
    width: 100%;
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.comptes-btn-ajouter:hover { background: #15803d; }
.comptes-btn-ajouter::after { content: '+'; font-size: 18px; }

.comptes-list-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.comptes-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.comptes-list-title {
    margin: 0;
    font-size: 18px;
    color: #1e3d59;
    white-space: nowrap;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comptes-list-header {
    flex-wrap: nowrap;
}
.comptes-export-btn {
    flex-shrink: 0;
}
.comptes-export-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.comptes-export-btn:hover { background: #f8fafc; }
.comptes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.comptes-table th {
    text-align: left;
    padding: 10px;
    color: #1e3d59;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}
.comptes-table th.comptes-montant { text-align: right; }
.comptes-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.comptes-row.debit { color: #dc2626; background: #fef2f2; }
.comptes-row.credit { color: #16a34a; background: #f0fdf4; }
.comptes-row.attente { color: #f59e0b; background: #fffbeb; }
.comptes-date { white-space: nowrap; }
.comptes-desc { max-width: 260px; word-break: break-word; }
.comptes-ref { color: #64748b; font-size: 13px; }
.comptes-montant {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}
.comptes-montant .comptes-delete,
.membre-actions .membre-delete {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    margin-left: 8px;
    padding: 0 4px;
    line-height: 1;
}
.membre-actions .membre-delete:hover { color: #dc2626; }
.comptes-list-footer {
    text-align: center;
    margin-top: 14px;
}
.comptes-voir-toutes {
    background: transparent;
    border: none;
    color: #1e3d59;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
.comptes-voir-toutes span { margin-left: 4px; }
.comptes-vide { color: #64748b; }
.comptes-titres h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comptes-last-import {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    white-space: nowrap;
}

/* --- ICONES HAUT DE SIDEBAR --- */
.sidebar-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #14293e;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: background .2s, transform .1s, box-shadow .2s;
}
.sidebar-icon-btn:hover {
    background: #1a3550;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}
.sidebar-icon-svg {
    width: 20px;
    height: 20px;
    display: block;
}
.app-version-watermark {
    position: fixed;
    bottom: 4px;
    right: 8px;
    font-size: 9px;
    color: #94a3b8;
    opacity: 0.55;
    pointer-events: none;
    z-index: 50;
}
#view-aeronefs .header .aeronef-ctl {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    margin-left: 8px;
}
.sidebar-icon-btn:active {
    transform: scale(0.95);
}
#user-avatar {
    font-size: 13px;
    font-weight: 700;
}
.notifications-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    display: none;
}
#messagerie-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: #fff;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 2px #1e3d59;
    display: none;
}
.notifications-panel {
    position: fixed;
    top: 70px;
    left: 10px;
    width: 300px;
    max-height: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    overflow: hidden;
    color: #1e3d59;
}
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.notifications-header h4 {
    margin: 0;
    font-size: 16px;
}
.notifications-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
}
.notifications-list {
    max-height: 340px;
    overflow-y: auto;
}
.notifications-vide {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}
.notification-item:hover {
    background: #f8fafc;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-non-lue {
    background: #f0f9ff;
}
.notification-lue {
    opacity: 0.7;
}
.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    color: #64748b;
}
.notification-type {
    font-weight: 600;
    text-transform: uppercase;
}
.notification-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #1e3d59;
}
.maintenance-bar {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(168, 85, 247, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    pointer-events: none;
    box-sizing: border-box;
}

/* --- PAGE PLANEUR --- */
.carnet-planeur-container {
    padding: 20px;
}
.planeur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.planeur-box {
    background: #f8fafc;
    border: 2px solid #1e3d59;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    color: #1e3d59;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.planeur-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    background: #ffffff;
}
.planeur-box h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.btn-doc-planeur {
    margin-top: 12px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #1e3d59;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-doc-planeur:hover {
    background: #cbd5e1;
}

/* --- MODALE OBSERVATION PLANEUR --- */
#carnet-form[data-mode="observation"] .form-group:not(.observation-only),
#carnet-form[data-mode="observation"] .form-row,
#carnet-form[data-mode="observation"] .checkbox-group {
    display: none !important;
}
#carnet-form[data-mode="observation"] .observation-only {
    display: block;
    margin-top: 0;
}
.planeur-section-title {
    margin: 0;
    padding: 0 20px;
    color: #1e3d59;
    font-size: 18px;
    font-weight: 600;
}

/* --- JOURNAL D'AUDIT --- */
.audit-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}
.audit-table thead {
    background: #1e3d59;
    color: #fff;
}
.audit-table th,
.audit-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.audit-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.audit-table tbody tr:hover {
    background: #eef6ff;
}
.audit-date {
    white-space: nowrap;
    color: #475569;
    font-size: 13px;
}
.audit-user {
    font-weight: 600;
    color: #1e3d59;
}
.audit-action {
    color: #0f172a;
}
.audit-target {
    color: #334155;
}
.audit-detail {
    color: #64748b;
    font-size: 13px;
}

/* --- DASHBOARD ACCUEIL PILOTE --- */
.accueil-pilote-container {
    padding: 24px;
}
.accueil-pilote-header {
    margin-bottom: 24px;
}
.accueil-pilote-header h2 {
    color: #1e3d59;
    margin: 0 0 6px 0;
}
.accueil-pilote-header p {
    color: #64748b;
    margin: 0;
}
.accueil-pilote-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}
@media (max-width: 900px) {
    .accueil-pilote-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}
.ap-card {
    border-radius: 10px;
    padding: clamp(14px, 3vw, 20px);
    color: white;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.ap-card-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ap-card-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ap-card-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ap-card-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ap-card-white {
    background: #ffffff;
    color: #1e3d59;
    border: 1px solid #e2e8f0;
}
.ap-card-wide {
    grid-column: 1 / -1;
}
.ap-bottom-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) {
    .ap-bottom-row {
        grid-template-columns: 1fr;
    }
}
.ap-card-messages {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.ap-card-messages h3,
.ap-card-messages p {
    color: #1e3d59;
}
.ap-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ap-btn-new-msg {
    background: #1e3d59;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ap-message-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ap-msg-input,
.ap-msg-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}
.ap-msg-textarea {
    resize: vertical;
}
.ap-msg-actions {
    display: flex;
    gap: 8px;
}
.ap-msg-submit,
.ap-msg-cancel {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.ap-msg-submit {
    background: #1e3d59;
    color: #fff;
}
.ap-msg-cancel {
    background: #e2e8f0;
    color: #1e3d59;
}
.ap-messages-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ap-message-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}
.ap-message-title {
    font-weight: 700;
    color: #1e3d59;
    font-size: 14px;
    margin-bottom: 4px;
}
.ap-message-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}
.ap-message-body {
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
    white-space: pre-wrap;
}
.ap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.ap-card-number {
    font-size: clamp(20px, 3.2vw, 28px);
    font-weight: 700;
    line-height: 1.1;
}
.ap-card-icon {
    font-size: clamp(28px, 6vw, 40px);
    opacity: 0.8;
    flex-shrink: 0;
}
.ap-card-label {
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 500;
    margin-bottom: 12px;
}
.ap-card-hint {
    font-size: 12px;
    opacity: 0.8;
    margin-top: -8px;
    margin-bottom: 12px;
}
.ap-card .btn-primary {
    margin-top: auto;
}
.ap-card .btn-primary,
.ap-card .btn-secondary {
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}
.ap-card .btn-primary {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
}
.ap-card .btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}
.ap-card-white .btn-primary {
    background: #1e3d59;
    color: #fff;
    border: none;
}
.ap-card-signalements {
    min-height: unset;
}
.ap-card-signalements h3 {
    font-size: 15px;
    margin-bottom: 10px;
}
.ap-signalements-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.ap-signalement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
}
.ap-signalement-machine {
    font-weight: 600;
    color: #1e3d59;
    white-space: nowrap;
    min-width: 60px;
}
.ap-signalement-desc {
    flex: 1;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ap-signalement-etat {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.ap-validites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.ap-validite-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}
.ap-pastille {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ap-pastille.pastille-verte { background: #22c55e; }
.ap-pastille.pastille-rouge { background: #ef4444; }
.ap-pastille.pastille-orange { background: #f59e0b; }
.ap-pastille.pastille-grise { background: #94a3b8; }
.ap-validite-label {
    flex: 1;
    font-weight: 500;
    color: #1e3d59;
}
.ap-validite-detail {
    color: #64748b;
    font-size: 13px;
}
.ap-card-white h3 {
    margin: 0 0 8px 0;
    color: #1e3d59;
}
.ap-signalement-detail {
    padding: 8px 12px;
    margin: 0 0 8px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ap-signalement-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}
.ap-signalement-detail-item:last-child {
    border-bottom: none;
}
.ap-signalement-detail-desc {
    flex: 1;
    color: #1e3d59;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ap-signalement-detail-etat {
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}
.ap-signalement-row:hover {
    background: #f1f5f9;
}

.ap-modal-signalements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 61, 89, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.ap-modal-signalements-content {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}
.ap-modal-signalements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.ap-modal-signalements-header h3 {
    margin: 0;
    color: #1e3d59;
    font-size: 18px;
}
.ap-modal-signalements-close {
    background: transparent;
    border: none;
    font-size: 26px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
}
.ap-modal-signalements-close:hover {
    background: #f1f5f9;
}
.ap-modal-signalements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ap-modal-signalements-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}
.ap-modal-signalements-desc {
    flex: 1;
    color: #1e3d59;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ap-modal-signalements-etat {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

/* --- NOUVEAU MODAL RÉSERVATION --- */
#reservation-modal .modal-content {
    max-width: 600px;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    color: #1e3d59;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}
.nr-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e3d59;
}
.nr-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.nr-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nr-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.nr-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 600px) {
    .nr-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.nr-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.nr-option:hover {
    border-color: #3b82f6;
}
.nr-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.nr-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
}
.nr-option input:checked + .nr-check,
.nr-option input:checked ~ .nr-check {
    border-color: #3b82f6;
    background: #3b82f6;
    box-shadow: inset 0 0 0 4px #fff;
}
.nr-option:has(input:checked) {
    border-color: #3b82f6;
    background: #f0f7ff;
}
.nr-option .nr-icon {
    font-size: 26px;
    line-height: 1;
}
.nr-option .nr-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-align: center;
}
.nr-maintenance-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    color: #1e3d59;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.nr-maintenance-banner:hover {
    border-color: #8b5cf6;
}
.nr-maintenance-banner input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.nr-maintenance-banner .nr-icon {
    font-size: 18px;
    line-height: 1;
}
.nr-maintenance-banner:has(input:checked) {
    border-color: #8b5cf6;
    background: #ede9fe;
    color: #5b21b6;
}
.nr-select,
.nr-input,
.nr-textarea,
.nr-datetime input[type="datetime-local"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
    color: #1e3d59;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.nr-select:focus,
.nr-input:focus,
.nr-textarea:focus,
.nr-datetime input[type="datetime-local"]:focus {
    border-color: #3b82f6;
    background: #fff;
}
.nr-datetimes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 500px) {
    .nr-datetimes {
        grid-template-columns: 1fr;
    }
}
.nr-datetime {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nr-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
}
.nr-stepper button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.nr-stepper button:hover {
    background: #e2e8f0;
}
.nr-stepper input {
    width: 80px;
    height: 40px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #1e3d59;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}
.nr-stepper input::-webkit-outer-spin-button,
.nr-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.nr-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
.nr-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}
.nr-btn-cancel {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.nr-btn-cancel:hover {
    background: #f1f5f9;
}
.nr-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #22c55e;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.nr-btn-save:hover {
    background: #16a34a;
}
.nr-icon-save {
    font-size: 14px;
}

/* --- MESSAGERIE STYLE EMAIL --- */
#messages-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}
.message-thread-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}
.message-thread-item:hover {
    background: #f8fafc;
}
.message-thread-item:last-child {
    border-bottom: none;
}
.message-thread-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.message-thread-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.message-thread-sender {
    font-size: 14px;
    color: #1e3d59;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message-thread-subject {
    font-size: 14px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message-thread-preview {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message-thread-date {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}
.message-thread-piece {
    margin-left: 4px;
}
.message-thread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
}
.message-thread-unread .message-thread-sender,
.message-thread-unread .message-thread-subject {
    font-weight: 700;
}
#message-read-modal .modal-content {
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}
.message-read-modal-content {
    display: flex;
    flex-direction: column;
}
.message-thread-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.message-thread-header h3 {
    margin: 0 0 6px;
    color: #1e3d59;
}
.message-thread-participants {
    font-size: 13px;
    color: #64748b;
}
.message-thread-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}
.message-bubble {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    background: #fff;
    max-width: 85%;
    align-self: flex-start;
}
.message-bubble-me {
    background: #e0f2fe;
    border-color: #bae6fd;
    align-self: flex-end;
}
.message-bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
    gap: 12px;
}
.message-bubble-sender {
    font-weight: 600;
    color: #1e3d59;
}
.message-bubble-body {
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.message-attachments {
    margin-top: 12px;
}
.message-attachments a {
    display: inline-block;
    background: #1e3d59;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    margin-top: 4px;
}
.message-thread-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
@media (max-width: 700px) {
    .message-thread-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .message-thread-meta {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    .message-bubble {
        max-width: 100%;
    }
}

.carnet-champ-auto {
    background: #f1f5f9;
    color: #475569;
}

/* --- FORMULAIRE F-JVIO COMPACT --- */
#carnet-form.carnet-form-jvio {
    gap: 6px;
    align-items: start;
    font-size: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
#carnet-form.carnet-form-jvio .form-group {
    max-width: 260px;
}
#carnet-form.carnet-form-jvio .full-width {
    max-width: 100%;
}
#carnet-form.carnet-form-jvio .form-group label {
    font-size: 12px;
    margin-bottom: 2px;
    font-weight: 600;
    color: #1e3d59;
}
#carnet-form.carnet-form-jvio .form-group input,
#carnet-form.carnet-form-jvio .form-group select,
#carnet-form.carnet-form-jvio .form-group textarea,
#carnet-form.carnet-form-jvio .select-recherche button {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 30px;
    border-radius: 6px;
}
#carnet-form.carnet-form-jvio .form-group textarea {
    resize: none;
    height: 44px;
}
#carnet-form.carnet-form-jvio .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
#carnet-form.carnet-form-jvio .checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    color: #1e3d59;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.3;
    white-space: nowrap;
}
#carnet-form.carnet-form-jvio .checkbox-option:has(input:checked) {
    background: #1e3d59;
    color: #fff;
    border-color: #1e3d59;
}
#carnet-form.carnet-form-jvio .checkbox-option input[type="checkbox"],
#carnet-form.carnet-form-jvio .checkbox-option input[type="radio"] {
    display: none;
}
#carnet-form.carnet-form-jvio .nature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
#carnet-form.carnet-form-jvio .form-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
#carnet-form.carnet-form-jvio .form-row .form-group {
    max-width: none;
}
#carnet-form.carnet-form-jvio .decollage-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}
#carnet-form.carnet-form-jvio .decollage-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e3d59;
    white-space: nowrap;
}
#carnet-form.carnet-form-jvio .decollage-input {
    width: 70px;
    flex-shrink: 0;
}
#carnet-form.carnet-form-jvio .remarques-prix-row {
    display: flex;
    gap: 6px;
}
#carnet-form.carnet-form-jvio .remarques-prix-row .form-group {
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}
#carnet-form.carnet-form-jvio .remarques-prix-row .form-group.remarques-group {
    flex: 3;
}
#carnet-form.carnet-form-jvio .remarques-prix-row .form-group.prix-group {
    flex: 1;
}
#carnet-form.carnet-form-jvio .form-actions {
    padding-top: 2px;
    margin-top: 4px;
    gap: 6px;
}
#carnet-form.carnet-form-jvio .form-actions button {
    padding: 6px 12px;
    font-size: 12px;
}
@media (max-width: 700px) {
    #carnet-form.carnet-form-jvio {
        grid-template-columns: 1fr;
    }
    #carnet-form.carnet-form-jvio .full-width {
        grid-column: 1 / -1;
    }
    #carnet-form.carnet-form-jvio .checkbox-option {
        flex: 1 1 auto;
        min-width: 80px;
    }
}