/* ============================================
   IBRAHIMA GEO — Global Stylesheet
   Colors: #383838 (dark) · #39c6ae (turquoise) · #ffa33e (orange)
   Font: Plus Jakarta Sans
   ============================================ */

:root {
    --dark: #383838;
    --turquoise: #39c6ae;
    --turquoise-rgb: 57,198,174;
    --turquoise-dark: #2fb09a;
    --turquoise-pale: #e6f7f4;
    --orange: #ffa33e;
    --orange-rgb: 255,163,62;
    --orange-light: #fff3e0;
    --text: #383838;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-btn: 8px;
    --radius-tag: 4px;
    --font: 'Plus Jakarta Sans';
    --font-fallback: sans-serif;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --size-hero-title: 3.2rem;
    --size-hero-subtitle: 1rem;
    --size-section-title: 2.2rem;
    --size-h1: 2.8rem;
    --size-h2: 2rem;
    --size-h3: 1.4rem;
    --size-body: 1rem;
    --size-small: 0.875rem;
    --size-nav: 0.9rem;
    --size-card-title: 1.15rem;
    --size-card-body: 0.95rem;
    --size-cta: 0.875rem;
    --size-tag: 0.75rem;
    --size-footer: 0.875rem;
    --spacing-section: 100px;
    --spacing-card-padding: 36px;
    --spacing-card-gap: 24px;
    --spacing-container-max: 1140px;
    --spacing-nav-height: 72px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font), -apple-system, BlinkMacSystemFont, var(--font-fallback);
    font-size: var(--size-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== UTILITIES ===== */
.container { max-width: var(--spacing-container-max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px); }
.section-padding { padding: var(--spacing-section) 0; }

/* ===== SKIP LINK (a11y) ===== */
.skip-link {
    position: absolute; top: -40px; left: 8px;
    background: var(--dark); color: white;
    padding: 10px 16px; border-radius: 6px;
    font-size: var(--size-small); font-weight: 600;
    text-decoration: none; z-index: 9999;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--turquoise); outline-offset: 2px; }
[data-theme="dark"] .skip-link { background: var(--turquoise); color: #1a1a1a; }

/* ===== Screen-reader only ===== */
.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;
}

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: var(--size-small); font-weight: 600; color: var(--turquoise);
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px;
}
.section-label::before {
    content: ''; width: 20px; height: 2px;
    background: var(--turquoise); border-radius: 2px;
}
.section-title {
    font-size: var(--size-section-title); font-weight: var(--fw-bold); color: var(--dark);
    margin-bottom: 16px; letter-spacing: -0.02em; line-height: 1.2;
}
.section-desc {
    color: var(--text-secondary); font-size: var(--size-body);
    max-width: 640px; margin-bottom: 48px; line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius-btn);
    font-weight: var(--fw-semibold); font-size: var(--size-cta);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer; border: none;
    font-family: inherit;
    min-height: 44px; /* touch target */
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}
.btn-primary { background: var(--dark); color: white; }
.btn-primary:hover { background: var(--orange); color: white; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.btn-white { background: white; color: var(--dark); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== NAV ===== */
nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
    max-width: var(--spacing-container-max); margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    height: var(--spacing-nav-height);
}
.nav-logo { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.nav-logo-img { height: 60px; width: auto; display: block; }
.nav-logo-img-dark { height: 60px; width: auto; display: none; }
[data-theme="dark"] .nav-logo-img { display: none; }
[data-theme="dark"] .nav-logo-img-dark { display: block; }
/* Fallback avant que le JS pose data-theme : respecter le choix système */
@media (prefers-color-scheme: dark) {
    :not([data-theme]) .nav-logo-img { display: none; }
    :not([data-theme]) .nav-logo-img-dark { display: block; }
}

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text-secondary); font-size: var(--size-nav);
    font-weight: var(--fw-medium); transition: color 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--dark); }
.nav-links a.active::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 2px; background: var(--orange); border-radius: 2px;
}
.nav-cta {
    background: var(--dark); color: white !important;
    padding: 8px 20px; border-radius: 8px; font-size: var(--size-cta) !important;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--orange) !important; }

