/**
 * Styles Frontend - Gestion des Visites
 * Fichier consolidé (pas de CSS inline dans les vues PHP)
 */

/* ========================================
   GÉNÉRAL
   ======================================== */
.gv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gv-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.gv-alert-info {
    background: #e7f3ff;
    border-color: #2271b1;
    color: #0073aa;
}

.gv-alert-success {
    background: #d4edda;
    border-color: #00a32a;
    color: #155724;
}

.gv-alert-warning {
    background: #fff3cd;
    border-color: #ff9800;
    color: #856404;
}

.gv-alert-danger {
    background: #f8d7da;
    border-color: #d63638;
    color: #721c24;
}

/* ========================================
   FORMULAIRES
   ======================================== */
.gv-form-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
}

.gv-form-title {
    font-size: 28px;
    color: #2271b1;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.gv-form-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
}

.gv-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.gv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.gv-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gv-form-group input[type="text"],
.gv-form-group input[type="email"],
.gv-form-group input[type="date"],
.gv-form-group select,
.gv-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.gv-form-group input:focus,
.gv-form-group select:focus,
.gv-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.1);
}

.gv-form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

.gv-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.gv-form-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.gv-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* ========================================
   BOUTONS
   ======================================== */
.gv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

/* Boutons liens */
a.gv-btn,
a.gv-btn:visited,
a.gv-btn:hover,
a.gv-btn:active,
a.gv-btn:focus {
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.gv-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.gv-btn-primary {
    background: #0073aa;
    color: #fff;
}

.gv-btn-primary:hover {
    background: #005a87;
}

.gv-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.gv-btn-success {
    background: #28a745;
    color: #fff;
}

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

.gv-btn-outline {
    background: transparent;
    border: 1px solid #0073aa;
    color: #0073aa;
}

.gv-btn-outline:hover {
    background: #0073aa;
    color: #fff;
}

.gv-btn-danger {
    background: #dc3545;
    color: #fff;
}

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

.gv-btn-secondary {
    background: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
    justify-content: flex-start;
    text-align: left;
    padding: 6px 12px;
}

.gv-btn-secondary:hover,
a.gv-btn-secondary:hover {
    background: #2271b1;
    color: #fff !important;
}

.gv-btn-rencontre {
    background: linear-gradient(135deg, #E63312 0%, #c02a0f 100%);
    color: #fff;
}

.gv-btn-rencontre:hover {
    background: linear-gradient(135deg, #c02a0f 0%, #a0220c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230,51,18,0.3);
}

/* Bouton icône */
.gv-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid #17a2b8;
    background: #e7f5f8;
    border-radius: 4px;
    cursor: pointer;
    color: #0c5460;
    font-size: 13px;
    transition: all 0.2s;
}

.gv-btn-icon:hover {
    background: #17a2b8;
    color: #fff;
}

.gv-btn-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ========================================
   BADGES
   ======================================== */
.gv-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.gv-badge-sm {
    padding: 3px 8px;
    margin: 0 3px;
    font-size: 12px;
}

.gv-badge-zone {
    background: #e7f3ff;
    color: #0073aa;
}

.gv-badge-dept {
    background: #f0f6fc;
    color: #2271b1;
}

.gv-badge-statut {
    background: #d4edda;
    color: #00a32a;
}

.gv-badge-planifiée, .gv-badge-planifiee { 
    background: #cce5ff; 
    color: #004085; 
}

.gv-badge-confirmée, .gv-badge-confirmee { 
    background: #d4edda; 
    color: #155724; 
}

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

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

.gv-badge-light { 
    background: #e9ecef; 
    color: #495057; 
}

/* Badges priorité */
.gv-badge-p1 { background: #f8d7da; color: #721c24; }
.gv-badge-p2 { background: #fff3cd; color: #856404; }
.gv-badge-p3 { background: #d4edda; color: #155724; }
.gv-badge-p4 { background: #e9ecef; color: #666; }

/* Badges statut */
.gv-badge-danger { 
    background: #d63638; 
    color: #fff; 
    font-weight: 600;
    animation: pulse-danger 2s infinite;
}
.gv-badge-success { 
    background: #00a32a; 
    color: #fff; 
}

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

/* Cellule centrée */
.gv-td-center {
    text-align: center;
    vertical-align: middle;
}

/* Textes dernière visite */
.gv-jamais {
    color: #d63638;
    font-style: italic;
}

.gv-date-visite {
    font-weight: 500;
}

.gv-jours-ecoules {
    color: #666;
    font-size: 11px;
}

/* ========================================
   DASHBOARD RESPONSABLE
   ======================================== */
.gv-dashboard-responsable {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gv-dashboard-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gv-dashboard-header h2 {
    margin: 0 0 10px 0;
    color: #1d2327;
}

.gv-welcome {
    color: #50575e;
    font-size: 1.1em;
    margin: 0;
}

.gv-syndicat {
    display: inline-block;
    margin-left: 15px;
    padding: 6px 15px;
    background: rgba(0,115,170,0.1);
    border-radius: 20px;
    font-size: 15px;
    color: #0073aa;
}

/* Style pour l'adresse sous le nom du site */
.gv-adresse {
    color: #666;
    font-weight: normal;
}

/* Stats */
.gv-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gv-stat-box {
    flex: 1;
    min-width: 150px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
    display: block;
}

/* Liens stats cliquables */
a.gv-stat-box {
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

a.gv-stat-box:visited,
a.gv-stat-box:hover,
a.gv-stat-box:active,
a.gv-stat-box:focus {
    text-decoration: none !important;
    color: inherit;
}

a.gv-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

a.gv-stat-box .gv-stat-number,
a.gv-stat-box .gv-stat-label {
    text-decoration: none !important;
}

/* Stat box danger */
.gv-stat-box-danger {
    background: #fef5f5 !important;
    border-color: #d63638 !important;
    animation: pulse-stat-danger 2s infinite;
}

.gv-stat-box-danger .gv-stat-number {
    color: #d63638 !important;
}

.gv-stat-box-danger .gv-stat-label {
    color: #d63638 !important;
    font-weight: 600;
}

a.gv-stat-box-danger:hover {
    background: #fce8e8 !important;
    border-color: #d63638 !important;
}

@keyframes pulse-stat-danger {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(214, 54, 56, 0.2);
    }
    50% { 
        box-shadow: 0 4px 16px rgba(214, 54, 56, 0.4);
    }
}

.gv-stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: #0073aa;
}

.gv-stat-label {
    display: block;
    color: #666;
    margin-top: 5px;
}

/* Stats des priorités */
.gv-priority-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.gv-priority-stats h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.gv-priority-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gv-priority-box {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.gv-priority-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
}

.gv-priority-label {
    display: block;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Priorités 1-4 */
.gv-priority-1 {
    background: #f8d7da;
    border: 2px solid #d63638;
}
.gv-priority-1 .gv-priority-number { color: #721c24; }

.gv-priority-2 {
    background: #fff3cd;
    border: 2px solid #dba617;
}
.gv-priority-2 .gv-priority-number { color: #856404; }

.gv-priority-3 {
    background: #d4edda;
    border: 2px solid #00a32a;
}
.gv-priority-3 .gv-priority-number { color: #155724; }

.gv-priority-4 {
    background: #e9ecef;
    border: 2px solid #999;
}
.gv-priority-4 .gv-priority-number { color: #666; }

/* Sections */
.gv-section {
    margin-bottom: 40px;
}

.gv-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.gv-section-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
    font-weight: 700;
}

/* Tables */
.gv-table-responsive {
    overflow-x: auto;
}

.gv-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.gv-table th,
.gv-table td {
    padding: 12px 15px !important;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle !important;
}

.gv-table th {
    background: #f8f9fa !important;
    font-weight: 600;
    color: #333;
}

/* Alternance de couleurs (zebra striping) */
.gv-table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.gv-table tbody tr:nth-child(even) {
    background: #f5f5f5 !important;
}

.gv-table tbody tr:hover {
    background: #e8f4fc !important;
}

.gv-table a {
    color: #2271b1;
    text-decoration: none;
}

.gv-table a:hover {
    text-decoration: underline;
}

.gv-row-past {
    opacity: 0.6;
}

/* États */
.gv-vacant {
    color: #dc3545;
    font-style: italic;
}

.gv-responsable-info {
    color: #155724;
}

.gv-teams-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5558af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.gv-teams-link:hover {
    color: #3b3d8e;
    text-decoration: underline;
}

.gv-teams-icon {
    font-size: 15px;
    line-height: 1;
}

.gv-rencontres-count {
    font-weight: bold;
}

.gv-no-rencontres {
    color: #999;
}

.gv-past-label {
    color: #999;
    font-style: italic;
}

/* Colonne Mon statut */
.gv-mon-statut {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.gv-statut-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.gv-statut-responsable {
    background: #d4edda;
    color: #155724;
}

/* Badge responsable cliquable */
a.gv-statut-link {
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

a.gv-statut-link:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-decoration: none !important;
}

a.gv-statut-responsable:hover {
    background: #c3e6cb;
    color: #155724;
}

.gv-statut-visiteur {
    background: #e7f3ff;
    color: #0c5460;
}

.gv-statut-aucun {
    background: #f8f9fa;
    color: #666;
}

/* Bouton contacter */
.gv-btn-contacter {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.gv-btn-contacter:hover {
    background: #138496;
    border-color: #117a8b;
}

/* Bouton info (bleu) */
.gv-btn-info {
    background: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.gv-btn-info:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
    color: #fff !important;
}

/* Bouton warning (orange) */
.gv-btn-warning {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
    text-decoration: none !important;
}

.gv-btn-warning:hover {
    background: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #212529 !important;
}

/* Badge compteur sur les boutons */
.gv-badge-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    color: inherit;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Cellule d'actions */
.gv-actions-cell {
    white-space: nowrap;
}

.gv-actions-cell .gv-btn,
.gv-actions-cell a.gv-btn {
    margin: 2px;
    display: inline-block;
}

/* Lien Teams */
.gv-teams-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6264a7;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.gv-teams-link:hover {
    background: #6264a7;
    color: #fff;
    text-decoration: none;
}

.gv-teams-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Prochaine visite */
.gv-prochaine-visite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #155724;
    font-weight: 500;
}

.gv-prochaine-visite .dashicons {
    color: #00a32a;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Lien prochaine visite (mailto) */
a.gv-prochaine-visite-link {
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

a.gv-prochaine-visite-link:hover {
    background: #d4edda;
    text-decoration: none;
}

/* Lien bloc priorités */
a.gv-priority-stats-link,
a.gv-priority-stats-link:visited,
a.gv-priority-stats-link:hover {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

a.gv-priority-stats-link:hover .gv-priority-stats {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Modal contacter responsables */
.gv-contact-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.gv-contact-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.gv-contact-info a {
    color: #2271b1;
}

.gv-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 16px;
}

.gv-info-text {
    color: #0c5460;
    background: #d1ecf1;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #17a2b8;
}

/* Filtres */
.gv-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gv-filters label {
    font-weight: 600;
    color: #333;
}

.gv-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
}

.gv-filter-select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.gv-filter-count {
    color: #666;
    font-style: italic;
    margin-left: auto;
}

/* Liste rencontres */
.gv-rencontres-liste {
    max-height: 300px;
    overflow-y: auto;
}

.gv-rencontres-ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.gv-rencontres-ul li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 4px;
}

.gv-rencontres-ul li:last-child {
    margin-bottom: 0;
}

/* ========================================
   MODALS
   ======================================== */
.gv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
}

.gv-modal-content {
    position: relative;
    background: #fff;
    max-width: 600px;
    width: 90%;
    margin: 50px auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 30px;
}

.gv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.gv-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.gv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gv-modal-close:hover {
    background: #e0e0e0;
    color: #000;
    border-color: #999;
}

.gv-modal-body {
    padding: 25px;
}

.gv-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

/* Modal message result */
#gv-modal-message-result {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

#gv-modal-message-result.success {
    background: #d4edda;
    color: #155724;
}

#gv-modal-message-result.error {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .gv-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gv-prochaines-visites {
        padding: 20px 15px;
    }
    
    .gv-visites-table thead {
        display: none;
    }
    
    .gv-visites-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
    }
    
    .gv-visites-table td {
        display: block;
        padding: 15px;
        text-align: left;
    }
    
    .gv-visites-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: #666;
    }
    
    .gv-visite-action {
        text-align: left;
    }
    
    .gv-form-row {
        grid-template-columns: 1fr;
    }
    
    .gv-form {
        padding: 25px;
    }
    
    .gv-stats-row {
        flex-direction: column;
    }
    
    .gv-stat-box {
        min-width: 100%;
    }
    
    .gv-priority-row {
        flex-direction: column;
    }
    
    .gv-table th,
    .gv-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .gv-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gv-filter-select {
        width: 100%;
    }
    
    .gv-filter-count {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .gv-title {
        font-size: 24px;
    }
    
    .gv-form-title {
        font-size: 24px;
    }
    
    .gv-dashboard-header h2 {
        font-size: 22px;
    }
    
    .gv-modal-content {
        margin: 20px;
        padding: 20px;
    }
}

/* ========================================
   MODAL RENCONTRE
   ======================================== */

.gv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.gv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.gv-modal-content {
    position: relative;
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.gv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.gv-modal-close:hover {
    color: #000;
}

.gv-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

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

.gv-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.gv-form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gv-form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.gv-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Style pour les effectifs dans le tableau des sites */
.gv-effectifs {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* ========================================
   TOAST MESSAGES (notifications temporaires)
   ======================================== */
.gv-message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-weight: 500;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.gv-toast-success {
    background: #d4edda;
    border-left: 4px solid #00a32a;
    color: #155724;
}

.gv-toast-error {
    background: #f8d7da;
    border-left: 4px solid #d63638;
    color: #721c24;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   TABLE VISITES À VENIR
   ======================================== */
.gv-table-visites .gv-col-date {
    width: 12%;
    white-space: nowrap;
}

.gv-table-visites .gv-col-site {
    width: 40%;
}

.gv-table-visites .gv-col-responsables {
    width: 30%;
    line-height: 1.6;
}

.gv-table-visites .gv-col-actions {
    width: 18%;
}

/* Groupe de boutons */
.gv-btn-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons petits */
.gv-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ========================================
   TABLE RENCONTRES (formulaire-rencontre.php)
   ======================================== */
.gv-table.gv-table-rencontres .gv-col-date {
    width: 12%;
    white-space: nowrap;
}

.gv-table.gv-table-rencontres .gv-col-site {
    width: 40%;
}

.gv-table.gv-table-rencontres .gv-col-participants {
    width: 30%;
    line-height: 1.6;
}

.gv-table.gv-table-rencontres .gv-col-actions {
    width: 18%;
}

/* Bouton "Demander un échange" plus petit */
.gv-btn-demander-rencontre {
    padding: 6px 12px;
    font-size: 10px;
}

/* Texte plus petit (adresse du site) */
.gv-text-small {
    font-size: 12px;
}

.gv-text-muted {
    color: #666;
}

/* ========================================
   TABLE - VISITES PASSÉES
   ======================================== */
.gv-section-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.gv-table.gv-table-visites-passees .gv-col-site-passe {
    width: 70%;
}

.gv-table.gv-table-visites-passees .gv-col-date-passe {
    width: 30%;
}

/* ========================================
   WIDGET / SIDEBAR - LISTE DES VISITES
   ======================================== */
.gv-widget-visites {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.gv-widget-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #d63638;
    padding-bottom: 8px;
}

.gv-widget-empty {
    color: #666;
    font-size: 13px;
    margin: 0;
    font-style: italic;
}

.gv-widget-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gv-widget-visite-item {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.gv-widget-visite-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gv-widget-visite-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    padding: 5px;
    border-radius: 3px;
}

.gv-widget-visite-link:hover {
    background-color: #fff;
    color: inherit;
}

.gv-widget-site {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    margin-bottom: 3px;
}

.gv-widget-date {
    display: block;
    color: #d63638;
    font-size: 12px;
    font-weight: 500;
}

.gv-widget-voir-plus {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 12px;
    background: #fff;
    color: #d63638;
    border: 2px solid #d63638;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.gv-widget-voir-plus:hover {
    background: #d63638;
    color: #fff;
}

/* Adaptation pour widgets WordPress natifs */
.widget.gv_visites_widget .gv-widget-title {
    border-bottom: 2px solid #d63638;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* ============================================
   ONGLETS - Dashboard Responsable
   ============================================ */
.gv-tabs-wrapper {
    margin-top: 30px;
}

.gv-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
}

.gv-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gv-tab-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gv-tab-btn:hover {
    background: #fff;
    color: #2271b1;
}

.gv-tab-btn.active {
    background: #fff;
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.gv-tabs-content {
    background: #fff;
    padding: 0;
}

.gv-tab-pane {
    display: none;
}

.gv-tab-pane.active {
    display: block;
}

.gv-tab-pane .gv-section {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.gv-tab-pane h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

/* ============================================
   BOUTONS MAILS - Onglet Visites à venir
   ============================================ */
.gv-mails-cell {
    min-width: 220px;
}

.gv-mail-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gv-btn-mail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}

.gv-btn-mail .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.gv-btn-mail:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* Mail 1 — Alerter responsables (bleu foncé) */
.gv-btn-mail-1 {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

/* Mail 2 — Chercher visiteurs (vert) */
.gv-btn-mail-2 {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

/* Mail 3 — Organiser visite (bleu) */
.gv-btn-mail-3 {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Mail 4 — Prévenir rencontres (orange) */
.gv-btn-mail-4 {
    background: #e65c00;
    color: #fff;
    border-color: #e65c00;
}

/* Bouton désactivé (0 destinataires) */
.gv-btn-mail-disabled {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.7;
}