/* ==========================================================================
   MAZ Consulting - Styles
   Mobile-first, accessible, performance-optimized
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-primary: #1e3a5f;
    --color-primary-dark: #152a45;
    --color-primary-light: #2c5282;
    --color-secondary: #4a6fa5;
    --color-accent: #3182ce;

    --color-text: #1a202c;
    --color-text-light: #4a5568;
    --color-text-muted: #718096;

    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-bg-dark: #edf2f7;

    --color-border: #e2e8f0;
    --color-border-light: #edf2f7;

    --color-success: #38a169;
    --color-error: #e53e3e;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    --line-height: 1.6;
    --line-height-tight: 1.3;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;

    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-tight);
    color: var(--color-primary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Skip Link (Accessibility)
   -------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    z-index: 1000;
    transition: top var(--transition);
}

.skip-link:focus {
    top: var(--space-md);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    font-size: var(--font-size-2xl);
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-intro {
    text-align: center;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 100;
    transition: box-shadow var(--transition);
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md);
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-primary);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.logo:hover {
    color: var(--color-primary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    z-index: 101;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-bg);
    padding: 100px var(--space-xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-slow);
}

.nav-menu.open {
    right: 0;
}

.nav-menu a {
    display: block;
    padding: var(--space-md);
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition);
}

.nav-menu a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.nav-cta {
    background: var(--color-primary) !important;
    color: white !important;
    text-align: center;
    margin-top: var(--space-md);
}

.nav-cta:hover {
    background: var(--color-primary-dark) !important;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px var(--space-md) var(--space-3xl);
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 300px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services {
    background: var(--color-bg-alt);
}

.services-grid {
    display: grid;
    gap: var(--space-lg);
}

.service-card {
    background: var(--color-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.service-card h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.service-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.service-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.service-benefits li::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-top: 0.5em;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Méthode
   -------------------------------------------------------------------------- */
.methode-steps {
    display: grid;
    gap: var(--space-xl);
}

.methode-step {
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-size: var(--font-size-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    color: var(--color-primary);
}

.methode-step h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.methode-step p {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

/* --------------------------------------------------------------------------
   À propos
   -------------------------------------------------------------------------- */
.apropos {
    background: var(--color-bg-alt);
}

.apropos-content {
    display: grid;
    gap: var(--space-xl);
}

.apropos-text p {
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
}

.apropos-text p:last-child {
    margin-bottom: 0;
}

.apropos-text strong {
    color: var(--color-text);
}

.apropos-values {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.value-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.value-item span {
    font-weight: 500;
    color: var(--color-text);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list {
    max-width: var(--container-narrow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text);
    transition: background var(--transition);
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    background: var(--color-bg-alt);
}

.faq-question {
    flex: 1;
    padding-right: var(--space-md);
}

.faq-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    background: var(--color-text-muted);
    transition: transform var(--transition);
}

.faq-icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-icon::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.faq-item[open] .faq-icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
}

.faq-answer p {
    color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
    background: var(--color-bg-alt);
}

.contact-wrapper {
    display: grid;
    gap: var(--space-2xl);
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-weight: 500;
    color: var(--color-text);
}

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

.form-group input,
.form-group textarea {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--color-error);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--color-error);
    min-height: 1.25rem;
}

.btn-submit {
    margin-top: var(--space-sm);
}

.form-status {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(56, 161, 105, 0.1);
    color: var(--color-success);
}

.form-status.error {
    display: block;
    background: rgba(229, 62, 62, 0.1);
    color: var(--color-error);
}

.contact-alt {
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-alt p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.contact-email {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.email-link {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-primary);
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    transition: all var(--transition);
}

.btn-copy:hover {
    background: var(--color-bg-dark);
    color: var(--color-text);
}

.btn-copy.copied {
    background: var(--color-success);
    color: white;
}

.contact-delay {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Legal
   -------------------------------------------------------------------------- */
.legal {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
}

.legal-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.legal-content h3 {
    font-size: var(--font-size-lg);
    margin: var(--space-xl) 0 var(--space-sm);
    color: var(--color-text);
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.legal-content a {
    color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-xl) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.footer-copy {
    font-size: var(--font-size-sm);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 50;
}

.back-to-top:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Responsive - Tablet (min-width: 640px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
    .section {
        padding: var(--space-4xl) 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .hero h1 {
        font-size: var(--font-size-3xl);
    }

    .hero-cta {
        flex-direction: row;
        max-width: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .methode-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-email {
        flex-direction: row;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Desktop (min-width: 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
        box-shadow: none;
    }

    .nav-menu a {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-cta {
        margin-top: 0;
        margin-left: var(--space-sm);
    }

    .hero h1 {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-xl);
    }

    .apropos-content {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Large Desktop (min-width: 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .methode-steps {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-lg);
    }

    .methode-step::after {
        content: "";
        position: absolute;
        top: 40px;
        right: -20px;
        width: 40px;
        height: 2px;
        background: var(--color-border);
    }

    .methode-step:last-child::after {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .nav,
    .back-to-top,
    .hero-cta,
    .contact-form,
    .btn-copy {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .section {
        padding: var(--space-xl) 0;
        break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
