/* ========================================= */
/* ARTISAN DU WEB - SERVICES */
/* Design élégant, professionnel et intemporel */
/* VERSION ULTRA-OPTIMISÉE RESPONSIVE */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Lato:wght@300;400;600;700&display=swap');

/* ========================================= */
/* 1. VARIABLES CSS */
/* ========================================= */

:root {
    --color-primary: #2C3E50;
    --color-secondary: #34495E;
    --color-accent: #D4AF37;
    --color-accent-light: #E8C468;
    --color-background: #FAF9F6;
    --color-card: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-light: #6C7A89;
    --color-border: #E5E5E5;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', 'Helvetica Neue', sans-serif;
    
    /* Espacements fluides avec clamp */
    --spacing-xs: clamp(0.4rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.75rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2.5rem);
    --spacing-xl: clamp(2rem, 6vw, 4rem);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.16);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Touch targets minimum 44px */
    --touch-target: 44px;
}

/* ========================================= */
/* 2. RESET ET BASE */
/* ========================================= */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.5vw, 16px);
    color: var(--color-text);
    line-height: 1.7;
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================= */
/* 3. TYPOGRAPHIE RESPONSIVE */
/* ========================================= */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

h1 { 
    font-size: clamp(2rem, 5vw + 0.5rem, 4rem); 
    letter-spacing: -0.02em;
}

h2 { 
    font-size: clamp(1.5rem, 4vw + 0.5rem, 3rem); 
    position: relative;
    padding-bottom: var(--spacing-md);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(60px, 12vw, 80px);
    height: 3px;
    background: var(--color-accent);
}

h3 { 
    font-size: clamp(1.15rem, 2.5vw, 1.75rem); 
}

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

@media (hover: hover) {
    a:hover {
        color: var(--color-accent-light);
    }
}

/* ========================================= */
/* 4. BOUTON RETOUR - TOUCH-OPTIMIZED */
/* ========================================= */

.back-button-fixed {
    position: fixed; 
    top: clamp(15px, 3vw, 30px);
    left: clamp(15px, 3vw, 30px);
    z-index: 1000;
}

.back-button-fixed .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(45px, 10vw, 55px);
    height: clamp(45px, 10vw, 55px);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--color-primary);
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

@media (hover: hover) {
    .back-button-fixed .back-link:hover {
        background: var(--color-accent);
        color: white;
        border-color: var(--color-accent);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

.back-button-fixed .back-link:active {
    transform: translateY(-2px);
}

/* ========================================= */
/* 5. HERO SECTION - RESPONSIVE */
/* ========================================= */

main {
    min-height: 100vh;
}

.hero-services {
    position: relative;
    padding: clamp(3rem, 10vh, 8rem) clamp(3%, 5vw, 5%) clamp(4rem, 12vh, 10rem);
    text-align: center;
    background: linear-gradient(135deg, var(--color-background) 0%, #FFFFFF 100%);
    overflow: hidden;
}

.hero-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(90deg, var(--color-accent) 0px, transparent 1px, transparent 40px),
        repeating-linear-gradient(0deg, var(--color-accent) 0px, transparent 1px, transparent 40px);
    z-index: 0;
}

.hero-services h1 {
    position: relative;
    z-index: 1;
    margin-bottom: var(--spacing-md);
}

.hero-services p {
    position: relative;
    z-index: 1;
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    padding: 0 var(--spacing-sm);
}

/* ========================================= */
/* 6. SECTIONS - RESPONSIVE */
/* ========================================= */

.section-how-it-works,
.section-pricing,
.section-testimonials,
.section-final-cta {
    padding: var(--spacing-xl) clamp(3%, 5vw, 5%);
    max-width: 1280px;
    margin: 0 auto;
}

.section-how-it-works h2,
.section-pricing h2,
.section-testimonials h2,
.section-final-cta h2 {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* ========================================= */
/* 7. PROCESSUS - ÉTAPES RESPONSIVE */
/* ========================================= */

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.process-steps .step {
    background: var(--color-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-accent);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
    .process-steps .step:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }
}

.process-steps h3 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
}

.process-steps p {
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

/* ========================================= */
/* 8. IMAGE SÉPARATRICE - RESPONSIVE */
/* ========================================= */

.section-image-divider {
    padding: var(--spacing-xl) clamp(3%, 5vw, 5%);
    text-align: center;
    background: white;
}

.section-image-divider img {
    max-width: min(700px, 100%);
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

/* ========================================= */
/* 9. TARIFICATION - ULTRA-RESPONSIVE */
/* ========================================= */

.section-pricing {
    background: white;
}

.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.pack {
    background: var(--color-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
}

@media (hover: hover) {
    .pack:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: var(--color-accent);
    }
}

.pack:active {
    transform: translateY(-4px);
}

.pack.full.featured {
    background: linear-gradient(135deg, #FFFEF9 0%, #FFFCF0 100%);
    border: 3px solid var(--color-accent);
    padding-top: calc(var(--spacing-xl) + clamp(1.5rem, 4vw, 2rem));
}

.pack.full.featured::before {
    content: 'Le plus populaire';
    position: absolute;
    top: clamp(0.5rem, 2vw, 1rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: white;
    padding: clamp(0.3rem, 1vw, 0.4rem) clamp(0.8rem, 2vw, 1rem);
    border-radius: 50px;
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pack h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.pack .price {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--color-accent);
    margin: var(--spacing-md) 0;
    font-family: var(--font-heading);
}

.pack ul {
    list-style: none;
    flex-grow: 1;
    margin-bottom: var(--spacing-lg);
}

.pack ul li {
    padding: var(--spacing-sm) 0;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-border);
    padding-left: 1.6rem;
    position: relative;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

.pack ul li::before {
    content: '✓';
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1rem;
    position: absolute;
    left: 0;
    top: calc(var(--spacing-sm) + 0.1em);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem) var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: #222;
    text-shadow: 0 1px 2px rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    min-height: var(--touch-target);
}

@media (hover: hover) {
    .cta-button:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        color: #fff;
    }
}

.cta-button:active {
    transform: translateY(0);
}

/* ========================================= */
/* 10. GESTION CLIENT - RESPONSIVE */
/* ========================================= */

.section-client-management {
    padding: var(--spacing-xl) clamp(3%, 5vw, 5%);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    margin: var(--spacing-xl) 0;
}

.section-client-management h2 {
    color: white;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-client-management h2::after {
    background: var(--color-accent);
}

.section-client-management > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    padding: 0 var(--spacing-sm);
}

.management-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--spacing-lg);
    max-width: 1100px;
    margin: 0 auto;
}

.management-options article {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .management-options article:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-5px);
    }
}

