:root {
    --dark: #2D2D2D;
    --beige: #D7C9AE;
    --cream: #E9E0D2;
    --brown: #A68763;
    --glass-bg: rgba(233, 224, 210, 0.05);
    --glass-border: rgba(215, 201, 174, 0.2);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    font-family: 'Outfit', 'Tajawal', sans-serif;
    background-color: var(--dark);
    color: var(--cream);
}

section {
    scroll-margin-top: 90px;
}

html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

body {
    overflow-x: hidden;
    position: relative;
}

/* ═══ TEXTURE TACTILE : GRAIN DE PAPIER D'ART (#10 & #13) ═══ */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)' opacity='0.038'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 99;
}

/* Motif d'arrière-plan (Pattern) */
.pattern-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('pattern.svg');
    background-repeat: repeat;
    background-size: 400px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0); /* Harware accel for iOS Safari */
    -webkit-transform: translateZ(0);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    color: var(--beige);
}

p {
    line-height: 1.8;
    color: var(--cream);
    opacity: 0.85;
}

/* Shared Components & Layout */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 76px;
    height: 5px;
    background-image: radial-gradient(circle, var(--brown) 32%, transparent 35%);
    background-size: 8px 5px;
    background-repeat: repeat-x;
    border-radius: 2px;
}
html[lang="ar"] .section-title::after {
    left: auto;
    right: 0;
}

.text-center {
    text-align: center;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}
html[lang="ar"] .text-center .section-title::after {
    right: 50%;
    transform: translateX(50%);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.primary-btn {
    background: linear-gradient(135deg, #b89872 0%, var(--brown) 100%);
    color: #1a1816;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.32),
        inset 0 -1px 1px rgba(0, 0, 0, 0.35),
        0 6px 18px rgba(166, 135, 99, 0.25);
    letter-spacing: 0.5px;
    position: relative;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #e4d8c4 0%, var(--beige) 100%);
    transform: translateY(-3px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.45),
        inset 0 -1px 1px rgba(0, 0, 0, 0.25),
        0 10px 26px rgba(215, 201, 174, 0.32);
}

/* Glassmorphism & Craft Letterpress Bevel */
.glass-card {
    background: linear-gradient(155deg, rgba(233, 224, 210, 0.055) 0%, rgba(20, 18, 14, 0.45) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(215, 201, 174, 0.16);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.45),
        0 12px 36px -6px rgba(0, 0, 0, 0.42);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(255, 255, 255, 0.05), transparent 40%);
    z-index: -1;
    transition: opacity 0.5s;
    opacity: 0;
    pointer-events: none;
}
.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(215, 201, 174, 0.42);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5),
        0 20px 45px -10px rgba(0, 0, 0, 0.55),
        0 0 30px rgba(166, 135, 99, 0.15);
}

/* ═══ OPTION A : HEADER STUDIO & AGENCE (Full-Width) ═══ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(215, 201, 174, 0.15);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

nav.scrolled {
    padding: 10px 0;
    background: rgba(22, 22, 22, 0.95);
    border-bottom-color: rgba(215, 201, 174, 0.25);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Bloc Gauche : Marque + Statut */
.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 0%;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(166, 135, 99, 0.35));
    transition: transform 0.3s ease;
}

.nav-logo-link:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-logo-text {
    height: 18px;
    width: auto;
    filter: drop-shadow(0 0 6px rgba(166, 135, 99, 0.35));
    transition: transform 0.3s ease, filter 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.nav-logo-link:hover .nav-logo-text {
    transform: scale(1.04);
    filter: drop-shadow(0 0 10px rgba(215, 201, 174, 0.5));
}

.mobile-cta-item {
    display: none;
}

/* Badge Disponibilité */
.nav-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 20px;
    font-size: 0.72rem;
    color: #4ade80;
    font-weight: 600;
    letter-spacing: 0.4px;
    user-select: none;
}

.status-pulse {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

/* Bloc Centre : Liens */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brown);
    transition: width 0.3s ease;
}

html[lang="ar"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--beige);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Bloc Droit : Actions */
.nav-right-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 1 1 0%;
}

