body {
    background: #F8F3FF;
    font-family: 'Poppins', sans-serif;
    color: #3D3D3D;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: white;
    padding: 35px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 90%;
    text-align: center;
    margin: 20px;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6D28D9;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    padding-top: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 15px;
    margin: 2rem 0 1.5rem 0;
    box-shadow: 0 5px 15px rgba(109, 40, 217, 0.2);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-5px);
}

.btn-wrapper {
    padding: 1rem 0 0.5rem;
    margin-top: 0.5rem;
}

.btn-primary {
    background: #6D28D9;
    color: white;
    font-size: 1.2rem;
    padding: 16px 48px;
    border-radius: 15px;
    text-decoration: none;
    display: inline-block;
    margin: 0;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(109, 40, 217, 0.2);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(109, 40, 217, 0.25);
    background: #5b20bb;
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(109, 40, 217, 0.2);
}

.btn-secondary {
    color: #6D28D9;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #F3EEFF;
    text-decoration: underline;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 3rem;
    margin: 3rem auto;
    padding: 1rem 2rem;
    max-width: 100%;
}

.story-option {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: #3D3D3D;
    transition: all 0.3s ease;
    border: 2px solid #F0E7FF;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.story-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(109, 40, 217, 0.15);
    border-color: #6D28D9;
    background: #FDFAFF;
}

.story-option img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.story-option p {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0.75rem 0;
    color: #6D28D9;
    padding: 0 0.5rem;
}

@media (max-width: 1200px) {
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 4rem;
        max-width: 800px;
        margin: 2.5rem auto;
        padding: 0.5rem 1.5rem;
    }
    
    .story-option {
        max-width: 320px;
    }
    
    .container {
        padding: 40px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 30px 15px;
        margin: 15px;
        width: calc(100% - 30px);
        max-width: calc(100% - 30px);
    }
    
    .story-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem auto;
        padding: 0;
        width: 100%;
    }
    
    .story-option {
        max-width: 100%;
        padding: 1rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .story-option img {
        height: 180px;
        margin-bottom: 1rem;
        width: 100%;
        object-fit: cover;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        padding-top: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }
}

.flow-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 1.5rem auto;
    max-width: 900px;
    padding: 0.5rem;
}

.flow-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 1.25rem;
    text-decoration: none;
    color: #3D3D3D;
    transition: all 0.3s ease;
    border: 2px solid #F0E7FF;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    min-height: 520px;
}

.flow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(109, 40, 217, 0.15);
    border-color: #6D28D9;
    background: #FDFAFF;
}

.flow-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.flow-card h2 {
    color: #6D28D9;
    font-size: 1.4rem;
    margin: 0.5rem 0;
    text-align: center;
    line-height: 1.3;
}

.flow-card p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    max-width: 280px;
}

.time-badge {
    background: #F3EEFF;
    color: #6D28D9;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0 1.5rem;
}

.flow-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #6D28D9;
    margin-top: auto;
}

.flow-cta .arrow {
    transition: transform 0.2s ease;
}

.flow-card:hover .flow-cta .arrow {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .flow-options {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0.5rem;
    }

    .flow-card {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .feature-item {
        padding: 0.5rem;
        margin: 0.75rem 0;
    }

    .flow-card h2 {
        font-size: 1.5rem;
        margin: 1rem 0;
    }
}

.info-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 2rem;
    width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #4B5563;
    font-size: 1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    color: #374151;
    background: white;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #6D28D9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.form-group select {
    cursor: pointer;
    color: #374151;
    font-weight: 500;
    appearance: none;
    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='%236D28D9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.form-group select:hover {
    border-color: #6D28D9;
    background-color: #F8F3FF;
}

.form-group select option {
    color: #374151;
    padding: 0.5rem;
}

.form-group select option:first-child {
    color: #9CA3AF;
}