.management-options h3 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
}

.management-options ul {
    list-style: none;
}

.management-options ul li {
    padding: var(--spacing-xs) 0;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

.management-options ul li::before {
    content: '→';
    color: var(--color-accent);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 0.1em;
}

/* ========================================= */
/* 11. FOOTER */
/* ========================================= */

.site-footer {
    text-align: center;
    padding: var(--spacing-xl) clamp(3%, 5vw, 5%);
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer p {
    margin: 0;
    line-height: 1.6;
}

/* ========================================= */
/* 12. RESPONSIVE - BREAKPOINTS DÉTAILLÉS */
/* ========================================= */

/* Tablettes */
@media (max-width: 768px) {
    .hero-services {
        padding: clamp(2.5rem, 8vh, 4rem) var(--spacing-md) clamp(3rem, 10vh, 5rem);
    }
    
    .process-steps,
    .pricing-table,
    .management-options {
        gap: var(--spacing-md);
    }
    
    .pack,
    .management-options article,
    .process-steps .step {
        padding: var(--spacing-lg);
    }
    
    .section-image-divider img {
        border-radius: var(--radius-md);
    }
}

/* Mobiles */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .process-steps,
    .pricing-table,
    .management-options {
        grid-template-columns: 1fr;
    }
    
    .pack,
    .management-options article,
    .process-steps .step {
        padding: var(--spacing-md);
    }
    
    .hero-services {
        padding: clamp(2rem, 6vh, 3rem) var(--spacing-sm) clamp(2.5rem, 8vh, 4rem);
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .pack.full.featured::before {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Orientation paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-services {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

/* ========================================= */
/* 13. ANIMATIONS - OPTIMISÉES MOBILE */
/* ========================================= */

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

/* Animations uniquement sur desktop */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    .hero-services {
        animation: fadeInUp 0.6s ease-out backwards;
    }
    
    .process-steps .step {
        animation: fadeInUp 0.6s ease-out backwards;
    }
    
    .process-steps .step:nth-child(1) { animation-delay: 0.1s; }
    .process-steps .step:nth-child(2) { animation-delay: 0.2s; }
    .process-steps .step:nth-child(3) { animation-delay: 0.3s; }
    
    .pack {
        animation: fadeInUp 0.6s ease-out backwards;
    }
    
    .pack:nth-child(1) { animation-delay: 0.1s; }
    .pack:nth-child(2) { animation-delay: 0.2s; }
    .pack:nth-child(3) { animation-delay: 0.3s; }
    
    .management-options article {
        animation: fadeInUp 0.6s ease-out backwards;
    }
    
    .management-options article:nth-child(1) { animation-delay: 0.1s; }
    .management-options article:nth-child(2) { animation-delay: 0.2s; }
}

/* ========================================= */
/* 14. ACCESSIBILITÉ */
/* ========================================= */

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour navigation clavier */
a:focus-visible,
button:focus-visible,
.cta-button:focus-visible,
.back-button-fixed .back-link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

/* Sélection de texte */
::selection {
    background: var(--color-accent-light);
    color: white;
}

/* Scrollbar personnalisée (desktop uniquement) */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 10px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--color-background);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--color-accent);
        border-radius: 5px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-accent-light);
    }
}

/* ========================================= */
/* 15. OPTIMISATIONS MOBILES */
/* ========================================= */

/* Amélioration du tap/scroll sur mobile */
@media (max-width: 768px) {
    body {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
    }
    
    /* Éviter le zoom sur input sur iOS */
    input, select, textarea, button {
        font-size: 16px;
    }
}
