:root {
    --bg-main: #FAFAF5; /* Cream */
    --text-main: #1C2321; /* Very dark green/charcoal */
    --text-muted: #52635B;
    
    --sage-green: #A3B1A6;
    --sage-dark: #5F7365;
    
    /* Option 1 : Teintes contrastées vert cyprès / émeraude profond */
    --forest-deep: #162E22;
    --forest-accent: #234836;
    --forest-light: #355F49;
    --sage-badge-bg: rgba(163, 177, 166, 0.18);
    --sage-badge-border: rgba(95, 115, 101, 0.28);
    
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px rgba(22, 46, 34, 0.06);
    
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Ambient Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-main);
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background-color: rgba(163, 177, 166, 0.4); /* Sage */
}

.blob-2 {
    bottom: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background-color: rgba(230, 218, 195, 0.4); /* Warm sand */
    animation-delay: -5s;
}

.blob-3 {
    top: 40%; left: 30%;
    width: 40vw; height: 40vw;
    background-color: rgba(255, 255, 255, 0.8);
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

p {
    color: var(--text-muted);
}

.italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: sticky;
    top: 0;
    z-index: 100;
    /* Glassmorphism sur scroll */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(250, 250, 245, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    /* Override max-width pour s'étendre en pleine largeur */
    max-width: 100%;
    padding: 1.5rem max(3rem, calc((100vw - 1200px) / 2 + 3rem));
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--sage-dark);
}

/* Buttons */
.btn-sage {
    background-color: var(--sage-dark);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sage:hover {
    background-color: var(--text-main);
    transform: translateY(-2px);
}

.btn-glass {
    background-color: rgba(255,255,255,0.3);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.5);
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background-color: rgba(255,255,255,0.6);
}

/* Bento Grid System */
.bento-container {
    max-width: 1200px;
    margin: 2rem auto 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-rows: minmax(200px, auto);
}

.bento-card {
    min-width: 0;
    overflow-wrap: anywhere;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(28, 35, 33, 0.08);
}

.col-span-2 { grid-column: span 2; }
.col-span-full { grid-column: 1 / -1; }

/* Specific Tiles */
.hero-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag,
.hero-tile .tag {
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--forest-accent);
    margin-bottom: 1rem;
    display: inline-block;
}

.cta-tile {
    background-color: var(--sage-green);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.cta-visual-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cta-visual-img {
    width: 100%;
    height: 175px;
    border-radius: 16px;
    object-fit: cover;
    object-position: center 65%;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 25px rgba(22, 46, 34, 0.14);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.cta-tile:hover .cta-visual-img {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 14px 32px rgba(22, 46, 34, 0.22);
}

.cta-tile h2 { color: var(--text-main); font-size: 1.5rem; }
.cta-tile p { color: rgba(28, 35, 33, 0.8); }

.service-tile {
    display: flex;
    flex-direction: column;
}

.service-number {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--sage-dark);
    margin-bottom: 2rem;
    font-style: italic;
}

.serif-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.divider,
.service-tile .divider {
    width: 2.5rem;
    height: 1px;
    background-color: var(--sage-dark);
    margin-bottom: 1.5rem;
}

/* TILES CSS */
/* Artisan Tile */
.artisan-tile {
    display: flex;
    flex-direction: column;
}

.artisan-photo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.artisan-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--card-bg);
    box-shadow:
        0 0 0 4px var(--sage-green),
        0 8px 24px rgba(22, 46, 34, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.artisan-photo:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 0 4px var(--sage-dark),
        0 12px 32px rgba(22, 46, 34, 0.2);
}

.signature {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--sage-dark);
    margin-top: auto;
    text-align: right;
}

/* Compat Tile */
.compat-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}
.soft-tag {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(109, 127, 114, 0.28);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.soft-tag:hover {
    border-color: var(--forest-accent);
    color: var(--forest-deep);
    background: #ffffff;
    transform: translateY(-1px);
}

/* Odoo Tile */
.odoo-tile {
    justify-content: flex-start;
}
.odoo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.odoo-tags .soft-tag {
    background: rgba(163, 177, 166, 0.16);
    border-color: rgba(95, 115, 101, 0.35);
}
.odoo-tags .soft-tag:hover {
    background: #ffffff;
    border-color: var(--forest-deep);
}

/* Use Case Tile */
.usecase-tile {
    justify-content: flex-start;
}
.usecase-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 0.5rem;
}
.usecase-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}
.usecase-icon {
    font-size: 1.5rem;
    min-width: 2.25rem;
    text-align: center;
    padding-top: 0.1rem;
}
.usecase-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}
.usecase-item p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* ROI Tile */
.roi-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.huge-number {
    font-size: 4.5rem;
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 1rem;
}