/* Mobile toggle */
.nav-toggle {
    display: none; cursor: pointer; background: none; border: none;
    padding: 8px; z-index: 1001;
}
/* Mobile nav backdrop — hidden on desktop */
.nav-backdrop { display: none; }
/* Mobile nav-extras clone — hidden on desktop */
.nav-extras-mobile { display: none; }
.nav-toggle span {
    display: block; width: 22px; height: 2px; background: var(--dark);
    margin: 5px 0; transition: 0.3s; border-radius: 2px;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
    padding: 140px 0 60px;
    background: var(--bg-alt);
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute;
    top: -200px; right: -200px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,163,62,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.page-hero .breadcrumb {
    font-size: var(--size-small); color: var(--text-secondary); margin-bottom: 12px;
}
.page-hero .breadcrumb a { color: var(--orange); }
.page-hero h1 {
    font-size: var(--size-h1); font-weight: var(--fw-bold); color: var(--dark);
    letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px;
}
.page-hero > .container > p {
    color: var(--text-secondary); font-size: var(--size-body); max-width: 540px;
}

/* ===== CARDS (services) ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-card-gap); }
.card {
    background: var(--bg); border-radius: var(--radius); padding: var(--spacing-card-padding);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative; overflow: hidden;
}
.card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--turquoise), var(--orange)); transform: scaleX(0); transition: transform 0.3s;
    transform-origin: left;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(57,198,174,0.35); }
.card:hover::after { transform: scaleX(1); }
.card:focus-within { box-shadow: 0 0 0 3px rgba(57,198,174,0.25), var(--shadow-lg); border-color: var(--turquoise); }
a.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; cursor: pointer; }
a.card-link:hover h3, a.card-link:focus-visible h3 { color: var(--turquoise); }
a.card-link:hover .card-cta, a.card-link:focus-visible .card-cta { color: var(--turquoise); }
a.card-link:focus-visible { outline: none; }

.card h3 { font-size: var(--size-card-title); font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.card > p { color: var(--text-secondary); font-size: var(--size-card-body); line-height: 1.6; margin-bottom: 16px; position: relative; z-index: 1; }
.card-cta {
    margin-top: auto;
    font-size: var(--size-small);
    font-weight: 600;
    color: var(--orange);
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    padding: 4px 12px; background: var(--bg-alt); border-radius: var(--radius-tag);
    font-size: var(--size-tag); font-weight: var(--fw-medium); color: var(--text-secondary);
}

/* ===== SKILLS PILLS ===== */
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 50px;
    font-size: var(--size-nav); font-weight: 500;
    border: 1px solid var(--border); background: var(--bg);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    min-height: 40px;
}
.skill-pill:hover { border-color: var(--turquoise); background: var(--turquoise-pale); transform: translateY(-1px); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-expert { background: var(--turquoise); }
.dot-avance { background: var(--orange); }
.dot-inter { background: var(--dark); }

.skill-legend {
    display: flex; gap: 24px; margin-top: 24px;
    font-size: var(--size-small); color: var(--text-secondary);
}
.skill-legend span { display: flex; align-items: center; gap: 6px; }

/* Skill categories */
.skill-category { margin-bottom: 36px; }
.skill-category h3 {
    font-size: var(--size-body); font-weight: 700; margin-bottom: 14px;
    color: var(--dark);
}

/* ===== TIMELINE ===== */
.timeline { display: grid; gap: 0; max-width: 720px; }
.timeline-item {
    display: grid; grid-template-columns: 110px 1fr; gap: 28px;
    padding: 28px 0; border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}
.timeline-item:hover { padding-left: 8px; }
.timeline-item:last-child { border-bottom: none; }

.timeline-year {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 14px; background: var(--orange); color: white;
    border-radius: 8px; font-size: 0.78rem; font-weight: 700;
    height: fit-content; white-space: nowrap;
}
.timeline-content h3 { font-size: var(--size-body); font-weight: 700; margin-bottom: 2px; }
.timeline-content .org { color: var(--turquoise-dark); font-size: var(--size-nav); font-weight: 600; }
.timeline-content p { color: var(--text-secondary); font-size: var(--size-nav); margin-top: 6px; line-height: 1.6; }

/* ===== PORTFOLIO ===== */
.portfolio-placeholder {
    text-align: center; padding: 80px 32px;
    background: var(--bg-alt); border-radius: var(--radius);
    border: 2px dashed var(--border);
}
.portfolio-placeholder .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.portfolio-placeholder h3 { font-size: var(--size-card-title); margin-bottom: 8px; }
.portfolio-placeholder p { color: var(--text-secondary); font-size: var(--size-card-body); }

/* ===== CONTACT ===== */
.contact-section { background: var(--dark); color: white; }
.contact-section .section-label { color: var(--turquoise); }
.contact-section .section-label::before { background: var(--turquoise); }
.contact-section .section-title { color: white; }
.contact-section .section-desc { color: rgba(255,255,255,0.6); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-details { display: grid; gap: 16px; margin-top: 8px; }
.contact-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s;
}
.contact-item:hover { background: rgba(255,255,255,0.1); border-color: var(--orange); }
.contact-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(57,198,174,0.15); display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem;
    flex-shrink: 0;
}
.contact-item-text { font-size: var(--size-card-body); }
.contact-item-text .label {
    font-size: 0.78rem; color: rgba(255,255,255,0.4);
    display: block; margin-bottom: 2px;
}

.contact-form {
    background: white; border-radius: var(--radius); padding: 36px;
    box-shadow: var(--shadow-lg);
}
.contact-form h3 { color: var(--dark); font-size: var(--size-card-title); margin-bottom: 24px; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block; font-size: var(--size-small); font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: inherit;
    /* 16px min prevents iOS auto-zoom on focus */
    font-size: max(16px, var(--size-card-body));
    transition: all 0.2s; background: var(--bg-alt); color: var(--dark);
    min-height: 44px; /* touch target */
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(57,198,174,0.12); background: white;
}
.form-group input::placeholder, .form-group textarea::placeholder {
    color: #9ca3af; opacity: 1;
}
.form-group input:autofill, .form-group input:-webkit-autofill {
    -webkit-text-fill-color: var(--dark);
    -webkit-box-shadow: 0 0 0 30px var(--bg-alt) inset;
    box-shadow: 0 0 0 30px var(--bg-alt) inset;
}
.form-group textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.form-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23383838' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
[data-theme="dark"] .form-group select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e0e0e0' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-submit {
    width: 100%; padding: 14px; background: var(--dark); color: white;
    border: none; border-radius: var(--radius-sm); font-size: var(--size-body);
    font-weight: 700; cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.form-submit:hover { background: var(--orange); transform: translateY(-1px); }