.form-actions {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.form-actions .btn-primary {
    min-width: 200px;
}

.form-actions .btn-secondary {
    margin-top: 0;
}

@media (max-width: 640px) {
    .info-form {
        padding: 0 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
}

.gender-toggle {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.gender-toggle input[type="radio"] {
    display: none;
}

.gender-toggle .toggle-option {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    color: #4B5563;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gender-toggle .toggle-option:hover {
    border-color: #6D28D9;
    color: #6D28D9;
    background: #F8F3FF;
}

.gender-toggle input[type="radio"]:checked + .toggle-option {
    background: #6D28D9;
    border-color: #6D28D9;
    color: white;
}

@media (max-width: 640px) {
    .info-form {
        padding: 0 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .gender-toggle {
        gap: 0.75rem;
    }
    
    .gender-toggle .toggle-option {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }
}

.flow-badges {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}

.flow-indicator {
    position: relative;
    transform: none;
}

.story-type-indicator {
    position: relative;
}

.flow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: #FFFFFF;
    border: 2px solid #F0E7FF;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.flow-badge .flow-icon {
    font-size: 1.2rem;
}

.flow-badge .flow-text {
    color: #6D28D9;
    letter-spacing: -0.01em;
}

/* Instant flow variant */
.flow-badge.instant {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F3FF 100%);
    border-color: #E5D4FF;
}

.flow-badge.instant .flow-icon {
    color: #FFB700;
    text-shadow: 0 0 10px rgba(255, 183, 0, 0.3);
}

.flow-badge.instant .flow-text {
    background: linear-gradient(135deg, #6D28D9 0%, #9061DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Designer flow variant */
.flow-badge.designer {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF3F8 100%);
    border-color: #FFE4EE;
}

.flow-badge.designer .flow-icon {
    color: #FF3B99;
    text-shadow: 0 0 10px rgba(255, 59, 153, 0.3);
}

.flow-badge.designer .flow-text {
    background: linear-gradient(135deg, #FF3B99 0%, #FF71B5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Story badge enhancements */
.story-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #F0E7FF;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.08);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.story-badge-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.story-badge-text {
    color: #6D28D9;
    letter-spacing: -0.01em;
}

@media (max-width: 640px) {
    .flow-badges {
        top: -10px;
        gap: 0.6rem;
    }

    .flow-badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .flow-badge .flow-icon {
        font-size: 1.1rem;
    }

    .story-badge {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }

    .story-badge-icon {
        width: 16px;
        height: 16px;
    }
}

.feature-list {
    margin: 0.75rem 0;
    width: 100%;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    margin: 0.35rem 0;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.feature-item:hover {
    background: #F8F3FF;
}

.feature-icon {
    font-size: 1rem;
    margin-right: 0.75rem;
    min-width: 20px;
}

.feature-item span:last-child {
    color: #4A4A4A;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-item.highlight {
    background: #F0E7FF;
    font-weight: 600;
    margin-top: 0.75rem;
}

.feature-item.highlight:hover {
    background: #E6D8FF;
}

/* Optimisations mobiles */
@media (max-width: 768px) {
    /* Navigation */
    .nav-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-mobile.active {
        transform: translateX(0);
    }

    .nav-mobile-content {
        padding: 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .nav-mobile-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Ajustements des conteneurs */
    .container {
        padding: 1rem;
    }

    /* Ajustements des boutons */
    .button, .magic-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1.1rem;
    }

    /* Ajustements des grilles */
    .flow-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .flow-card {
        min-height: auto;
        padding: 1.5rem;
    }

    /* Ajustements des formulaires */
    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .form-group input {
        padding: 1rem;
        font-size: 1.1rem;
    }

    /* Ajustements du footer */
    footer {
        padding: 2rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Améliorations tactiles pour mobile */
@media (max-width: 768px) {
    .story-option,
    .flow-card,
    .button,
    .magic-button,
    .nav-link {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }

    .story-option:active,
    .flow-card:active,
    .button:active,
    .magic-button:active {
        transform: scale(0.98);
    }

    /* Augmentation de la zone de tap */
    .nav-link,
    .footer-link {
        padding: 0.75rem;
        margin: -0.75rem;
    }
}

/* Optimisations de performance */
@media (max-width: 768px) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .transition-all {
        transition-duration: 200ms;
    }
}