/* ============================================================================
   STYLES POUR LA SECTION CONSENTEMENT ET VALIDATION
   Version simplifiée et fonctionnelle - Inspirée du CSS qui fonctionne
   ============================================================================ */

/* Conteneur principal */
.paps-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================================
   SECTIONS DU FORMULAIRE
   ============================================================================ */

.form-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #e0e0e0;
}

.form-section.location-reference {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196F3;
}

.form-section.conflicts-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #ff9800;
}

.form-section.consent-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #4caf50;
}

.form-section.signatures-section {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left-color: #9c27b0;
}

/* Titres de section */
.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   CHAMPS DE FORMULAIRE
   ============================================================================ */

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Champs en lecture seule */
.readonly-field {
    background: #f5f5f5 !important;
    font-weight: 600 !important;
    color: #555 !important;
    cursor: not-allowed !important;
}

/* ============================================================================
   RADIO BUTTONS
   ============================================================================ */

.radio-group.modern-radio {
    display: flex;
    gap: 20px;
}

.radio-group.modern-radio .radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
}

.radio-group.modern-radio .radio-option:hover {
    border-color: #667eea;
}

.radio-group.modern-radio .radio-option input[type="radio"] {
    display: none;
}

.radio-group.modern-radio .radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 50%;
}

.radio-group.modern-radio .radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: #667eea;
    background: #667eea;
}

.radio-group.modern-radio .radio-label {
    font-size: 15px;
    font-weight: 500;
}

/* ============================================================================
   CHAMP CONDITIONNEL - SIMPLE ET FONCTIONNEL
   ============================================================================ */

.conditional-field {
    display: none;
    animation: fadeIn 0.3s ease;
    margin-top: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Boxes d'information */
.info-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.info-box p,
.warning-box p {
    margin: 0;
    color: #333;
    font-size: 0.95em;
    line-height: 1.5;
}

/* ============================================================================
   SIGNATURES - STYLES CRITIQUES SIMPLIFIÉS
   ============================================================================ */

.signature-container {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.signature-title {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.btn-clear-signature {
    padding: 6px 12px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clear-signature:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* ⭐ CANVAS DE SIGNATURE - SIMPLE ET FONCTIONNEL ⭐ */
.signature-pad {
    border: 1px dashed #ccc;
    border-radius: 5px;
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    height: 200px;
    display: block;
}

/* ============================================================================
   RÉSUMÉ
   ============================================================================ */

.summary-section {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.summary-title {
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.summary-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-complete {
    background: #28a745;
}

.status-incomplete {
    background: #ffc107;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================================================
   BOUTONS D'ACTION
   ============================================================================ */

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset {
    background: #e0e0e0;
    color: #555;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

/* ============================================================================
   ALERT DE SUCCÈS
   ============================================================================ */

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    padding: 20px;
    border-radius: 12px;
    margin-top: 24px;
    display: none;
}

.alert-success strong {
    display: block;
    font-size: 16px;
    color: #155724;
    margin-bottom: 6px;
}

.alert-success p {
    margin: 4px 0;
    color: #155724;
    font-size: 14px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .signature-pad {
        height: 150px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-group.modern-radio {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}