/* ===== FORM FEEDBACK ===== */
.form-feedback {
    display: none; padding: 14px 18px; border-radius: var(--radius-sm);
    margin-bottom: 14px; font-size: var(--size-nav); line-height: 1.5;
    animation: feedbackSlideIn 0.3s ease;
}
.form-feedback.visible { display: flex; align-items: flex-start; gap: 10px; }
.form-feedback-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1.3; }
.form-feedback.feedback-success {
    background: rgba(57,198,174,0.12); color: var(--turquoise-dark);
    border: 1px solid rgba(57,198,174,0.25);
}
.form-feedback.feedback-error {
    background: rgba(255,163,62,0.12); color: #e08a2e;
    border: 1px solid rgba(255,163,62,0.25);
}
.form-feedback a { color: inherit; text-decoration: underline; }
@keyframes feedbackSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== CTA BAND ===== */
.cta-band {
    background: linear-gradient(135deg, var(--turquoise), var(--orange)); padding: 60px 0; text-align: center;
}
.cta-band h2 { color: white; font-size: var(--size-h2); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.01em; line-height: 1.2; }
.cta-band p { color: rgba(255,255,255,0.92); margin-bottom: 24px; font-size: var(--size-body); }

/* ===== FOOTER ===== */
/* Footer + contact-section use hardcoded #2d2d2d / #2a2a2a (not --dark token)
   because they must stay dark in BOTH light and dark themes — anchored
   dark surfaces that flipping --dark would break. Do not refactor to tokens. */
footer {
    background: #2d2d2d; color: rgba(255,255,255,0.7);
    padding: 36px 0; font-size: var(--size-footer);
    border-top: 3px solid var(--orange);
    line-height: 1.6;
}
footer p { margin-bottom: 4px; }
footer p:last-child { margin-bottom: 0; }
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
footer a { color: var(--orange); transition: color 0.2s; }
footer a:hover { color: white; }

/* ===== PULSE ANIMATION (availability badge) ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
/* prefers-reduced-motion overrides: see consolidated block at end of file */

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay { transition-delay: 0.15s; }
.fade-in-delay-2 { transition-delay: 0.3s; }

