/* ============================================
   VARIABLES & BASE STYLES
   ============================================ */

:root {
    /* Colors - Palette sobre et atelier */
    --color-bg: #ebedf7;
    --color-surface-section: rgba(255, 255, 255, .8);
    --color-surface-cards: rgba(255, 255, 255, 1);
    --color-text: #0F1724;
    --color-text-light: #434752;
    --color-border: #0F1724;
    --color-border-light: #9399a7;
    --color-accent: #0F1724;
    --color-accent-light: #daddea;
    --color-highlight: #FEF3C7;
    --color-highlight-border: #EAB308;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.2rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border */
    --border-width: 3px;
    --border-radius-total: 50px;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-headings: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;
    
    /* Line height */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Max width */
    --container-width: 1200px;
}

/* ============================================
   RESET & BASE
   ============================================ */

#portfolio, #services, .hero-visual { display: none; } /* TODO */

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

html {
    scroll-behavior: smooth;
}

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

    background-image: 
        linear-gradient(rgba(176, 190, 210, 0.1) 2px, transparent 2px),
        linear-gradient(90deg, rgba(176, 190, 210, 0.1) 2px, transparent 2px),
        linear-gradient(rgba(176, 190, 210, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(176, 190, 210, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;

}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-light);
}

p:last-child {
    margin-bottom: 0;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

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

/* ============================================
   CARD COMPONENTS (style atelier)
   ============================================ */

/* Carte de base - réutilisable */
.card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 8px 8px 0 rgba(15, 23, 36, 0.15);
    z-index: 10;
}

/* Variantes de cartes */
.card-sm {
    padding: var(--spacing-md);
}

.card-lg {
    padding: var(--spacing-xl);
}

.card-highlight {
    background: var(--color-highlight);
    border-color: var(--color-highlight-border);
}

/* ============================================
   DISPOSITION ALÉATOIRE GLOBALE
   Système réutilisable pour toutes les cartes
   ============================================ */

/* Pattern de rotations et décalages pour les cartes avec overlap */
.service-card:nth-child(6n+1),
.portfolio-item:nth-child(6n+1),
.testimonial-card:nth-child(6n+1),
.plan-card:nth-child(6n+1),
.skill:nth-child(6n+1),
.problem-card:nth-child(6n+1) {
    transform: rotate(-1.2deg) translate(-12px, -8px);
    z-index: 1;
}

.service-card:nth-child(6n+2),
.portfolio-item:nth-child(6n+2),
.testimonial-card:nth-child(6n+2),
.plan-card:nth-child(6n+2),
.skill:nth-child(6n+2),
.problem-card:nth-child(6n+2) {
    transform: rotate(1deg) translate(-10px, 6px);
    z-index: 2;
}

.service-card:nth-child(6n+3),
.portfolio-item:nth-child(6n+3),
.testimonial-card:nth-child(6n+3),
.plan-card:nth-child(6n+3),
.skill:nth-child(6n+3),
.problem-card:nth-child(6n+3) {
    transform: rotate(-0.6deg) translate(-8px, 4px);
    z-index: 3;
}

.service-card:nth-child(6n+4),
.portfolio-item:nth-child(6n+4),
.testimonial-card:nth-child(6n+4),
.plan-card:nth-child(6n+4),
.skill:nth-child(6n+4),
.problem-card:nth-child(6n+4) {
    transform: rotate(1.3deg) translate(9px, -6px);
    z-index: 4;
}

.service-card:nth-child(6n+5),
.portfolio-item:nth-child(6n+5),
.testimonial-card:nth-child(6n+5),
.plan-card:nth-child(6n+5),
.skill:nth-child(6n+5),
.problem-card:nth-child(6n+5) {
    transform: rotate(-0.9deg) translate(-10px, 3px);
    z-index: 5;
}

.service-card:nth-child(6n+6),
.portfolio-item:nth-child(6n+6),
.testimonial-card:nth-child(6n+6),
.plan-card:nth-child(6n+6),
.skill:nth-child(6n+6),
.problem-card:nth-child(6n+6) {
    transform: rotate(0.8deg) translate(-16px, -7px);
    z-index: 6;
}

/* Version light pour les skills: rotations réduites, pas de translate */
.skill:nth-child(6n+1) {
    transform: rotate(-0.9deg);
}

.skill:nth-child(6n+2) {
    transform: rotate(0.7deg);
}

.skill:nth-child(6n+3) {
    transform: rotate(-0.5deg);
}

.skill:nth-child(6n+4) {
    transform: rotate(0.9deg);
}

