/* ============================================================
   STYLES COMPLETS POUR FICHE ACTION - MODE SOMBRE/BLEUTÉ
   ============================================================ */

/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Titres */
h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c7d2fe, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
}

/* Message d'intro */
.intro-message {
    background: #0f172a;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    margin: 1.5rem 0;
    border-left: 4px solid #4f46e5;
}

.intro-message p {
    color: #a5b4fc;
    margin: 0;
}

.intro-message p:first-child {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Barre de progression */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.progress-bg {
    flex: 1;
    background: #334155;
    border-radius: 40px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    width: 0%;
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 40px;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #818cf8;
    min-width: 45px;
}

/* Steps (questions) - Cartes sur fond sombre */
.step {
    display: none;
    background: #0f172a;
    border-radius: 24px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    animation: fadeIn 0.3s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* En-tête des steps */
.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #334155;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4f46e5;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.step-header label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
}

/* Champs de formulaire */
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #334155;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #0f172a;
    color: #f1f5f9;
}

input::placeholder, textarea::placeholder {
    color: #475569;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[readonly] {
    background: #0f172a;
    cursor: default;
    color: #94a3b8;
}

/* Messages d'erreur */
.error {
    color: #f87171;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    display: none;
}

/* Boutons */
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-retour, .btn-suivant, .btn-soumettre, .btn-pdf {
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn-retour {
    background: #334155;
    color: #cbd5e1;
}

.btn-retour:hover {
    background: #475569;
    transform: translateX(-2px);
}

.btn-suivant, .btn-soumettre {
    background: #4f46e5;
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-suivant:hover, .btn-soumettre:hover {
    background: #6366f1;
    transform: translateX(2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
}

.btn-pdf {
    background: #dc2626;
    color: white;
}

.btn-pdf:hover {
    background: #ef4444;
    transform: translateY(-1px);
}

.btn-retour:active, .btn-suivant:active, .btn-soumettre:active {
    transform: scale(0.98);
}

/* Grille de cases à cocher */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: #0f172a;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #334155;
}

.checkbox-item:hover {
    background: #1e293b;
}

.checkbox-item input {
    width: auto;
    margin: 0;
    accent-color: #4f46e5;
}

/* Champs dynamiques */
.dynamic-field {
    margin-bottom: 1rem;
}

.dynamic-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Messages info */
.info-text {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0.5rem 0 1rem;
    background: #0f172a;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
}

/* Message d'avertissement */
.warning-message {
    background: #422006;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.warning-message p {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #fcd34d;
}

.warning-message ul {
    margin-left: 1.5rem;
    color: #fbbf24;
}

/* Checkbox consentement */
.checkbox-consent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #064e3b;
    border-radius: 16px;
}

.checkbox-consent input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
}

.checkbox-consent label {
    font-weight: 500;
    color: #6ee7b7;
    cursor: pointer;
}

/* Confirmation */
.confirmation-content {
    text-align: center;
}

.confirmation-content h2 {
    color: #34d399;
}

.recap-box {
    background: #0f172a;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #334155;
}

.recap-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.recap-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recap-title {
    font-weight: 700;
    color: #818cf8;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.recap-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.recap-label {
    font-weight: 600;
    color: #94a3b8;
    min-width: 140px;
}

.recap-value {
    color: #cbd5e1;
    flex: 1;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.success-banner {
    background: #064e3b;
    color: #6ee7b7;
    padding: 0.875rem;
    border-radius: 16px;
    margin: 1rem 0;
    font-weight: 500;
}

.status-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Feedback flottant */
.feedback-message {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: 40px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.feedback-message.show {
    opacity: 1;
}

.feedback-message.success {
    background: #10b981;
}

.feedback-message.error {
    background: #ef4444;
}

.feedback-message.info {
    background: #3b82f6;
}

/* Footer */
.main-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    color: #475569;
    font-size: 0.75rem;
    border-top: 1px solid #1e293b;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .step {
        padding: 1.25rem;
    }
    
    .step-header label {
        font-size: 1rem;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .recap-row {
        flex-direction: column;
    }
    
    .recap-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }
    
    .button-container {
        flex-direction: column-reverse;
    }
    
    .btn-retour, .btn-suivant {
        text-align: center;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Scrollbar personnalisée pour le thème sombre */
.recap-box::-webkit-scrollbar {
    width: 8px;
}

.recap-box::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 10px;
}

.recap-box::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

.recap-box::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}