/* Lang Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
}

.lang-switcher button {
    background: rgba(255, 255, 255, 0.04);
    color: var(--cream);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.lang-switcher button:hover, .lang-switcher button.active {
    background: var(--brown);
    color: var(--dark);
    border-color: var(--brown);
}

/* Bouton Contact CTA Option A */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(166, 135, 99, 0.25), rgba(215, 201, 174, 0.12));
    border: 1px solid rgba(215, 201, 174, 0.45);
    border-radius: 25px;
    color: var(--beige);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25), 0 0 10px rgba(166, 135, 99, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-cta-btn .cta-sparkle {
    color: var(--beige);
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.nav-cta-btn:hover {
    background: var(--brown);
    color: var(--dark);
    border-color: var(--brown);
    box-shadow: 0 5px 20px rgba(166, 135, 99, 0.4);
    transform: translateY(-2px);
}

.nav-cta-btn:hover .cta-sparkle {
    transform: rotate(45deg) scale(1.15);
    color: var(--dark);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--beige);
    transition: 0.3s all ease;
    border-radius: 3px;
}

/* ═══ HERO SECTION ═══ */
/* ═══ HERO SECTION ═══ */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 100px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* ── Bloc Logo de Marque Homogène & Agrandie ── */
.hero-brand-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 34px;
}

/* Aura lumineuse dorée noble et tactile */
.hero-brand-aura {
    position: absolute;
    width: 380px;
    height: 260px;
    background: radial-gradient(ellipse at center, rgba(166, 135, 99, 0.28) 0%, rgba(215, 201, 174, 0.08) 45%, transparent 70%);
    filter: blur(28px);
    pointer-events: none;
    border-radius: 50%;
    z-index: 0;
}

/* Emblème agrandi de façon homogène */
.hero-brand-emblem {
    width: 295px;
    height: auto;
    max-height: 195px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 12px 28px rgba(166, 135, 99, 0.45));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.hero-brand-block:hover .hero-brand-emblem {
    transform: translateY(-2px);
    filter: drop-shadow(0 14px 34px rgba(215, 201, 174, 0.65)) drop-shadow(0 0 16px rgba(166, 135, 99, 0.5));
}

/* Texte IMAGIN'ART en dessous de l'icône */
.hero-brand-text {
    height: 46px;
    width: auto;
    margin-top: 18px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 10px rgba(166, 135, 99, 0.4));
    transition: filter 0.3s ease;
}

.hero-brand-block:hover .hero-brand-text {
    filter: drop-shadow(0 2px 14px rgba(215, 201, 174, 0.55));
}