.skill:nth-child(6n+5) {
    transform: rotate(-0.7deg);
}

.skill:nth-child(6n+6) {
    transform: rotate(0.5deg);
}

/* Pattern simple pour process-card (rotation uniquement, pas d'overlap) */
.process-item:nth-child(6n+1) .process-card {
    transform: rotate(0.5deg);
}

.process-item:nth-child(6n+2) .process-card {
    transform: rotate(-0.7deg);
}

.process-item:nth-child(6n+3) .process-card {
    transform: rotate(0.6deg);
}

.process-item:nth-child(6n+4) .process-card {
    transform: rotate(-0.5deg);
}

.process-item:nth-child(6n+5) .process-card {
    transform: rotate(0.8deg);
}

.process-item:nth-child(6n+6) .process-card {
    transform: rotate(-0.6deg);
}

/* Hover uniforme pour toutes les cartes */
.service-card:hover,
.portfolio-item:hover,
.testimonial-card:hover,
.plan-card:hover,
.problem-card:hover,
.process-card:hover {
    box-shadow: 10px 10px 0 rgba(15, 23, 36, 0.15);
    z-index: 10;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 600;
    font-size: var(--font-size-base);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-total);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(15, 23, 36, 0.2);
}

.btn-secondary {
    background: var(--color-surface-cards);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(15, 23, 36, 0.1);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: #fff;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-square {
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-sm);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--color-text-light);
}

.nav-cta {
    padding: var(--spacing-xs) var(--spacing-md);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: var(--spacing-3xl) 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
    line-height: var(--line-height-relaxed);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.scroll-hint {
    display: inline-block;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: color 0.2s ease;

    border-bottom: 1px solid var(--color-text-light);

    margin-top: var(--spacing-md);
}

.scroll-hint::after {
    content: ' ↓';
}

.scroll-hint:hover {
    color: var(--color-text);
}

.hero-frame {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.hero-art {
    width: 100%;
    height: auto;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    background: var(--color-surface-section);
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.about-photo {
    position: relative;
    transform: rotate(-2deg);
}

.profile-photo {
    width: 100%;
    height: auto;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 4px 4px 12px rgba(15, 23, 36, 0.12);
}

.about-text {
    max-width: 800px;
}

.about-text .section-title {
    text-align: left;
}

.skills {
    margin-top: calc(var(--spacing-xl) + 30px); /* Extra space for handle */
    padding: var(--spacing-lg);
    padding-top: calc(var(--spacing-lg) + 12px); /* Space for clasps */
    background: var(--color-accent-light);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    transform: rotate(-0.5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Toolbox handle */
.skills::before {
    content: '';
    position: absolute;
    top: -33px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    border: var(--border-width) solid var(--color-border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}


.skills:hover {
    transform: rotate(0deg);
    box-shadow: 6px 6px 0 rgba(15, 23, 36, 0.1);
}

.skills h3 {
    margin-bottom: var(--spacing-md);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-xs);
    background: var(--color-surface-cards);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s ease;
}

.skill:hover {
    box-shadow: 6px 6px 0 rgba(15, 23, 36, 0.1);
    z-index: 20;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xs);
    padding: var(--spacing-xl);
}

.service-card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--color-text-light);
    line-height: var(--line-height-relaxed);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

.portfolio {
    background: var(--color-surface-section);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
}

.portfolio-item {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.portfolio-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: var(--border-width) solid var(--color-border);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-text-light);
}

.portfolio-content {
    padding: var(--spacing-lg);
}

.portfolio-content h3 {
    margin-bottom: var(--spacing-sm);
}

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

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-accent-light);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-total);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* ============================================
   PROCESS SECTION
   ============================================ */

.process-list {
    max-width: 900px;
    margin: 0 auto;
}

.process-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--spacing-lg);
    position: relative;
    align-items: start;
}

.process-item:last-child {
    margin-bottom: 0;
}

.process-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 90px;
    bottom: -10px;
    width: 2px;
    background: var(--color-border-light);
    left: 40px;
}

.process-marker {
    position: relative;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.marker-circle {
    width: 60px;
    height: 60px;
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
}

.marker-badge {
    position: absolute;
    right: -5px;
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    color: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-sm);
    z-index: 3;
}

.process-card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);

    /* layout: left = text column, right = image */
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.process-card .duration {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-highlight);
    border: 2px solid var(--color-highlight-border);
    border-radius: var(--border-radius-total);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.process-card h3 {
    margin-bottom: var(--spacing-sm);
}

