/* ============================================================================
   STYLES POUR LA SECTION STATUT FONCIER - statut-foncier.css
   ============================================================================ */

/* ============================================================================
   CONTENEUR PRINCIPAL
   ============================================================================ */

.paps-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 0.95em;
    color: #0d47a1;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.paps-info-box strong {
    color: #1565c0;
    font-weight: 700;
}

/* ============================================================================
   GROUPE DE RADIO BUTTONS POUR LE STATUT
   ============================================================================ */

.statut-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.statut-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.statut-radio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: width 0.3s ease;
    z-index: 0;
}

.statut-radio-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.statut-radio-item:hover::before {
    width: 100%;
}

.statut-radio-item input[type="radio"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #667eea;
    z-index: 1;
    position: relative;
}

.statut-radio-item label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #495057;
    z-index: 1;
    position: relative;
    user-select: none;
}

.statut-radio-item input[type="radio"]:checked ~ label,
.statut-radio-item:has(input[type="radio"]:checked) label {
    color: #667eea;
    font-weight: 600;
}

.statut-radio-item:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.statut-radio-item:has(input[type="radio"]:checked) label {
    color: white;
}

/* ============================================================================
   CHAMPS CONDITIONNELS (TITRE ET AUTRE)
   ============================================================================ */

.statut-titre-fields,
.statut-autre-fields {
    display: none;
    margin-left: 32px;
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
    border-radius: 8px;
    animation: slideDown 0.4s ease;
}

.statut-titre-fields.active,
.statut-autre-fields.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   EN-TÊTE DE SECTION AVEC BOUTON
   ============================================================================ */

.section-title-with-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title-with-btn h3 {
    margin: 0;
}

/* ============================================================================
   TABLEAU DES PARCELLES
   ============================================================================ */

.table-container {
    position: relative;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: white;
}

#statutParcellesTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

#statutParcellesTable thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

#statutParcellesTable th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#statutParcellesTable tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

#statutParcellesTable tbody tr:hover {
    background: #f8f9fa;
}

#statutParcellesTable td {
    padding: 12px;
    vertical-align: middle;
}

#statutParcellesTable td input,
#statutParcellesTable td select {
    width: 100%;
    min-width: 120px;
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

#statutParcellesTable td input:focus,
#statutParcellesTable td select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#statutParcellesTable td input.coordinate-input {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ============================================================================
   BOUTON GPS DANS LE TABLEAU
   ============================================================================ */

.btn-gps-table {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-gps-table:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================================================
   BOUTON SUPPRIMER
   ============================================================================ */

.btn-remove-row {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    white-space: nowrap;
}

.btn-remove-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================================================
   ÉTAT VIDE
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.1em;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.empty-state.hidden {
    display: none;
}

/* ============================================================================
   BOUTONS D'ACTION
   ============================================================================ */

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* ============================================================================
   MESSAGE DE SUCCÈS
   ============================================================================ */

.alert-success {
    display: none;
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.4s ease;
}

.alert-success.show {
    display: block;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .statut-radio-item {
        padding: 12px 15px;
    }
    
    .section-title-with-btn {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-title-with-btn .btn {
        width: 100%;
    }
    
    .table-container {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    #statutParcellesTable th,
    #statutParcellesTable td {
        padding: 8px;
        font-size: 0.85em;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .statut-titre-fields,
    .statut-autre-fields {
        margin-left: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .paps-info-box {
        font-size: 0.85em;
        padding: 15px;
    }
    
    .statut-radio-item label {
        font-size: 0.9em;
    }
    
    .empty-state {
        padding: 40px 15px;
        font-size: 1em;
    }
}

/* ============================================================================
   ANIMATIONS ET TRANSITIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-success:active {
    animation: pulse 0.3s ease;
}

/* ============================================================================
   FIN DU FICHIER
   ============================================================================ */