/* ── Nom Agrandi au Milieu ── */
.hero-center-name {
    font-size: clamp(2.5rem, 5.8vw, 4.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: 2px;
    display: inline-block;
}

/* ── Tag Line Sous le Nom ── */
.hero-tag {
    font-size: clamp(0.72rem, 1.3vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--brown);
    margin-bottom: 24px;
    opacity: 0.92;
}

.hero-firstname {
    color: var(--cream);
    background: linear-gradient(135deg, var(--cream) 0%, var(--beige) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lastname {
    color: var(--beige);
    background: linear-gradient(135deg, var(--beige) 0%, var(--brown) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Séparateur Doré Halftone d'imprimerie (#4) */
.hero-divider {
    width: 110px;
    height: 5px;
    background-image: radial-gradient(circle, var(--brown) 32%, transparent 35%);
    background-size: 9px 5px;
    background-repeat: repeat-x;
    background-position: center;
    margin: 0 auto 28px;
    opacity: 0.9;
}

/* ── Bouton Après le Nom ── */
.hero-cta-box {
    margin-bottom: 34px;
}

.hero-main-btn {
    padding: 16px 42px;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 20px rgba(166, 135, 99, 0.35);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-main-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(215, 201, 174, 0.45);
}

/* ── Slide-up ── */
.hero-typewriter-p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin-bottom: 36px;
    color: var(--cream);
    font-weight: 400;
    min-height: 1.6em;
    opacity: 0.92;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
}

.typewriter-prefix {
    display: inline-block;
    opacity: 0.75;
    margin-right: 6px;
}

/* ── Chips Stats ── */
.hero-chips {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 34px;
}

.hero-chip {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.chip-num {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--brown);
}

.chip-label {
    font-size: 0.76rem;
    color: var(--cream);
    opacity: 0.58;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-chip-sep {
    color: rgba(166, 135, 99, 0.35);
    font-size: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    color: var(--brown);
    opacity: 0.4;
    animation: bounce 2s infinite ease-in-out;
    z-index: 1;
}


/* Stats Band */
.stats-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 40px;
    background: rgba(166, 135, 99, 0.06);
    border-top: 1px solid rgba(166, 135, 99, 0.14);
    border-bottom: 1px solid rgba(166, 135, 99, 0.14);
}
.stat-item { display: flex; align-items: baseline; gap: 6px; }
.stat-num  { font-size: 1.45rem; font-weight: 800; color: var(--brown); }
.stat-label { font-size: 0.76rem; color: var(--cream); opacity: 0.65; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.stat-sep  { color: rgba(166,135,99,0.35); font-size: 1.1rem; }

/* Animations */
.fade-in        { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s forwards; }
.fade-in-delay  { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s 0.2s forwards; }
.fade-in-delay-2 { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s 0.4s forwards; }
.fade-in-delay-3 { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s 0.6s forwards; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%       { transform: translate(-50%, 15px); }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.core-disciplines h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.disciplines-list {
    list-style: none;
    margin-top: 10px;
}

.discipline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1.1rem;
    color: var(--cream);
    transition: all 0.3s ease;
}

.discipline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.discipline-item:first-child {
    padding-top: 0;
}

.discipline-item:hover {
    color: var(--beige);
    transform: translateX(10px);
}
html[lang="ar"] .discipline-item:hover {
    transform: translateX(-10px);
}

.discipline-icon {
    color: var(--brown);
    font-size: 1.3rem;
}

.signature-font {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--beige);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
}
html[lang="ar"] .signature-font {
    letter-spacing: 0;
    font-size: 1.1em;
}

/* Story Section */
.story-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.25rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
    justify-content: center;
    max-width: 920px;
    margin: 0 auto;
}

.skill-item {
    background: linear-gradient(145deg, rgba(233, 224, 210, 0.04) 0%, rgba(20, 18, 14, 0.6) 100%);
    border: 1px solid rgba(215, 201, 174, 0.14);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
        0 6px 18px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 26px 18px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.skill-item:hover {
    background: linear-gradient(145deg, rgba(166, 135, 99, 0.16) 0%, rgba(20, 18, 14, 0.7) 100%);
    transform: translateY(-8px);
    border-color: rgba(215, 201, 174, 0.38);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
        0 14px 28px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(166, 135, 99, 0.2);
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.software-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.skill-item:hover .software-logo {
    transform: scale(1.12);
    filter: drop-shadow(0 6px 16px rgba(166, 135, 99, 0.45));
}

.skill-name {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.skill-sub {
    font-size: 0.78rem;
    color: var(--brown);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ai-mention {
    margin-top: 50px;
    font-size: 1.05rem;
    color: var(--beige);
    opacity: 0.8;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.empty-projects {
    text-align: center;
    color: var(--beige);
    opacity: 0.6;
    padding: 50px;
    font-style: italic;
    grid-column: 1 / -1;
    font-size: 1.2rem;
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
}

.project-card {
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(233, 224, 210, 0.045) 0%, rgba(18, 16, 13, 0.85) 100%);
    border: 1px solid rgba(215, 201, 174, 0.15);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.4),
        0 10px 28px -6px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(215, 201, 174, 0.45);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5),
        0 22px 42px -8px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(166, 135, 99, 0.16);
}

.project-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(12, 12, 12, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card-thumb img.img-contain {
    object-fit: contain;
    padding: 30px;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}

.project-card:hover .project-card-thumb img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(18, 16, 12, 0.85);
    border: 1px solid var(--glass-border);
    color: var(--beige);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.project-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--brown);
    border-radius: 50%;
}

.project-card-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    background: rgba(20, 18, 14, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.project-title {
    font-size: 1.25rem;
    color: var(--beige);
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.3;
}

.project-category {
    font-size: 0.85rem;
    color: var(--brown);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.project-action-btn {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--brown);
    font-weight: 600;
    transition: all 0.25s ease;
    align-self: flex-start;
}

.project-card:hover .project-action-btn {
    color: var(--beige);
    transform: translateX(4px);
}

/* ═══ LIGHTBOX / CAROUSEL MODAL ═══ */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 7, 5, 0.92);
    backdrop-filter: blur(16px);
}

.lightbox-container {
    position: relative;
    z-index: 2;
    width: 92vw;
    max-width: 1200px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    background: rgba(22, 20, 16, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-container {
    transform: scale(1);
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
    font-size: 1.25rem;
    color: var(--beige);
    font-weight: 700;
    margin: 0 0 4px;
}

.lightbox-category {
    font-size: 0.82rem;
    color: var(--brown);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--beige);
    font-size: 1.8rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--brown);
    color: #12100a;
    transform: rotate(90deg);
}

.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    min-height: 380px;
    max-height: 62vh;
}

.lightbox-media {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 58vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: opacity 0.25s ease;
}

.lightbox-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(10, 8, 6, 0.85);
    border: 1px solid var(--glass-border);
    color: var(--beige);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
}

.lightbox-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--beige);
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    user-select: none;
    flex-shrink: 0;
    margin: 0 12px;
}