/* ===== STAT CARDS (home) ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.stat-card {
    background: var(--bg-alt); border-radius: var(--radius);
    padding: 28px 24px; border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex; flex-direction: column; justify-content: center;
}
.stat-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--dark); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-num .unit { font-size: 1.2rem; color: var(--turquoise); }
.stat-label { font-size: var(--size-small); color: var(--text-secondary); margin-top: 6px; font-weight: 500; }
.stat-card.accent { background: var(--dark); border-color: var(--dark); }
.stat-card.accent .stat-num { color: var(--turquoise); }
.stat-card.accent .stat-label { color: rgba(255,255,255,0.7); }

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --dark: #e8e8e8;
    --turquoise: #4dd4bc;
    --turquoise-dark: #3dc4ac;
    --turquoise-pale: rgba(57, 198, 174, 0.12);
    --orange: #ffb35e;
    --orange-light: rgba(255, 163, 62, 0.12);
    --text: #e0e0e0;
    --text-secondary: #9ca3af;
    --border: #374151;
    --bg: #383838;
    --bg-alt: #2e2e2e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow: 0 4px 16px rgba(0,0,0,0.2);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.3);
    --bg-card: #2e2e2e;
}
[data-theme="dark"] nav {
    background: rgba(56, 56, 56, 0.92);
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .nav-toggle span { background: var(--text); }
[data-theme="dark"] .card { background: var(--bg); border-color: var(--border); }
[data-theme="dark"] .stat-card { background: var(--bg-alt); border-color: var(--border); }
[data-theme="dark"] .stat-card .stat-num { color: #e8e8e8; }
[data-theme="dark"] .stat-card .stat-num .unit { color: var(--turquoise); }
[data-theme="dark"] .stat-card .stat-label { color: #9ca3af; }
[data-theme="dark"] .stat-card.accent { background: var(--turquoise); border-color: var(--turquoise); }
[data-theme="dark"] .stat-card.accent .stat-num { color: #383838; }
[data-theme="dark"] .stat-card.accent .stat-num .unit { color: #383838; }
[data-theme="dark"] .stat-card.accent .stat-label { color: rgba(56,56,56,0.7); }
[data-theme="dark"] .contact-form { background: var(--bg-alt); }
[data-theme="dark"] .contact-form h3 { color: var(--text); }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: var(--bg); border-color: var(--border); color: var(--text);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus { background: var(--bg); }
[data-theme="dark"] .portfolio-placeholder { background: var(--bg-alt); border-color: var(--border); }
/* Expertise band - dark theme */
[data-theme="dark"] .eb-bg { fill: #383838; }
[data-theme="dark"] .eb-grid { stroke: rgba(57,198,174,0.06); }
[data-theme="dark"] .eb-road { stroke: rgba(255,255,255,0.07); }
[data-theme="dark"] .eb-road-secondary { stroke: rgba(255,255,255,0.05); }
[data-theme="dark"] .eb-network { stroke: rgba(57,198,174,0.2); fill: rgba(57,198,174,0.04); }
[data-theme="dark"] .eb-node { fill: rgba(57,198,174,0.3); }
[data-theme="dark"] .eb-branch { stroke: rgba(57,198,174,0.15); }
[data-theme="dark"] .eb-poi { fill: rgba(255,163,62,0.35); }
[data-theme="dark"] .eb-glow-stop { stop-color: rgba(57,198,174,0.1); }
[data-theme="dark"] .eb-label { color: var(--turquoise); }
[data-theme="dark"] .eb-title { color: white; }
[data-theme="dark"] .eb-text { color: rgba(255,255,255,0.85); }
[data-theme="dark"] .eb-cta { background: var(--turquoise); color: white; }
[data-theme="dark"] footer { background: #2a2a2a; }
[data-theme="dark"] .page-hero { background: var(--bg-alt); }
[data-theme="dark"] .page-hero h1 { color: var(--text); }
[data-theme="dark"] .skill-pill { background: var(--bg); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .nav-links { background: var(--bg); }
[data-theme="dark"] .nav-links a { color: #e8e8e8; }
[data-theme="dark"] .nav-links a:hover { color: var(--turquoise); background: rgba(57,198,174,0.1); }
[data-theme="dark"] .nav-links a.active { background: var(--turquoise); color: #383838; }
[data-theme="dark"] .nav-links li { border-bottom-color: var(--border); }

/* Dark mode — contact section (uses hardcoded dark bg, not --dark which flips) */
[data-theme="dark"] .contact-section { background: #2a2a2a; }
[data-theme="dark"] .contact-section .section-title { color: #e8e8e8; }
[data-theme="dark"] .contact-section .section-desc { color: rgba(255,255,255,0.6); }
[data-theme="dark"] .contact-item { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .contact-item:hover { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .contact-item-text { color: #e0e0e0; }
[data-theme="dark"] .contact-item-text .label { color: rgba(255,255,255,0.4); }

/* Dark mode — buttons that use --dark as background */
[data-theme="dark"] .btn-primary { background: var(--turquoise); color: #383838; }
[data-theme="dark"] .btn-primary:hover { background: var(--orange); color: #383838; }
[data-theme="dark"] .btn-outline { border-color: var(--border); color: var(--text); }
[data-theme="dark"] .btn-outline:hover { border-color: var(--orange); color: var(--orange); }
[data-theme="dark"] .btn-white { background: var(--bg); color: var(--text); }

/* Dark mode — nav CTA */
[data-theme="dark"] .nav-cta { background: var(--turquoise) !important; color: #383838 !important; }
[data-theme="dark"] .nav-cta:hover { background: var(--orange) !important; color: #383838 !important; }

/* Dark mode — form submit */
[data-theme="dark"] .form-submit { background: var(--turquoise); color: #383838; }
[data-theme="dark"] .form-submit:hover { background: var(--orange); color: #383838; }

/* Dark mode — form labels */
[data-theme="dark"] .form-group label { color: var(--text-secondary); }

/* Dark mode — section title fix (--dark flips to light) */
[data-theme="dark"] .section-title { color: var(--text); }

/* Dark mode — timeline & skill category headings */
[data-theme="dark"] .skill-category h3 { color: var(--text); }
[data-theme="dark"] .timeline-content h3 { color: var(--text); }

/* Dark mode — dot intermediate (was using --dark) */
[data-theme="dark"] .dot-inter { background: #9ca3af; }

/* Dark mode — tag pills */
[data-theme="dark"] .tag { background: var(--bg); color: var(--text-secondary); }

/* Dark mode — project thumb gradient overlay */
[data-theme="dark"] .project-thumb::after { background: linear-gradient(transparent, var(--bg)); }

/* Dark mode — testimonial author */
[data-theme="dark"] .testimonial-author { color: var(--text); }

/* Dark mode — FAQ question */
[data-theme="dark"] .faq-question { color: var(--text); }

/* Dark mode — hero heading (uses inline style color:var(--dark)) */
[data-theme="dark"] .hero h1,
[data-theme="dark"] [style*="color:var(--dark)"] { color: var(--text) !important; }

/* Dark mode — CTA band */
[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #2fb09a, #e08a2e); }

/* Dark mode toggle */
.theme-toggle {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 36px;
    box-sizing: border-box;
    color: var(--text-secondary);
}
.theme-toggle:hover { border-color: var(--orange); }
.theme-toggle:active { background: var(--bg-alt); }

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: var(--size-small);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    min-width: 40px;
    min-height: 36px;
    box-sizing: border-box;
}
.lang-toggle:hover { border-color: var(--orange); color: var(--orange); }
.lang-toggle:active { background: var(--bg-alt); }

/* Nav extras container */
.nav-extras {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== EXPERTISE BAND (light mode = default) ===== */
.eb-bg { fill: #eaf9f9; }
.eb-grid { stroke: rgba(57,198,174,0.12); }
.eb-road { stroke: rgba(57,198,174,0.15); }
.eb-road-secondary { stroke: rgba(57,198,174,0.1); }
.eb-network { stroke: rgba(57,198,174,0.4); fill: rgba(57,198,174,0.06); }
.eb-node { fill: rgba(57,198,174,0.55); }
.eb-branch { stroke: rgba(57,198,174,0.3); }
.eb-poi { fill: rgba(255,163,62,0.6); }
.eb-glow-stop { stop-color: rgba(57,198,174,0.15); }
.eb-label { color: var(--turquoise-dark); }
.eb-title { color: var(--dark); }
.eb-text { color: var(--text-secondary); }
.eb-cta { background: var(--dark); color: white; }
.eb-cta:hover { background: var(--turquoise); }

/* ===== SERVICE CARD SVG BACKGROUNDS ===== */
.card-svg-bg {
    position: absolute; inset: 0;
    z-index: 0; pointer-events: none; opacity: 1;
    transition: opacity 0.3s;
}
.card-svg-bg svg { width: 100%; height: 100%; }
/* Light mode — vivid & luminous */
.cb-fill { fill: transparent; }
.cb-grid { stroke: rgba(57,198,174,0.18); }
.cb-line { stroke: rgba(57,198,174,0.27); }
.cb-line-dash { stroke: rgba(57,198,174,0.23); stroke-dasharray: 4,4; }
.cb-node { fill: rgba(57,198,174,0.43); }
.cb-node-accent { fill: rgba(255,163,62,0.47); }
.cb-shape { stroke: rgba(57,198,174,0.25); fill: rgba(57,198,174,0.07); }
.cb-glow-stop { stop-color: rgba(57,198,174,0.15); }
/* Dark overrides */
[data-theme="dark"] .cb-fill { fill: transparent; }
[data-theme="dark"] .cb-grid { stroke: rgba(57,198,174,0.12); }
[data-theme="dark"] .cb-line { stroke: rgba(57,198,174,0.22); }
[data-theme="dark"] .cb-line-dash { stroke: rgba(57,198,174,0.18); }
[data-theme="dark"] .cb-node { fill: rgba(57,198,174,0.35); }
[data-theme="dark"] .cb-node-accent { fill: rgba(255,163,62,0.38); }
[data-theme="dark"] .cb-shape { stroke: rgba(57,198,174,0.20); fill: rgba(57,198,174,0.08); }
[data-theme="dark"] .cb-glow-stop { stop-color: rgba(57,198,174,0.12); }

/* ===== TESTIMONIALS ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.testimonial-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 16px; left: 24px;
    font-size: 3rem;
    color: var(--orange);
    opacity: 0.4;
    line-height: 1;
    font-family: Georgia, serif;
}
.testimonial-text {
    color: var(--text-secondary);
    font-size: var(--size-card-body);
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.testimonial-author { font-weight: 700; font-size: var(--size-nav); color: var(--dark); }
.testimonial-role { font-size: var(--size-tag); color: var(--text-secondary); }

/* ===== PROJECT CARDS ===== */
.project-card {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--orange); }
.project-thumb {
    height: 200px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}
.project-thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--bg));
}
.project-body { padding: 24px; }
.project-body h3 { font-size: var(--size-body); font-weight: 700; margin-bottom: 8px; }
.project-body p { color: var(--text-secondary); font-size: var(--size-nav); line-height: 1.6; margin-bottom: 12px; }

/* ===== FAQ ACCORDION ===== */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: var(--size-body);
    color: var(--dark);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    padding: 4px 0;
    transition: color 0.2s;
    min-height: 44px;
    line-height: 1.4;
}
.faq-question:hover { color: var(--orange); }
.faq-question:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 4px; border-radius: 4px; }
.faq-question .faq-icon {
    font-size: var(--size-h3);
    transition: transform 0.3s;
    color: var(--orange);
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-secondary);
    font-size: var(--size-card-body);
    line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; padding-top: 12px; }

/* ===== SOCIAL LINKS (Footer) ===== */
.footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    transition: all 0.2s;
}
.footer-social a:hover { background: var(--orange); }
.footer-social svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.6); transition: fill 0.2s; }
.footer-social a:hover svg { fill: white; }
.footer-social a.admin-link { opacity: 0.3; transition: opacity 0.2s; }
.footer-social a.admin-link:hover, .footer-social a.admin-link:focus { opacity: 0.75; }

/* ===== 404 PAGE ===== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 80px;
}
.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--turquoise);
    line-height: 1;
    margin-bottom: 16px;
}

/* ===== SERVICE DETAIL (services pages FR + EN) ===== */
.service-section { margin-bottom: 64px; }
.service-section:last-child { margin-bottom: 0; }

.service-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.service-header h2 { font-size: var(--size-h2); font-weight: var(--fw-bold); }

.service-desc {
    color: var(--text-secondary); font-size: var(--size-body); line-height: 1.8;
    max-width: 720px; margin-bottom: 20px;
}

.service-clients {
    font-size: var(--size-nav); color: var(--turquoise-dark); font-weight: 600;
}

.service-divider {
    border: none; border-top: 1px solid var(--border); margin-bottom: 64px;
}

/* Service detail cards (EN variant) */
.service-detail {
    margin-bottom: 40px; padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.service-detail:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.service-detail-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 16px; background: var(--turquoise-pale);
}
.service-detail h3 { font-size: var(--size-h3); font-weight: var(--fw-bold); margin-bottom: 10px; }
.service-detail > p {
    color: var(--text-secondary); font-size: var(--size-body); line-height: 1.7;
    max-width: 680px; margin-bottom: 16px;
}
.service-detail ul {
    list-style: none; padding: 0; margin: 0 0 16px 0;
}
.service-detail ul li {
    position: relative; padding-left: 20px;
    color: var(--text-secondary); font-size: var(--size-card-body);
    line-height: 1.8;
}
.service-detail ul li::before {
    content: '→'; position: absolute; left: 0;
    color: var(--turquoise); font-weight: 700;
}

/* Forfait / Pricing cards (shared FR + EN) */
.forfait-card {
    margin-top: 24px; padding: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px;
}
.forfait-card h3,
.forfait-card h4 {
    font-size: var(--size-body); font-weight: 700; margin-bottom: 12px;
}
.forfait-card h4 { font-size: var(--size-card-body); margin-bottom: 10px; }

.forfait-grid {
    display: grid; gap: 10px; font-size: 0.9rem;
}

.forfait-item {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.forfait-item:last-child { border-bottom: none; }

.forfait-price { font-weight: 700; color: var(--orange); }

.forfait-cta {
    display: inline-block; margin-top: 16px; padding: 10px 24px;
    background: var(--orange); color: #fff; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: var(--size-nav);
    transition: all 0.25s;
}
.forfait-cta:hover { background: var(--dark); transform: translateY(-2px); box-shadow: var(--shadow); }
[data-theme="dark"] .forfait-cta:hover { background: var(--turquoise); color: #383838; }

/* Dark mode — service detail */
[data-theme="dark"] .service-detail { border-bottom-color: var(--border); }
[data-theme="dark"] .service-header h2 { color: var(--text); }
[data-theme="dark"] .forfait-card { background: var(--bg-card); border-color: var(--border); }

/* ============================================
   RESPONSIVE — TABLET (max 900px)
   ============================================ */
@media (max-width: 900px) {
    .section-padding { padding: 72px 0; }
    .section-title { font-size: calc(var(--size-section-title) * 0.82); }
    .page-hero h1 { font-size: calc(var(--size-h1) * 0.71); }

    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero h1 { font-size: calc(var(--size-hero-title) * 0.75); }

    .card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
    .card-grid .card { padding: 22px; }
    .card-grid .card h3 { font-size: calc(var(--size-card-title) * 0.95); }
    .card-grid .card p { font-size: var(--size-card-body); }
    .card-grid.blog-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
    .testimonial-grid { grid-template-columns: 1fr; }

    /* Services tablet */
    .service-section { margin-bottom: 48px; }
    .service-divider { margin-bottom: 48px; }

    /* Timeline tablet — stack year + content */
    .timeline-item { grid-template-columns: 1fr; gap: 8px; }
    .timeline-year { width: fit-content; }

    /* Stat grid — 2 cols at tablet, will go 1 col at small mobile */
    .stat-grid { gap: 12px; }

    /* FAQ answer max-height for longer answers on narrow screens */
    .faq-item.open .faq-answer { max-height: 800px; }
}

/* ============================================
   RESPONSIVE — MOBILE (max 640px)
   ============================================ */
@media (max-width: 640px) {
    .nav-logo-img, .nav-logo-img-dark { height: 52px; }
    .container { padding: 0 16px; }
    .section-padding { padding: 56px 0; }
    .section-title { font-size: calc(var(--size-section-title) * 0.73); }
    .section-desc { font-size: var(--size-body); margin-bottom: 32px; }

    /* Kill backdrop-filter on mobile — it creates a containing block
       that breaks position:fixed on child elements (.nav-links) */
    nav,
    nav.scrolled {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* === Z-INDEX FIX ===
       <nav> has z-index:1000 which creates a stacking context.
       All children (nav-links, nav-toggle) are TRAPPED inside it.
       The backdrop is on <body> at z-index:1001 → ABOVE the entire nav.
       Fix: raise nav above backdrop on mobile so children are clickable. */
    nav {
        z-index: 1100 !important;
    }

    /* Backdrop: between page content and nav panel */
    .nav-backdrop.active {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1050;
    }

    /* ===== Nav mobile — compact slide-in panel from right ===== */
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 220px;
        max-width: 65vw;
        background: var(--bg);
        padding: 68px 0 16px;
        gap: 0;
        z-index: 1102;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -4px 0 24px rgba(0,0,0,0.12);
        list-style: none;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links li {
        padding: 0;
        border-bottom: none;
    }
    .nav-links a {
        display: block;
        padding: 11px 20px;
        font-size: var(--size-nav);
        font-weight: 600;
        color: var(--dark);
        border-left: 3px solid transparent;
        transition: all 0.15s;
    }
    .nav-links a:hover {
        background: var(--turquoise-pale);
        color: var(--turquoise-dark);
        border-left-color: var(--turquoise);
    }
    .nav-links a.active {
        background: var(--turquoise);
        color: white;
        border-left-color: var(--turquoise-dark);
        border-radius: 0 8px 8px 0;
        margin-right: 12px;
        box-shadow: 0 2px 8px rgba(57,198,174,0.3);
    }
    .nav-links a.nav-cta {
        margin: 12px 16px 0;
        text-align: center;
        padding: 10px 16px;
        border-radius: var(--radius-sm);
        background: var(--dark);
        color: white !important;
        border-left: none;
        font-size: var(--size-cta);
    }
    .nav-links a.nav-cta:hover {
        background: var(--orange) !important;
    }

    .nav-toggle { display: block; z-index: 1103; }

    /* Hero mobile — override inline grid */
    .hero { padding: 120px 0 56px; }
    .hero-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .hero h1, .hero h1[style] { font-size: calc(var(--size-hero-title) * 0.625) !important; }
    .hero-desc { font-size: var(--size-hero-subtitle); }
    .hero-map-block { gap: 12px !important; }
    .hero-map-illustration { width: 80px !important; height: 80px !important; }
    .hero-map-illustration svg { width: 80px !important; height: 80px !important; }
    .hero-workflow { gap: 4px !important; }
    .hero-workflow .workflow-step div:first-child { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
    .hero-workflow .workflow-step div:first-child svg { width: 18px; height: 18px; }
    .hero-workflow .workflow-step div:nth-child(2) { font-size: 0.75rem !important; }
    .hero-workflow .workflow-step div:nth-child(3) { font-size: 0.65rem !important; }
    .hero-buttons, div[style*="hero-buttons"], .hero .hero-buttons[style] {
        flex-direction: column !important;
    }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .stat-grid { gap: 12px; grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 20px 18px; }
    .stat-num { font-size: 2rem; }

    /* Hide decorative circles on mobile */
    .hero > div[style*="position:absolute"],
    section > div[style*="position:absolute"][style*="border-radius:50%"] {
        display: none !important;
    }

    /* Hide distortion-prone wide SVG bg on narrow mobile */
    .expertise-bg { opacity: 0.4; }
    .expertise-band { background: var(--bg-alt); }

    /* FTTH/CTA band mobile — override inline flex */
    .ftth-band-inner {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center;
    }
    .ftth-band-inner h2[style] { font-size: 1.3rem !important; }

    /* Page hero mobile */
    .page-hero { padding: 110px 0 40px; }
    .page-hero h1 { font-size: calc(var(--size-h1) * 0.64); }

    /* Cards mobile */
    .card { padding: 24px; }

    /* Timeline mobile — already handled at 900px, extra padding fix */
    .timeline-item { padding: 20px 0; }

    /* Skills mobile */
    .skill-pill { padding: 8px 14px; font-size: 0.82rem; }
    .skill-legend { flex-wrap: wrap; gap: 14px; }
    .skill-category { margin-bottom: 24px; }

    /* Contact mobile */
    .contact-grid { gap: 24px; }
    .contact-form { padding: 24px; }
    .contact-item { padding: 12px 16px; }
    .contact-form h3 { font-size: 1.2rem; margin-bottom: 18px; }
    /* iOS no-zoom safety: force >=16px on form fields */
    .form-group input, .form-group textarea, .form-group select { font-size: 16px; }

    /* CTA band mobile */
    .cta-band { padding: 40px 0; }
    .cta-band h2 { font-size: calc(var(--size-h2) * 0.7); }
    .cta-band p { font-size: var(--size-body); }

    /* Project cards mobile */
    .project-thumb { height: 150px; }

    /* Portfolio grid mobile */
    .portfolio-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* Nav extras: hide on mobile — moved into slide panel via JS */
    .nav-extras { display: none; }
    /* Show nav extras when cloned inside the mobile menu */
    .nav-links .nav-extras-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 16px 20px;
        border-top: 1px solid var(--border);
        margin-top: auto;
    }
    .nav-links .nav-extras-mobile .lang-toggle,
    .nav-links .nav-extras-mobile .theme-toggle {
        width: 48px;
        height: 42px;
        padding: 0;
        border-radius: 8px;
        border: 1.5px solid var(--border);
        font-size: 0.88rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    .nav-links .nav-extras-mobile .theme-toggle {
        font-size: 1.15rem;
    }

    /* Testimonials mobile */
    .testimonial-card { padding: 24px; }
    .testimonial-card::before { font-size: 2rem; top: 12px; left: 18px; }
    .testimonial-text { font-size: var(--size-nav); }

    /* FAQ mobile */
    .faq-question { font-size: var(--size-card-body); }

    /* Blog cards mobile */
    .card-grid.blog-grid,
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* Services mobile */
    .service-section { margin-bottom: 40px; }
    .service-divider { margin-bottom: 40px; }
    .service-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .service-header h2 { font-size: calc(var(--size-h2) * 0.625); }
    .service-desc { font-size: var(--size-card-body); }
    .forfait-card { padding: 16px; }
    .forfait-item { flex-direction: column; gap: 4px; }
    .forfait-cta { width: 100%; text-align: center; padding: 12px 20px; }

    /* Footer mobile */
    .footer-inner { flex-direction: column; text-align: center; gap: 12px; }
    .footer-social { justify-content: center; }

    /* Inline style font overrides — target elements with inline font-size that don't use variables */
    [style*="font-size:1.6rem"] { font-size: 1.2rem !important; }
    [style*="font-size:1.5rem"] { font-size: 1.1rem !important; }
    [style*="font-size:1.15rem"] { font-size: 1rem !important; }
    [style*="font-size:1.05rem"] { font-size: 0.95rem !important; }

    /* Inline padding/gap overrides for tight spaces */
    [style*="padding:100px"] { padding: 56px 0 !important; }
    [style*="padding:140px"] { padding: 80px 0 56px !important; }
    [style*="font-size:2.4rem"] { font-size: 1.6rem !important; }
    [style*="gap:64px"] { gap: 24px !important; }
    [style*="gap:32px"] { gap: 16px !important; }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================ */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px 12px; }
    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.75rem; }
}

/* ============================================
   RESPONSIVE — VERY SMALL MOBILE (max 380px)
   ============================================ */
@media (max-width: 380px) {
    .hero h1 { font-size: calc(var(--size-hero-title) * 0.53) !important; }
    .btn { padding: 12px 20px; font-size: var(--size-nav); }
    .section-title { font-size: calc(var(--size-section-title) * 0.59); }
    .page-hero h1 { font-size: calc(var(--size-h1) * 0.54); }
    .nav-links a { font-size: 1rem; padding: 14px 0; }
    .contact-form { padding: 16px; }
    .card { padding: 20px; }
    .testimonial-card { padding: 20px; }
    .card-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ACCESSIBILITY — Reduced motion (consolidated)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1 !important; transform: none !important; }
    .fade-in { transition-delay: 0s !important; }
    .draw-line { stroke-dashoffset: 0 !important; animation: none !important; }
    [style*="animation:pulse"], [style*="animation: pulse"] {
        animation: none !important;
        opacity: 1 !important;
    }
    /* Stop SVG SMIL animations for accessibility */
    svg animate, svg animateTransform { display: none; }
}

/* ============================================
   ACCESSIBILITY — Keyboard focus
   ============================================ */
:focus-visible {
    outline: 2px solid var(--turquoise);
    outline-offset: 2px;
}
.form-group input:focus-visible, .form-group textarea:focus-visible, .form-group select:focus-visible {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(57,198,174,0.2);
}
a:focus-visible { border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }

/* ============================================
   BRANDING — Text selection
   ============================================ */
::selection { background: rgba(57,198,174,0.2); color: var(--dark); }
[data-theme="dark"] ::selection { background: rgba(57,198,174,0.3); color: #f1f5f9; }

/* ============================================
   PRINT — Clean output
   ============================================ */
@media print {
    nav, .nav-toggle, .sidebar-backdrop, .cta-band, .theme-toggle,
    footer .footer-social, .hero-buttons, .btn, .lang-toggle { display: none !important; }
    body { color: #000; background: #fff; font-size: 12pt; line-height: 1.5; }
    .container { max-width: 100%; padding: 0; }
    .section-padding { padding: 24pt 0; }
    .fade-in { opacity: 1 !important; transform: none !important; }
    a { color: #000; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
    a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
    .card { break-inside: avoid; border: 1px solid #ccc; }
    h1, h2, h3 { break-after: avoid; }
}

/* ============================================
   PRODUITS — Page produits + bandeau home
   100% thémable (variables existantes). Light + dark.
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-card-gap);
    align-items: start;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(57,198,174,0.35); }
.product-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.product-card-head h2 { font-size: 1.45rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.2; }
.product-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.product-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
    background: var(--bg-alt); color: var(--text); border: 1px solid var(--border);
    white-space: nowrap;
}
.product-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); flex-shrink: 0; }
.product-badge.is-live::before { background: var(--turquoise); }
.product-badge.is-soon::before { background: var(--orange); }
.product-capture {
    aspect-ratio: 16 / 10;
    width: 100%;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem; font-weight: 500;
    text-align: center; padding: 12px;
}
.product-body { color: var(--text-secondary); font-size: 0.98rem; line-height: 1.7; margin: 0; flex: 1; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Disabled "App Store soon" button — non interactive, clearly muted */
.btn-store-soon {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; font-family: inherit;
    background: transparent; color: var(--text-secondary);
    border: 1.5px solid var(--border);
    opacity: 0.6; cursor: not-allowed;
}
.btn-store-soon:hover { transform: none; border-color: var(--border); color: var(--text-secondary); }
.btn-store-soon svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Crédibilité band */
.product-cred {
    background: var(--turquoise-pale);
    border: 1px solid rgba(57,198,174,0.25);
    border-radius: var(--radius);
    padding: 36px 32px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.product-cred p { font-size: 1.1rem; line-height: 1.65; color: var(--text); max-width: 720px; margin: 0; font-weight: 500; }
/* Bandeau home discret (après services) */
.products-home {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}
.products-home-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; padding: 36px 0;
}
.products-home-text { display: flex; align-items: center; gap: 14px; }
.products-home-text .ph-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--radius-sm);
    background: var(--turquoise-pale); display: flex; align-items: center; justify-content: center;
}
.products-home-text .ph-icon svg { width: 22px; height: 22px; }
.products-home-text h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.3; }

/* Dark mode tweaks (surfaces that collapse against card bg) */
[data-theme="dark"] .product-capture { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .product-cred { background: rgba(57,198,174,0.08); border-color: rgba(57,198,174,0.2); }
[data-theme="dark"] .product-badge { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .products-home { background: var(--bg-alt); }

/* Responsive — 1 colonne mobile */
@media (max-width: 768px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-card { padding: 22px; }
    .products-home-inner { flex-direction: column; align-items: flex-start; padding: 28px 0; }
}

/* SVG line-draw (hero network) */
.draw-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: drawLine 1.6s ease forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ===== MÉTHODE — scroll-stacking ===== */
.method-stack-section { padding: 80px 0; }
.method-stack-title { text-align: center; font-size: var(--size-h2); font-weight: 800; color: var(--dark); margin-bottom: 40px; letter-spacing: -0.01em; }
.method-stack { display: flex; flex-direction: column; gap: 24px; }
.method-card {
    position: sticky;
    top: calc(90px + var(--i) * 14px);   /* léger décalage : les cartes précédentes restent visibles en haut */
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow);
    min-height: 220px;
}
.method-card .method-step { display: inline-block; font-size: 0.9rem; font-weight: 800; color: var(--turquoise); letter-spacing: 0.08em; margin-bottom: 8px; }
.method-card h3 { font-size: 1.4rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.method-card p { color: var(--text-secondary); line-height: 1.6; max-width: 600px; }
[data-theme="dark"] .method-card { background: var(--bg-alt); border-color: var(--border); }

@media (max-width: 768px) {
    .method-card { position: static; min-height: auto; top: auto; }  /* pas de sticky sur mobile : lecture simple */
}

