/* =====================================================
   FORM CSS - Formulaire uniquement
   BIM Expert v3.0
   ===================================================== */

/* Variables locales */
:root {
    --form-primary: #0f2557;
    --form-secondary: #1e3a8a;
    --form-accent: #3b5998;
}

/* =====================================================
   HERO FORMULAIRE - MÊME HAUTEUR QUE LE BLOG
   ===================================================== */
.hero {
    position: relative;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: var(--nav-height);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../../images/dessinateur-bim-permis.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-image {
    display: none !important;
}

.hero-overlay {
    display: none !important;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    color: white;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    color: white;
}

/* =====================================================
   SECTION FORMULAIRE
   ===================================================== */
.form-section {
    padding: 4rem 0;
    background: #f9fafb;
}

.form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   BARRE DE PROGRESSION
   ===================================================== */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    gap: 0.5rem;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
    transition: all 0.3s;
    flex-shrink: 0;
}

.progress-step.active .step-circle {
    background: var(--form-primary);
    border-color: var(--form-primary);
    color: white;
}

.progress-step.completed .step-circle {
    background: var(--form-primary);
    border-color: var(--form-primary);
    color: white;
}

.progress-step.completed .step-circle::after {
    content: '✓';
    font-size: 1.25rem;
}

.progress-step span {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.progress-step.active span {
    color: var(--form-primary);
    font-weight: 600;
}

/* =====================================================
   ÉTAPES
   ===================================================== */
.form-step {
    display: none;
    animation: fadeIn 0.4s;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-family: Constantia, Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* =====================================================
   CARTES DE SÉLECTION PROJET
   ===================================================== */
.project-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-type-card {
    position: relative;
    cursor: pointer;
}

.project-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.card-content {
    padding: 2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.3s;
    text-align: center;
    height: 100%;
    cursor: pointer;
}

.project-type-card:hover .card-content {
    border-color: var(--form-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15, 37, 87, 0.12);
}

.project-type-card input[type="radio"]:checked + .card-content {
    border-color: var(--form-primary);
    background: #f9fafb;
    box-shadow: 0 8px 20px rgba(15, 37, 87, 0.12);
}

/* Badge "Le plus demandé" */
.featured-card {
    position: relative;
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--form-secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
}

.featured-card .card-content {
    border-width: 2px;
}

.featured-card input[type="radio"]:checked + .card-content {
    background: linear-gradient(135deg, var(--form-primary), var(--form-secondary));
    color: white;
}

.featured-card input[type="radio"]:checked + .card-content h3,
.featured-card input[type="radio"]:checked + .card-content p {
    color: white;
}

.featured-card input[type="radio"]:checked + .card-content .card-price {
    background: white;
    color: var(--form-primary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-family: Constantia, Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #6b7280;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.card-price {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--form-primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
}

/* =====================================================
   CHAMPS DE FORMULAIRE
   ===================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--form-primary);
    box-shadow: 0 0 0 3px rgba(15, 37, 87, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* =====================================================
   CHECKBOXES & RADIOS
   ===================================================== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f9fafb;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* =====================================================
   UPLOAD DE FICHIERS
   ===================================================== */
.upload-area {
    border: 3px dashed #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: var(--form-primary);
    background: white;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.upload-area h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #6b7280;
    font-size: 0.875rem;
}

.files-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.file-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.file-remove:hover {
    color: #dc2626;
}

/* =====================================================
   NAVIGATION FORMULAIRE
   ===================================================== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    gap: 1rem;
}

.form-navigation button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-sizing: border-box;
    width: 200px;
    flex-shrink: 0;
}

.form-navigation button:hover {
    background: #1a1a1a;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.form-navigation .btn-submit {
    background: var(--form-primary) !important;
    border-color: var(--form-primary) !important;
    color: white !important;
}

.form-navigation .btn-submit:hover {
    background: var(--form-secondary) !important;
    border-color: var(--form-secondary) !important;
}

/* =====================================================
   RÉSUMÉ DE PRIX
   ===================================================== */
.price-summary {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e9ff 100%);
    border: 2px solid var(--form-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.price-summary h3 {
    font-size: 1.25rem;
    color: var(--form-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(15, 37, 87, 0.1);
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 2px solid var(--form-primary);
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--form-primary);
}

/* =====================================================
   PAGE CONFIRMATION
   ===================================================== */
.confirmation-section {
    padding: 5rem 0;
    background: #f9fafb;
}

.confirmation-box {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.confirmation-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.confirmation-box h1 {
    font-family: Constantia, Georgia, serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.confirmation-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.confirmation-details {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.confirmation-details code {
    display: block;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #1a1a1a;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.confirmation-next-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.confirmation-next-steps h2 {
    font-family: Constantia, Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
}

.steps-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--form-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.steps-list li strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.steps-list li span {
    display: block;
    color: #6b7280;
    font-size: 0.9375rem;
}

.confirmation-contact {
    background: #f0f4ff;
    border: 2px solid var(--form-accent);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.contact-info {
    margin-top: 1rem;
    line-height: 2;
}

.contact-info a {
    color: var(--form-primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

.confirmation-actions {
    margin-top: 2rem;
}

.btn-back-home {
    background: transparent !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
    display: inline-block;
}

.btn-back-home:hover {
    background: #1a1a1a !important;
    color: white !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* TABLET & DESKTOP SMALL */
@media (min-width: 640px) and (max-width: 968px) {
    .hero {
        padding: 3rem 0;
        min-height: 220px;
    }
    
    .form-wrapper {
        padding: 2.5rem 2rem;
    }
    
    .form-navigation button {
        width: 180px;
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .step-circle {
        width: 44px;
        height: 44px;
    }
    
    .progress-step span {
        font-size: 0.8rem;
    }
}

/* MOBILE LARGE */
@media (min-width: 480px) and (max-width: 639px) {
    .hero {
        padding: 3rem 0;
        min-height: 220px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .progress-bar {
        gap: 0.25rem;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .progress-step span {
        font-size: 0.75rem;
        max-width: 65px;
    }
    
    .form-navigation button {
        width: 45%;
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }
    
    .project-types,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */
@media (max-width: 479px) {
    .hero {
        padding: 2rem 0;
        min-height: 220px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .form-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .progress-bar {
        margin-bottom: 2rem;
        gap: 0.25rem;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }
    
    .progress-step span {
        font-size: 0.7rem;
        max-width: 55px;
    }
    
    .form-step h2 {
        font-size: 1.5rem;
    }
    
    .form-navigation {
        gap: 0.5rem;
    }
    
    .form-navigation button {
        width: 48%;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        letter-spacing: 0.02em;
    }
    
    .project-types,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .confirmation-box {
        padding: 2rem;
    }
    
    .confirmation-box h1 {
        font-size: 2rem;
    }
    
    .steps-list li {
        padding-left: 2.5rem;
    }
    
    .steps-list li::before {
        width: 32px;
        height: 32px;
    }
}

/* TRÈS PETIT MOBILE */
@media (max-width: 359px) {
    .hero {
        padding: 2rem 0;
        min-height: 220px;
    }
    
    .form-wrapper {
        padding: 1.25rem 0.875rem;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .progress-step span {
        font-size: 0.65rem;
        max-width: 50px;
    }
    
    .form-navigation button {
        width: 48%;
        padding: 0.65rem 0.4rem;
        font-size: 0.7rem;
    }
}