/* ========================================
   HYVYS — Clarté • Décision • Mouvement
   Design System
   ===================================== */

/* CSS Variables */
:root {
    /* Colors */
    --color-bg: #FAFAFA;
    --color-bg-alt: #F5F5F5;
    --color-text: #1A1A1A;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-accent: #1A1A1A;
    --color-accent-hover: #333333;
    --color-border: #E5E5E5;
    --color-card: #FFFFFF;
    --color-filtre: #FFF5F5;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

/* Sélection texte cohérente */
::selection {
    background: rgba(26, 26, 26, 0.1);
    color: var(--color-text);
}

::-moz-selection {
    background: rgba(26, 26, 26, 0.1);
    color: var(--color-text);
}

/* Scrollbar élégante */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    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: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* ========================================
   HEADER
   ===================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition-base);
}

.header.scrolled {
    border-bottom-color: var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link-cta {
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--color-accent-hover);
    color: white;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition-base);
}

/* ========================================
   HERO
   ===================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: heroFadeIn 1s ease-out forwards;
    opacity: 0;
}

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

.hero-title {
    animation: heroTitleIn 1.2s ease-out 0.2s forwards;
    opacity: 0;
}

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

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    font-weight: 400;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll span {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text), transparent);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   BUTTONS
   ===================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Focus visible pour accessibilité */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.btn-primary:focus-visible {
    outline-color: white;
    outline-offset: 3px;
}

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

.btn-secondary:hover {
    border-color: var(--color-text);
    background: var(--color-card);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

/* ========================================
   SECTIONS
   ===================================== */
.section {
    padding: var(--space-2xl) 0;
}

.section-header {
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.section-header-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.section-tag-alt {
    color: #C53030;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.section-intro {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ========================================
   CARDS
   ===================================== */
.cards-grid {
    display: grid;
    gap: var(--space-md);
}

.cards-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cards-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background: var(--color-card);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card:active {
    transform: translateY(-2px);
}

.card-icon {
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

.card-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.card-title {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.card-text {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.card-highlight {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

/* ========================================
   STEPS
   ===================================== */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.step-marker {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    border-radius: 50%;
}

.step-content {
    padding-top: var(--space-xs);
}

.step-title {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.step-text {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ========================================
   FILTRE SECTION
   ===================================== */
.section-filtre {
    background: var(--color-filtre);
}

.filtre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

.filtre-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.filtre-item:hover {
    border-color: var(--color-border);
    transform: translateX(4px);
}

.filtre-cross {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FC8181;
    color: white;
    font-size: 1.25rem;
    font-weight: 300;
    border-radius: 50%;
}

.filtre-text {
    font-size: 0.9375rem;
    color: var(--color-text);
}

.filtre-text strong {
    font-weight: 600;
}

/* ========================================
   RENDEZ-VOUS CARD
   ===================================== */
.section-rdv {
    background: var(--color-bg-alt);
}

.rdv-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.rdv-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.rdv-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.rdv-details {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.rdv-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rdv-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.rdv-detail-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.rdv-note {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.rdv-cta-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

/* ========================================
   ABOUT SECTION
   ===================================== */
.section-about {
    background: var(--color-bg);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.9;
}

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

.about-text p:first-of-type {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text);
}

.about-text strong {
    color: var(--color-text);
    font-weight: 600;
}

/* ========================================
   FOOTER
   ===================================== */
.footer {
    background: var(--color-accent);
    color: white;
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.footer-tagline {
    font-size: 0.875rem;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

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

.footer-link {
    font-size: 0.875rem;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.footer-link:hover {
    opacity: 1;
}

.footer-copyright {
    text-align: center;
    padding-top: var(--space-md);
}

.footer-copyright p {
    font-size: 0.8125rem;
    opacity: 0.5;
}

/* ========================================
   RESPONSIVE
   ===================================== */
@media (max-width: 768px) {
    :root {
        --space-2xl: 4rem;
        --container-padding: 1.25rem;
    }
    
    .header-inner {
        height: 70px;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: var(--space-sm) 0;
        font-size: 1rem;
    }
    
    .nav-link-cta {
        width: 100%;
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding-top: calc(70px + var(--space-lg));
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
    }
    
    .cards-grid-3,
    .cards-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-marker {
        margin: 0 auto;
    }
    
    .rdv-card {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .rdv-details {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .rdv-title {
        font-size: 2rem;
    }
}

/* ========================================
   MENTIONS LÉGALES
   ===================================== */
.section-legal {
    padding-top: calc(80px + var(--space-2xl));
    min-height: 60vh;
}

.legal-content {
    max-width: 700px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: var(--space-xl);
}

.legal-section h2 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.legal-section p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-xs);
}

.legal-section a {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.legal-back {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* ========================================
   PAGE MERCI
   ===================================== */
.section-merci {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: calc(80px + var(--space-2xl));
}

.merci-content {
    max-width: 500px;
    margin: 0 auto;
}

.merci-icon {
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    opacity: 0.9;
    animation: checkPop 0.6s ease-out 0.3s both;
}

@keyframes checkPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 0.9;
        transform: scale(1);
    }
}

.merci-icon svg {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkDraw 0.8s ease-out 0.5s forwards;
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.merci-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.merci-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    line-height: 1.1;
}

.merci-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.merci-message {
    background: var(--color-card);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.merci-message p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.merci-message p:last-child {
    margin-bottom: 0;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.merci-message strong {
    font-weight: 600;
}

.merci-message em {
    font-family: var(--font-heading);
    font-style: normal;
    font-weight: 500;
}

.merci-actions {
    margin-top: var(--space-lg);
}

/* Footer mini pour page merci */
.footer-mini {
    padding: var(--space-lg) 0;
}

.footer-mini .footer-copyright {
    text-align: center;
    padding-top: 0;
}

.footer-mini .footer-copyright p {
    font-size: 0.875rem;
    opacity: 0.6;
    color: white;
}

/* ========================================
   ANIMATIONS
   ===================================== */
@media (prefers-reduced-motion: no-preference) {
    .card {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .card:nth-child(1) { animation-delay: 0.1s; }
    .card:nth-child(2) { animation-delay: 0.2s; }
    .card:nth-child(3) { animation-delay: 0.3s; }
    .card:nth-child(4) { animation-delay: 0.4s; }
    .card:nth-child(5) { animation-delay: 0.5s; }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

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