.lightbox-nav-btn:hover {
    background: var(--brown);
    color: #12100a;
    transform: scale(1.1);
}

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 4px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--brown) transparent;
}

.lightbox-thumb {
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    background: #000;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-thumb:hover {
    opacity: 0.85;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--brown);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .lightbox-container {
        width: 96vw;
        padding: 14px 14px;
        max-height: 96vh;
    }
    .lightbox-stage {
        min-height: 260px;
        max-height: 52vh;
    }
    .lightbox-img {
        max-height: 48vh;
    }
    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        margin: 0 4px;
    }
    .lightbox-thumb {
        width: 52px;
        height: 38px;
    }
}

/* Contact Section */
.contact-card {
    max-width: 650px;
    margin: 0 auto;
    padding: 4rem;
}

.form-group {
    margin-bottom: 25px;
}

input, textarea {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--cream);
    font-family: inherit;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--brown);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(166, 135, 99, 0.1);
}

.submit-btn {
    width: 100%;
    font-size: 1.15rem;
    padding: 18px;
    margin-top: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--glass-border);
}

footer p {
    font-size: 0.95rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.social-links a {
    color: var(--beige);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links a svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    background: var(--brown);
    color: var(--dark);
    transform: translateY(-5px);
    border-color: var(--brown);
}

.social-links a:hover svg {
    transform: scale(1.1);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--brown);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

html[lang="ar"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--beige);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 25px;
    height: 25px;
}

/* Slide-up Words (remplace typewriter) */
.slide-words-wrap {
    display: inline-flex;
    align-items: baseline;
    overflow: hidden;
    vertical-align: baseline;
    height: 1.35em;
    line-height: 1.35em;
}

.slide-word {
    display: inline-block;
    color: var(--beige);
    font-weight: 600;
    line-height: 1.35em;
    opacity: 0;
    transform: translateY(20px);
    transition: none;
}