/* Testimonial */
.testimonial-tile {
    display: flex;
    flex-direction: column;
}
.quote-mark {
    font-family: var(--font-serif);
    font-size: 5rem;
    color: var(--sage-green);
    line-height: 0.5;
    margin-bottom: 1rem;
    margin-top: 2rem;
}
.quote-text {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}
.quote-author {
    font-size: 0.9rem;
    color: var(--sage-dark);
    font-weight: 500;
}

/* TILES PROJETS & PARCOURS */

/* Projects Tile */
.projects-tile {
    display: flex;
    flex-direction: column;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.project-item {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(109, 127, 114, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 46, 34, 0.08);
    border-color: var(--sage-dark);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--forest-accent);
    background: var(--sage-badge-bg);
    border: 1px solid var(--sage-badge-border);
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
}

.project-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(109, 127, 114, 0.12);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(109, 127, 114, 0.25);
    color: var(--text-main);
}

.project-result {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forest-accent);
}

.github-cta {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px dashed rgba(109, 127, 114, 0.28);
}

.github-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.3rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(109, 127, 114, 0.3);
    border-radius: 50px;
    transition: all 0.25s ease;
}

.github-link:hover {
    background: var(--forest-deep);
    color: #FAFAF5;
    border-color: var(--forest-deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(22, 46, 34, 0.18);
}

.github-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Experience Tile */
.experience-tile {
    display: flex;
    flex-direction: column;
}

.timeline {
    position: relative;
    padding-left: 1.25rem;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--sage-green);
    opacity: 0.45;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -1.25rem;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sage-dark);
    box-shadow: 0 0 0 3px var(--bg-main);
}

.timeline-dot.current {
    background: var(--forest-accent);
    box-shadow: 0 0 0 4px rgba(35, 72, 54, 0.25);
}

.timeline-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.3rem;
}

.timeline-role {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-main);
    line-height: 1.3;
}

.timeline-company {
    font-size: 0.88rem;
    color: var(--forest-accent);
    font-weight: 600;
    margin-top: 0.15rem;
}

.timeline-period {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 0.25rem;
}

.experience-badge {
    margin-top: auto;
    padding-top: 1.25rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--forest-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(109, 127, 114, 0.15);
}

/* Process Tile */
.process-tile {
    display: flex;
    flex-direction: column;
}

.process-tile .process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.step-num {
    background: var(--forest-accent);
    color: #FAFAF5;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(22, 46, 34, 0.15);
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.step-content .step-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* Security Tile */
.security-tile {
    background: var(--text-main);
    color: white;
}

.security-tile p, .security-tile h2 {
    color: white;
}

.sec-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 2rem;
}

.sec-item strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--sage-green);
}

.sec-item span {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Contact Tile */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info .email {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 1rem;
    color: var(--sage-dark);
}

.form-clean {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-clean input, .form-clean textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-clean input:focus, .form-clean textarea:focus {
    background: white;
    border-color: var(--sage-green);
}

/* Footer Tile */
.footer-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
}

/* Responsive — tablette */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    .bento-container {
        padding: 0 1rem;
        gap: 1rem;
    }
    .huge-number {
        font-size: 3rem;
    }
    .sec-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .process-tile .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .github-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    footer {
        padding: 0 1rem;
    }
}

/* Responsive -- mobile */
@media (max-width: 992px) {
    .bento-container {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .col-span-2, .col-span-full {
        grid-column: 1 / -1;
    }
    
    .sec-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Notice de confidentialité directement associée au formulaire. */
.contact-privacy {
    font-size: 0.85rem;
    line-height: 1.5;
}
.contact-privacy a { color: inherit; text-decoration: underline; }

/* Footer hors du main */
footer {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

/* Accessibilité — Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .blob {
        animation: none;
        opacity: 0.3;
    }
    .bento-card {
        transition: none;
    }
}
