/* ==============================================================================
   PORTFOLIO PASCAL NOUFIAMETO
   Génie Civil · Développement Web · Graphic Design
   Direction Artistique : Épurée, Graphique & Éditoriale
   ============================================================================== */

/* ===== 1. VARIABLES & DESIGN TOKENS ===== */
:root {
    /* Palette Sobre & Naturelle */
    --bg-canvas: #0f1115;
    --bg-surface: #161920;
    --bg-surface-elevated: #1e222b;
    --bg-surface-subtle: #13151b;

    /* Bordures */
    --border-subtle: rgba(243, 244, 246, 0.08);
    --border-mid: rgba(243, 244, 246, 0.16);

    /* Texte */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accents */
    --accent-terracotta: #c86a3d;
    --accent-terracotta-hover: #d9784b;
    --accent-slate: #60a5fa;
    --accent-sage: #34d399;
    --accent-alert: #f87171;

    /* Polices */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;

    /* Rayons */
    --radius-sm: 4px;
    --radius-md: 6px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Dimensions */
    --container-max: 1160px;
    --header-height: 72px;
}

/* ===== 2. RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    background-color: var(--bg-canvas);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background-color: var(--accent-terracotta); color: var(--text-primary); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; background: transparent; border: none; outline: none; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-slate); outline-offset: 3px; }

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

/* ===== 3. TYPOGRAPHIE & SECTIONS ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

.section {
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header { margin-bottom: var(--space-2xl); }

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-terracotta);
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    margin-bottom: 0.4rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 620px;
}

/* Cartes */
.card-surface {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.card-surface:hover { border-color: var(--border-mid); }

/* ===== 4. BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-terracotta);
    color: var(--text-primary);
}
.btn-primary:hover {
    background-color: var(--accent-terracotta-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
    border-color: var(--border-mid);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--border-mid);
    background-color: var(--bg-surface);
    transform: translateY(-2px);
}

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ===== 5. HEADER & NAVIGATION ===== */
.site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(15, 17, 21, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
}

.site-header.scrolled {
    background-color: rgba(15, 17, 21, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-mark {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-terracotta);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.logo-text { display: flex; flex-direction: column; }
.logo-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.logo-role { font-size: 0.72rem; color: var(--text-muted); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-icon {
    width: 16px; height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover .nav-icon { color: var(--accent-terracotta); }
.nav-link.active { color: var(--text-primary); font-weight: 600; }
.nav-link.active .nav-icon { color: var(--accent-terracotta); }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 100%; height: 2px;
    background-color: var(--accent-terracotta);
    border-radius: 1px;
}

.btn-nav-cta {
    background-color: var(--accent-terracotta);
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.btn-nav-cta .nav-icon { color: var(--text-primary) !important; }
.btn-nav-cta:hover {
    background-color: var(--accent-terracotta-hover);
    transform: translateY(-1px);
}
.btn-nav-cta::after { display: none !important; }

/* Burger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px; height: 18px;
}
.burger-bar {
    width: 100%; height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle.open .burger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open .burger-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .burger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== 6. HERO ===== */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

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

.hero-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}
.hero-subtitle strong { color: var(--text-primary); }

.hero-description {
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: var(--space-xl);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Portrait */
.portrait-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    max-width: 300px;
    margin-left: auto;
}

.portrait-image-wrapper {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
}

.portrait-photo {
    width: 100%;
    aspect-ratio: 4 / 4.5;
    object-fit: cover;
}

.portrait-disciplines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

.discipline-box {
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.discipline-span { grid-column: span 2; }
.disc-label { font-size: 0.68rem; color: var(--text-muted); }
.disc-title { font-size: 0.82rem; color: var(--text-primary); font-weight: 600; }

/* ===== 7. À PROPOS ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-xl);
    align-items: flex-start;
}

.about-text-card { padding: var(--space-xl); }

.about-heading {
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
}

.about-paragraph {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}
.about-paragraph:last-child { margin-bottom: 0; }

.about-pillars-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.pillar-item {
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.pillar-icon-box {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent-terracotta);
    font-size: 1rem;
    flex-shrink: 0;
}

.pillar-item-title {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.pillar-item-text {
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ===== 8. PROJETS WEB ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.project-card {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card-full {
    grid-column: span 2;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.project-icon-box {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent-terracotta);
    font-size: 0.95rem;
}

.project-category-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    background-color: var(--bg-surface-subtle);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.project-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.project-desc code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-slate);
    background-color: var(--bg-surface-subtle);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}

/* Fonctionnalités réelles listées */
.project-features {
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.features-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-terracotta);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.features-list li {
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.features-list li i {
    color: var(--accent-sage);
    font-size: 0.7rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.features-list li code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-slate);
    background-color: rgba(96, 165, 250, 0.08);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: var(--space-lg);
}

.p-tag {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.project-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ===== 9. GALERIE ARCHITECTURE ===== */
.archi-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.archi-card {
    overflow: hidden;
    transition: transform var(--transition-normal);
}
.archi-card:hover { transform: translateY(-4px); }

.archi-image-wrapper {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.archi-image-wrapper::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    background-color: rgba(15, 17, 21, 0.75);
    color: var(--text-primary);
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.archi-image-wrapper:hover::after {
    opacity: 1;
}

.archi-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform var(--transition-normal);
}
.archi-card:hover .archi-image { transform: scale(1.03); }

.archi-info {
    padding: var(--space-lg);
}

.archi-type {
    font-size: 0.72rem;
    color: var(--accent-terracotta);
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}

.archi-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.archi-desc {
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ===== 10. GALERIE DESIGN GRAPHIQUE ===== */
.design-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.design-card {
    overflow: hidden;
    transition: transform var(--transition-normal);
}
.design-card:hover { transform: translateY(-4px); }

.design-image-wrapper {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.design-image-wrapper::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    background-color: rgba(15, 17, 21, 0.75);
    color: var(--text-primary);
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.design-image-wrapper:hover::after { opacity: 1; }

.design-image {
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}
.design-card:hover .design-image { transform: scale(1.03); }

.design-info {
    padding: var(--space-lg);
}

.design-type {
    font-size: 0.72rem;
    color: var(--accent-terracotta);
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}

.design-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.design-desc {
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ===== 11. CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: flex-start;
}

.contact-methods-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-links-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-link-item {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.contact-link-item:hover {
    border-color: var(--border-mid);
    transform: translateX(4px);
}

.contact-icon-frame {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.contact-icon-frame.whatsapp { background-color: rgba(37, 211, 102, 0.12); color: #25d366; }
.contact-icon-frame.email { background-color: rgba(96, 165, 250, 0.12); color: var(--accent-slate); }
.contact-icon-frame.tiktok { background-color: rgba(254, 44, 85, 0.12); color: #fe2c55; }

.contact-link-content { flex: 1; display: flex; flex-direction: column; }
.c-label { font-size: 0.72rem; color: var(--text-muted); }
.c-value { font-size: 0.95rem; color: var(--text-primary); }
.contact-arrow-icon { font-size: 0.85rem; color: var(--text-muted); }
.contact-action-banner { margin-top: var(--space-xs); }

/* Carte 3D */
.contact-card3d-col { display: flex; flex-direction: column; }
.card3d-hint { display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: var(--space-xs); text-align: center; }

.carte-visite { width: 100%; height: 190px; perspective: 1000px; cursor: pointer; }

.carte-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--radius-md);
}

.carte-visite:hover .carte-inner,
.carte-visite.flipped .carte-inner { transform: rotateY(180deg); }

.carte-face {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-mid);
}

.carte-recto-content { text-align: center; }
.carte-logo { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--accent-terracotta); margin-bottom: var(--space-xs); }
.carte-name { font-size: 1.2rem; margin-bottom: 0.15rem; }
.carte-sub { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: var(--space-xs); }
.carte-pill { font-size: 0.72rem; color: var(--accent-slate); background-color: var(--bg-surface-subtle); padding: 0.15rem 0.5rem; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }

.carte-verso { transform: rotateY(180deg); text-align: center; }
.carte-verso-title { font-size: 0.95rem; margin-bottom: var(--space-md); }
.carte-verso-links { display: flex; justify-content: center; gap: var(--space-sm); }
.carte-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; font-size: 0.78rem; border-radius: var(--radius-sm); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.carte-btn.whatsapp { background-color: rgba(37, 211, 102, 0.18); }
.carte-btn.email { background-color: rgba(96, 165, 250, 0.18); }

/* ===== 12. FOOTER ===== */
.site-footer {
    background-color: #0b0d10;
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-xl);
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-xl);
}

.footer-bio { font-size: 0.88rem; line-height: 1.6; margin-top: var(--space-md); max-width: 360px; }
.footer-col-title { font-size: 0.85rem; color: var(--text-primary); margin-bottom: var(--space-md); }
.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a { font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent-terracotta); }

.footer-social-icons { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.footer-social-icons a {
    width: 36px; height: 36px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.footer-social-icons a:hover { border-color: var(--border-mid); color: var(--accent-terracotta); transform: translateY(-2px); }
.footer-location { font-size: 0.78rem; color: var(--text-muted); }

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== 13. MODALES ===== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.modal-backdrop.active { opacity: 1; visibility: visible; }

.modal-dialog {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
    background-color: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}
.modal-backdrop.active .modal-dialog { transform: translateY(0); }

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-lg);
}
.modal-pretitle { font-size: 0.75rem; color: var(--accent-terracotta); display: block; margin-bottom: 0.15rem; font-weight: 600; }
.modal-header h3 { font-size: 1.3rem; }
.modal-close { font-size: 1.5rem; color: var(--text-muted); line-height: 1; padding: 0.2rem; }
.modal-close:hover { color: var(--text-primary); }

/* Formulaire */
.form-group { margin-bottom: var(--space-md); display: flex; flex-direction: column; gap: 0.3rem; }
.control-label { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); }
.required { color: var(--accent-terracotta); }

.form-input {
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}
.form-input:focus { border-color: var(--accent-terracotta); }
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 95px; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.char-counter { font-size: 0.72rem; color: var(--text-muted); }
.field-error { font-size: 0.75rem; color: var(--accent-alert); min-height: 1.1rem; }

.form-status { font-size: 0.85rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); margin-bottom: var(--space-md); display: none; }
.form-status.success { display: block; background-color: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); color: var(--accent-sage); }
.form-status.error { display: block; background-color: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--accent-alert); }
.btn-submit { width: 100%; }

/* Code snippet */
.code-block {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #0c0e12;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
    overflow-x: auto;
    white-space: pre;
}

/* Lightbox simple */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: var(--text-primary);
    background: none;
    z-index: 10;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== 14. TOAST ===== */
.toast-notification {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-mid);
    border-left: 3px solid var(--accent-terracotta);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}
.toast-notification.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: var(--accent-terracotta); }

/* ===== 15. SCROLL REVEAL ===== */
.fade-in-element {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 16. RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .portrait-card { margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card-full { grid-column: span 1; }
    .archi-gallery { grid-template-columns: 1fr; }
    .design-gallery { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-top-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height: 64px; }

    .nav-toggle { display: flex; }

    .primary-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(15, 17, 21, 0.98);
        backdrop-filter: blur(16px);
        padding: var(--space-xl) var(--space-lg);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        overflow-y: auto;
    }
    .primary-nav.open { transform: translateX(0); }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .nav-link { font-size: 1.05rem; width: 100%; padding: 0.5rem 0; }
    .btn-nav-cta { width: 100%; justify-content: center; padding: 0.7rem; margin-top: var(--space-xs); }

    .footer-top-grid { grid-template-columns: 1fr; }
    .footer-bottom-bar { flex-direction: column; align-items: flex-start; }

    .toast-notification { left: var(--space-md); right: var(--space-md); bottom: var(--space-md); }
}