.slide-word.slide-enter {
    animation: slideWordIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.slide-word.slide-exit {
    animation: slideWordOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes slideWordIn {
    0%   { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideWordOut {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-16px); }
}

/* Manifeste d'Atelier */
.about-bio {
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* Bloc unique Ce que je conçois */
.scope-card {
    padding: 3rem;
    margin-bottom: 36px;
}

.scope-card-title {
    font-size: 1.6rem;
    color: var(--beige);
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 12px;
}

.scope-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--brown);
    border-radius: 2px;
}

.scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.manifeste-philo {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.15rem;
    text-align: center;
}

/* Projects Placeholder */
.projects-placeholder {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}

.projects-placeholder-inner {
    border: 1.5px dashed rgba(166, 135, 99, 0.45);
    border-radius: 24px;
    padding: 60px 48px;
    text-align: center;
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.placeholder-icon {
    width: 56px;
    height: 56px;
    color: var(--brown);
    opacity: 0.65;
    margin-bottom: 8px;
}

.placeholder-title {
    font-size: 1.35rem;
    color: var(--beige);
    font-weight: 700;
    margin: 0;
}

.placeholder-sub {
    font-size: 0.95rem;
    color: var(--cream);
    opacity: 0.6;
    max-width: 400px;
    margin: 0;
    line-height: 1.7;
}

/* Quotes / Expertise Marquee */
.marquee-container {
    width: 100%;
    max-width: 1100px;
    margin: 28px auto 6px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-content {
    display: inline-flex;
    flex-wrap: nowrap;
    width: max-content;
    align-items: center;
    animation: marquee 30s linear infinite;
    will-change: transform;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.expertise-tag {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--beige);
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.expertise-sep {
    color: var(--brown);
    margin: 0 32px;
    font-size: 0.9rem;
    opacity: 0.8;
    flex-shrink: 0;
}

html[lang="ar"] .marquee-content {
    animation-direction: reverse;
}


/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: none;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(20, 18, 16, 0.95);
    color: var(--cream);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    pointer-events: none;
    z-index: 100;
}
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════
   RESPONSIVE DESIGN (TABLETTES & SMARTPHONES)
   ══════════════════════════════════════════════ */

/* Sécurité anti-scroll horizontal global */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}

@media (max-width: 1024px) {
    .scope-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
    }
}

@media (max-width: 768px) {
    .section-container { 
        padding: 55px 16px; 
    }
    
    .glass-card { 
        padding: 1.5rem 1.25rem; 
        border-radius: 18px;
    }

    /* ─── Header & Nav ─── */
    nav {
        top: 0;
        padding: 10px 0;
    }
    
    .nav-container {
        border-radius: 0;
        padding: 0 16px;
        position: relative;
    }

    .nav-brand-group {
        gap: 8px;
    }

    .nav-logo-img {
        height: 32px;
    }

    .nav-logo-text {
        height: 15px;
    }

    .nav-status-badge {
        display: none;
    }

    .hamburger { 
        display: flex; 
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(22, 22, 22, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(215, 201, 174, 0.25);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
        flex-direction: column;
        align-items: center;
        padding: 24px 0 28px;
        gap: 18px;
        clip-path: circle(0% at top right);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .nav-links.active {
        clip-path: circle(150% at top right);
    }

    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* ─── Hero Section ─── */
    .hero-section {
        min-height: auto;
        padding: 85px 16px 40px;
    }

    .hero-brand-block {
        margin-bottom: 14px;
    }

    .hero-brand-emblem {
        width: 155px;
        max-height: 110px;
    }

    .hero-brand-text {
        height: 24px;
        margin-top: 8px;
        max-width: 85vw;
    }

    .hero-brand-aura {
        width: 200px;
        height: 140px;
    }

    .hero-tag {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        line-height: 1.55;
        margin-bottom: 14px;
        padding: 0 6px;
    }

    .hero-center-name {
        font-size: clamp(1.8rem, 7.5vw, 2.4rem);
        margin-bottom: 14px;
        letter-spacing: 0.5px;
    }

    .hero-divider {
        width: 45px;
        margin: 0 auto 16px;
    }

    .hero-cta-box {
        margin-bottom: 20px;
    }

    .hero-main-btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .hero-typewriter-p {
        font-size: 0.9rem;
        margin-bottom: 20px;
        text-align: center;
        padding: 0 10px;
    }

    .hero-chips {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 10px;
        margin-bottom: 24px;
    }

    .hero-chip {
        padding: 5px 12px;
        font-size: 0.78rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(215, 201, 174, 0.15);
    }

    .hero-chip-sep {
        display: none;
    }

    .marquee-container {
        width: 100vw;
        max-width: 100vw;
        margin: 15px -16px 20px;
        overflow: hidden;
    }

    .expertise-tag {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .expertise-sep {
        margin: 0 14px;
    }

    /* ─── About Section ─── */
    .about-bio {
        padding: 1.5rem 1.25rem;
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .about-bio p + p {
        margin-top: 0.9rem !important;
    }

    .scope-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .scope-card {
        padding: 1.6rem 1.25rem;
    }

    .disciplines-list {
        gap: 12px;
    }

    .discipline-item {
        font-size: 0.88rem;
        gap: 10px;
    }

    .manifeste-philo {
        padding: 1.5rem 1.25rem;
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* ─── Skills Grid ─── */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .skill-item,
    .skill-item.glass-card {
        padding: 16px 12px;
        border-radius: 16px;
        gap: 10px;
    }

    .skill-icon {
        width: 42px;
        height: 42px;
    }

    .skill-icon img,
    .software-logo {
        width: 42px !important;
        height: 42px !important;
        object-fit: contain;
    }

    .skill-name {
        font-size: 0.85rem;
    }

    /* ─── Projects & Lightbox ─── */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        border-radius: 18px;
    }

    .project-thumb {
        height: 220px;
    }

    .project-info {
        padding: 18px 16px;
    }

    .lightbox-container {
        width: 95vw;
        padding: 12px 10px;
        max-height: 94vh;
        border-radius: 16px;
    }

    .lightbox-header {
        margin-bottom: 8px;
    }

    .lightbox-title {
        font-size: 1.05rem;
    }

    .lightbox-category {
        font-size: 0.72rem;
    }

    .lightbox-close {
        width: 32px;
        height: 32px;
        font-size: 1.4rem;
    }

    .lightbox-stage {
        min-height: 200px;
        max-height: 48vh;
    }

    .lightbox-img {
        max-height: 44vh;
    }

    .lightbox-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin: 0 4px;
    }

    .lightbox-thumbs {
        gap: 6px;
        padding: 6px 0;
        max-height: 52px;
    }

    .lightbox-thumb {
        width: 46px;
        height: 34px;
    }

    /* ─── Contact Section (iOS Safe Inputs) ─── */
    .contact-card {
        padding: 1.8rem 1.25rem;
        border-radius: 18px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    input, textarea {
        font-size: 16px !important; /* Prévient le zoom automatique sur iPhone */
        padding: 14px 16px;
        border-radius: 10px;
    }

    .submit-btn {
        padding: 15px;
        font-size: 1rem;
        border-radius: 25px;
    }

    /* ─── Footer ─── */
    footer {
        padding: 35px 16px;
    }

    .footer-email a {
        font-size: 1rem;
    }

    footer p {
        font-size: 0.82rem;
        line-height: 1.6;
    }

    /* ─── Back to top ─── */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* Écrans smartphones standards (< 560px) */
@media (max-width: 560px) {
    /* Masquer le CTA de la barre fixe pour aérer le logo et le switcher */
    .nav-right-actions .nav-cta-btn {
        display: none !important;
    }

    /* Afficher le bouton CTA bien accessible dans le menu déroulant mobile */
    .mobile-cta-item {
        display: block !important;
        width: 100%;
        padding: 10px 24px 0;
    }

    .mobile-nav-cta-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        background: var(--brown);
        color: var(--dark) !important;
        border-radius: 25px;
        font-weight: 700;
        text-decoration: none;
        letter-spacing: 0.4px;
        box-shadow: 0 4px 15px rgba(166, 135, 99, 0.35);
    }
}

/* Google Review Badge */
.google-review-badge {
    margin-top: 2.2rem;
    padding: 1.6rem 1.8rem;
    border-radius: 18px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.28);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.google-review-stars {
    color: #fbbf24;
    font-size: 1.35rem;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.google-review-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 6px;
}

.google-review-sub {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin-bottom: 16px;
}

.google-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    border-radius: 9999px;
    background: #ffffff;
    color: #0f172a !important;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.google-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.35);
    background: #f8fafc;
}

.footer-review-link a {
    transition: all 0.3s ease;
}

.footer-review-link a:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.5) !important;
    background: rgba(251, 191, 36, 0.15) !important;
}

/* Petits écrans (< 380px : iPhone SE, anciens Galaxy) */
@media (max-width: 380px) {
    .nav-logo-text {
        height: 13px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .hero-center-name {
        font-size: 1.7rem;
    }

    .stat-num { 
        font-size: 1.15rem; 
    }
    
    .stat-label { 
        font-size: 0.65rem; 
    }
}