.process-lead {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.process-card p {
    color: var(--color-text-light);
}

.process-photo {
    position: relative;
    /* reserve slightly less space so the visual translation lets the image protrude
       while the content can use the freed space */
    flex: 0 0 calc(280px - 24px);
    width: calc(280px - 24px);
    margin: 0;
    z-index: 6; /* ensure it sits above neighboring elements */
    overflow: visible; /* allow the image to overflow the container */
}

.process-photo .phase-photo {
    width: 280px; /* visual image width (container is smaller so it will protrude)
                    this overrides the global .phase-photo width:100% */
    height: auto;
}

.process-content {
    flex: 1 1 auto;
    min-width: 0; /* allow text to wrap nicely inside */
}

/* Responsive: stack on small screens */
@media (max-width: 720px) {
    .process-card {
        flex-direction: column;
    }

    .process-photo {
        width: 100%;
        flex: 0 0 auto;
        order: 1;
        margin-top: var(--spacing-md);
        transform: none; /* reset the protrusion on small screens */
    }

    .process-content {
        order: 0;
    }
}

.phase-photo {
    width: 100%;
    height: auto;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 3px 4px 10px rgba(15, 23, 36, 0.1);
    transform: rotate(1.5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phase-photo:hover {
    transform: rotate(0deg);
    box-shadow: 6px 8px 16px rgba(15, 23, 36, 0.15);
}


/* Variation des rotations et positions des trombones */
.process-item:nth-child(2) .phase-photo {
    transform: rotate(-1.8deg);
}

.process-item:nth-child(2) .phase-photo {
    transform: rotate(-1.8deg);
}

.process-item:nth-child(3) .phase-photo {
    transform: rotate(2deg);
}

.process-item:nth-child(4) .phase-photo {
    transform: rotate(-1.5deg);
}

.process-item:nth-child(5) .phase-photo {
    transform: rotate(1.2deg);
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials {
    background: var(--color-surface-section);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: var(--spacing-xl);
    align-items: start;
}

.testimonial-card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.quote-mark {
    font-size: 4rem;
    line-height: 1;
    color: var(--color-accent-light);
    font-weight: 700;
    height: .5em;
}

.testimonial-text {
    font-weight: 600;
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
}

.testimonial-body {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-relaxed);
}

.testimonial-footer {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: var(--border-width) solid var(--color-border);
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-author {
    font-weight: 600;
    margin-bottom: 0;
}

.testimonial-role {
    font-weight: 400;
    color: var(--color-text-light);
}

/* ============================================
   WHY SECTION
   ============================================ */

.why-card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    padding-top: calc(var(--spacing-xl) + 20px);
    transform: rotate(-0.5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
    position: relative;
    
    /* Effet plan de construction technique - fond bleuté */

    /* Grille de construction technique */
    background-image: 
        /* Lignes de grille horizontales et verticales */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(15, 23, 36, 0.08) 49px,
            rgba(15, 23, 36, 0.08) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(15, 23, 36, 0.08) 49px,
            rgba(15, 23, 36, 0.08) 50px
        ),
        /* Croix de repérage aux 4 coins (plus grandes) */
        linear-gradient(90deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(0deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(90deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(0deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(90deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(0deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(90deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(0deg, var(--color-border) 0%, var(--color-border) 100%),
        /* Lignes d'angle aux coins (diagonales) */
        linear-gradient(135deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(45deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(135deg, var(--color-border) 0%, var(--color-border) 100%),
        linear-gradient(45deg, var(--color-border) 0%, var(--color-border) 100%);
    background-size: 
        100% 100%,
        100% 100%,
        20px 2px, 2px 20px,
        20px 2px, 2px 20px,
        20px 2px, 2px 20px,
        20px 2px, 2px 20px,
        20px 2px,
        20px 2px,
        20px 2px,
        20px 2px;
    background-position: 
        0 0,
        0 0,
        12px 12px, 12px 12px,
        calc(100% - 12px) 12px, calc(100% - 12px) 12px,
        12px calc(100% - 12px), 12px calc(100% - 12px),
        calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) calc(100% - 12px),
        12px 12px,
        calc(100% - 12px) 12px,
        12px calc(100% - 12px),
        calc(100% - 12px) calc(100% - 12px);
    background-repeat: 
        repeat,
        repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat,
        no-repeat,
        no-repeat,
        no-repeat;
}

/* Labels style plan de construction technique */
.why-card::before {
    content: 'VIBE CODE';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--color-text);
    opacity: 0.5;
    font-family: monospace;
    padding: 4px 12px;
    border-radius: 2px;
}

.why-card::after {
    content: 'REV. 1.0 | ÉCHELLE 1:1 | DATE: NOV 2025';
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 8px;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.4;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.why-card h3, .why-card p {
    background-color: var(--color-surface-cards);
    padding: 4px;
}

.why-card:hover {
    box-shadow: 8px 8px 0 rgba(15, 23, 36, 0.1);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.why-item h3 {
    margin-bottom: var(--spacing-sm);
}

.why-item p {
    color: var(--color-text-light);
    line-height: var(--line-height-relaxed);
}

/* ============================================
   PROBLEM SECTION (dark variant)
   ============================================ */

.problem-section {
    background: linear-gradient(180deg, #1e325c 0%, #0f1a2e 100%);
    color: #f5f7fa;
    padding: var(--spacing-3xl) 0;
}

.problem-section p {
    color: #f5f7fa; 

}

.problem-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-lg) * 0.75);
    align-items: start;
}

.problem-item {
    gap: var(--spacing-lg);
    padding: calc(var(--spacing-md) * 0.6) 0;
    max-width: 900px;
    margin: 0 auto;
}

.problem-number {
    flex: 0 0 48px;
    display: flex;
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-3xl);
}

.problem-content h3 {
    margin: 0 0 var(--spacing-xs) 0;
    color: #ffffff;
}

.problem-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 900px) {
    .problem-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .problem-item { 
        padding: var(--spacing-sm) 0; 
    }
}

@media (max-width: 700px) {
    .problem-item { 
        gap: var(--spacing-md); 
    }
    .problem-number { 
        flex: 0 0 40px; 
        width: 40px; 
        height: 40px; 
    }
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing {
    background: var(--color-surface-section);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
}

.plan-card {
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.plan-recommended {
    border-color: var(--color-highlight-border);
    background: var(--color-highlight);
}

.plan-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-accent);
    color: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    white-space: nowrap;
}

.plan-header {
    margin-bottom: var(--spacing-lg);
}

.plan-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xs);
}

.plan-sub {
    color: var(--color-text-light);
    font-size: var(--font-size-base);
}

.plan-price {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.plan-period {
    font-size: var(--font-size-base);
    font-weight: 400;
    color: var(--color-text-light);
}

.plan-features {
    list-style: none;
    margin-bottom: var(--spacing-xl);
    flex-grow: 1;
}

.plan-features li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-lg);
    position: relative;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--color-accent);
}

.plan-cta {
    margin-top: auto;
}

.plan-cta .btn-primary {
    width: 100%;
}

.pricing-note {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    background: var(--color-accent-light);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    text-align: center;
    transform: rotate(0.8deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.pricing-note:hover {

    box-shadow: 6px 6px 0 rgba(15, 23, 36, 0.1);
}

.pricing-note p:first-child {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-quick {
    color: inherit;
}

.contact-quick a.btn-secondary {
    display: inline-block;
}

.contact-form .contact-note {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--color-text-light);
    font-weight: 600;
}

.contact-form {
    max-width: 600px;
    background: var(--color-surface-cards);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-2xl);
    transform: rotate(0.5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 3px 8px rgba(15, 23, 36, 0.08);
}

.contact-form:hover {
    box-shadow: 8px 8px 0 rgba(15, 23, 36, 0.1);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background: var(--color-surface-cards);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.contact-form .btn-primary {
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--color-surface-section);
    border-top: var(--border-width) solid var(--color-border);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
}

.footer-brand p {
    color: var(--color-text-light);
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-base);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-text-light);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-text);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-links a {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-accent-light);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--color-accent);
    color: var(--color-surface-cards);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-accent-light);
    text-align: center;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: var(--border-width) solid var(--color-border);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
    }
    
    /* About section responsive */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-photo {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .about-text .section-title {
        text-align: center;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
    }
    
    /* Portfolio grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
    }
    
    /* Process - simplification mobile */
    .process-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Masquer le marker et le trait vertical sur mobile */
    .process-marker {
        display: none;
    }
    
    .process-item:not(:last-child)::before {
        display: none;
    }
    
    /* Testimonials */
    .testimonials-grid {
        padding: var(--spacing-sm);
        grid-template-columns: 1fr;
    }
    
    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links ul {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Spacing adjustments */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Typography */
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    
    /* Cards */
    .card,
    .service-card,
    .process-card,
    .testimonial-card,
    .plan-card {
        padding: var(--spacing-md);
    }
    
    /* Why grid */
    .why-grid {
        grid-template-columns: 1fr;
    }
}
