/**
 * Styles pour Attestation Non-Condamnation
 * Basé sur le style de publication-libre.css
 */

/* ===== RESET ET BASE ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== HERO SECTION ===== */
.hero-publication {
    background: linear-gradient(135deg, #f5f5fe 0%, #e8e8fb 100%);
    padding: 3rem 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    color: #000091;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    color: #3a3a3a;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== FORM CONTAINER ===== */
.form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 3rem;
}

/* ===== FORM SECTIONS ===== */
.form-section {
    margin-bottom: 3rem;
}

.form-section-header {
    background: #f5f5fe;
    padding: 1rem 1.5rem;
    margin: -2rem -2rem 2rem;
    border-left: 4px solid #000091;
}

.form-section-header h2 {
    color: #000091;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    background: #000091;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    color: #161616;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.text-muted {
    color: #666;
    font-weight: normal;
}

.form-help {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.875rem;
    color: #ce614a;
    margin-top: 0.25rem;
    display: none;
}

.form-control.error + .form-error {
    display: block;
}

.required {
    color: #ce614a;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    line-height: 1.4;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: #000091;
    box-shadow: 0 0 0 3px rgba(0, 0, 145, 0.1);
}

.form-control.error {
    border-color: #ce614a;
}

.form-control.valid {
    border-color: #18753c;
}

/* Select avec flèche personnalisée */
select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.form-control:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f5f5f5;
}

/* Checkbox personnalisé */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    line-height: 1.5;
}

/* ===== DECLARATION BOX ===== */
.declaration-box {
    background: #f5f5fe;
    border: 2px solid #000091;
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.declaration-box h3 {
    color: #000091;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.declaration-name {
    font-weight: bold;
    color: #000091;
}

.declaration-content {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.declaration-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.declaration-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.declaration-warning {
    background: #fff4e5;
    border-left: 4px solid #ff9940;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ===== PROCESS INFO ===== */
.process-info {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.process-info h3 {
    color: #0078f3;
    margin-bottom: 1rem;
}

.process-steps {
    margin: 0;
    padding-left: 1.5rem;
}

.process-steps li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ===== INFO ALERT ===== */
.info-alert {
    background-color: #e3e3fd;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid #000091;
    display: flex;
    gap: 1rem;
}

.info-alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.info-alert-content {
    flex: 1;
}

.info-alert-content h4 {
    color: #000091;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.info-alert-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #161616;
}

/* ===== RECAP SECTION ===== */
.recap-section {
    background: #f5f5fe;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.recap-section h3 {
    color: #000091;
    margin-bottom: 1rem;
}

.recap-table {
    width: 100%;
    border-collapse: collapse;
}

.recap-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.recap-table td {
    padding: 0.75rem 0;
}

.recap-table td:first-child {
    font-weight: 600;
    color: #666;
}

.recap-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.recap-table .total-row {
    border-top: 2px solid #000091;
}

.recap-table .total-row td {
    padding-top: 1rem;
    font-size: 1.1rem;
}

/* ===== BOTTOM CTA ===== */
.bottom-cta {
    background: #f5f5fe;
    padding: 2rem;
    margin: 2rem -2rem -2rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #000091;
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: #1212ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    background: #929292;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #000091;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #000091;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f5f5fe;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== VALIDATION STATES ===== */
.form-control.is-valid {
    border-color: #18753c;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3e%3ccircle cx='12' cy='12' r='10' fill='%2318753c'/%3e%3cpath d='M8 12l2 2 4-4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em;
}

.form-control.is-invalid {
    border-color: #ce614a;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3e%3ccircle cx='12' cy='12' r='10' fill='%23ce614a'/%3e%3cpath d='M12 8v4M12 16v.01' stroke='white' stroke-width='2' stroke-linecap='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .hero-publication {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .form-container {
        padding: 1rem;
        border-radius: 0;
    }
    
    .form-section-header {
        margin: -1rem -1rem 1.5rem;
        padding: 1rem;
    }
    
    .form-section-header h2 {
        font-size: 1.1rem;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .declaration-box {
        padding: 1rem;
    }
    
    .declaration-content {
        padding: 1rem;
    }
    
    .recap-section {
        padding: 1rem;
    }
    
    .bottom-cta {
        margin: 1rem -1rem -1rem;
        padding: 1rem;
    }
    
    .btn-primary {
        width: 100%;
        padding: 0.875rem 2rem;
    }
    
    .process-info {
        padding: 1rem;
    }
    
    .recap-table {
        font-size: 0.9rem;
    }
    
    .recap-table td {
        padding: 0.5rem 0;
    }
}