/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: white;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--gray-300);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] span {
    color: var(--gray-600);
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #059669);
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    color: var(--gray-600);
    font-weight: 500;
}

/* Wizard Container */
.wizard-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    min-height: 500px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-step h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

/* Forms */
fieldset {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 600;
    color: var(--gray-800);
    padding: 0 0.5rem;
}

.radio-label {
    display: block;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: var(--gray-100);
}

.radio-label input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
}

.radio-label span {
    font-weight: 500;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.required {
    color: var(--danger-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 6px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* RGPD Details */
.rgpd-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--gray-800);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-600);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Section */
.result-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.result-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-content {
    background: white;
    padding: 2rem;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-box {
    background: #dbeafe;
    border-left: 4px solid #2563eb;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-top: 2rem;
}

.info-box p {
    color: #1e40af;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
}

.faq-item summary:hover {
    background: var(--gray-100);
}

.faq-item summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--primary-color);
    flex-shrink: 0;
}

.faq-item details[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary h3 {
    display: inline;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.faq-item p {
    margin: 1rem 0 0 1.75rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.faq-item ul {
    margin: 0.5rem 0 0 1.75rem;
    padding-left: 1.5rem;
    color: var(--gray-600);
}

.faq-item li {
    margin: 0.5rem 0;
}

/* SEO Content Section */
.seo-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.seo-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.seo-content article {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.seo-content article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.seo-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.seo-content p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--gray-600);
}

.seo-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--gray-800);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main p {
    margin: 0.5rem 0;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-main strong {
    font-size: 1.1rem;
}

.footer-nav h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin: 0.5rem 0;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-disclaimer {
    font-size: 0.875rem;
    opacity: 0.7;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .breadcrumb {
        padding: 0.5rem 0;
    }

    .breadcrumb ol {
        font-size: 0.8rem;
    }

    .wizard-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .faq-item p,
    .faq-item ul {
        margin-left: 0;
    }

    .seo-content {
        padding: 1.5rem;
    }

    .seo-content h2 {
        font-size: 1.25rem;
    }

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

    .footer-nav {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .wizard-container {
        padding: 1rem;
    }

    .result-content {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .navigation-buttons, .button-group, .faq-section, .progress-container {
        display: none;
    }

    .result-content {
        max-height: none;
        overflow: visible;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Message */
.success-message {
    background: #d1fae5;
    border-left: 4px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-top: 1rem;
    color: #065f46;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
