/* ==========================================================================
   PORTFOLIO DOUDOUTECH — FEUILLE DE STYLE 100% RESPONSIVE & ANTI-CHEVAUCHEMENT
   Palette : Noir Obsidienne (#09080A), Or Champagne (#C5A059), Bordeaux (#8C1D2E)
   ========================================================================== */
:root {
    --bg-primary: #0A0E17;         /* Fond bleu-noir nuit */
    --bg-surface: #141C2B;         /* Surface des cartes (bleu nuit) */
    --bg-surface-elevated: #1E293B;/* Surface au survol */
    
    --gold-primary: #0EA5E9;       /* Remplacé par le Bleu Professionnel du CV */
    --gold-light: #38BDF8;         /* Bleu clair pour les reflets */
    --crimson-accent: #00A8FF;     /* Accent bleu vif */
    --crimson-glow: rgba(14, 165, 233, 0.18);
    --emerald-status: #10B981;     /* Vert émeraude */

    --text-primary: #F8FAFC;       /* Blanc clair */
    --text-secondary: #94A3B8;     /* Gris bleuté */
    --text-muted: #64748B;

    --border-subtle: rgba(14, 165, 233, 0.18);
    --border-hover: rgba(14, 165, 233, 0.45);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --nav-height: 76px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: 0.28s ease;
}

/* RESET STRICT & PROTECTION CONTRE LES DÉBORDEMENTS */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    letter-spacing: 0.015em; /* Empêche les lettres de se coller */
    word-spacing: 0.04em;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body.welcome-open {
    overflow: hidden;
}

.welcome-screen[hidden] {
    display: none;
}

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 18% 18%, rgba(14, 165, 233, 0.12), transparent 35%),
        radial-gradient(ellipse at 84% 82%, rgba(0, 168, 255, 0.1), transparent 32%),
        rgba(5, 8, 14, 0.97);
    backdrop-filter: blur(18px);
    animation: welcome-screen-in 0.7s ease both;
}

.welcome-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(1180px, 96vw, calc((100dvh - 3.5rem) * 1.378));
    animation: welcome-card-in 0.8s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.welcome-laptop {
    position: relative;
    width: 100%;
    aspect-ratio: 536 / 389;
    flex: 0 0 auto;
    filter: drop-shadow(0 26px 35px rgba(0, 0, 0, 0.42));
}

.welcome-laptop-mockup {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 4px;
}

.welcome-screen-face {
    position: absolute;
    left: 5.6%;
    top: 8%;
    width: 53%;
    height: 63%;
    overflow: hidden;
    clip-path: polygon(0 19%, 84% 0, 100% 75%, 18% 93%);
    background:
        radial-gradient(ellipse at 75% 20%, rgba(14, 165, 233, 0.16), transparent 50%),
        linear-gradient(145deg, #111b2b, #070b12 72%);
    animation: welcome-screen-glow 4s ease-in-out infinite alternate;
}

.welcome-screen-ui {
    position: absolute;
    inset: 5% 13% 7% 13%;
    display: grid;
    grid-template-columns: minmax(52px, 0.28fr) minmax(0, 1fr);
    align-items: center;
    gap: 5%;
    transform: skewY(-10deg);
    animation: welcome-avatar-in 0.8s 0.22s ease both;
}

.welcome-avatar-column,
.welcome-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.welcome-avatar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.7vw, 9px);
}

.welcome-avatar {
    position: relative;
    width: clamp(48px, 7.3vw, 84px);
    aspect-ratio: 1;
    flex-shrink: 0;
}

.welcome-avatar-halo {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.24);
    animation: welcome-halo-pulse 3s ease-in-out infinite;
}

.welcome-avatar img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    border: 2px solid rgba(56, 189, 248, 0.7);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    animation: welcome-character-float 3.2s ease-in-out infinite;
}

.welcome-presence {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: #c4d2e3;
    font: 600 clamp(5px, 0.62vw, 8px) var(--font-mono);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.welcome-presence span,
.welcome-eyebrow > span {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.75);
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    margin-bottom: clamp(3px, 0.7vw, 9px);
    color: var(--gold-light);
    font: 600 clamp(6px, 0.72vw, 9px) var(--font-mono);
    letter-spacing: 0.08em;
}

.welcome-eyebrow > span {
    background: var(--gold-primary);
    box-shadow: 0 0 9px rgba(14, 165, 233, 0.65);
}

.welcome-copy h1 {
    margin-bottom: clamp(4px, 0.75vw, 10px);
    font-size: clamp(17px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.welcome-title-line {
    display: block;
}

.welcome-copy h1 .welcome-title-accent {
    color: var(--gold-light);
    white-space: nowrap;
}

.welcome-wink {
    display: inline-block;
    margin-left: 0.08em;
    color: var(--gold-light);
    font-size: 0.72em;
    vertical-align: 0.05em;
    transform-origin: 50% 70%;
    animation: welcome-wink-pop 2.8s 0.8s ease-in-out infinite;
}

.welcome-copy > p {
    max-width: 100%;
    margin-bottom: clamp(5px, 0.75vw, 10px);
    color: #c1ccda;
    font-size: clamp(7px, 0.92vw, 12px);
    line-height: 1.5;
}

.welcome-copy > p strong {
    color: var(--text-primary);
}

.welcome-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: clamp(6px, 0.9vw, 12px);
}

.welcome-specialties span {
    padding: 0.25em 0.5em;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
    color: #c4d2e3;
    font: 500 clamp(5px, 0.62vw, 8px) var(--font-mono);
}

.welcome-enter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65em;
    max-width: 100%;
    padding: 0.65em 0.9em;
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 5px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #07111b;
    font: 700 clamp(7px, 0.82vw, 10px) var(--font-sans);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.2);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.welcome-enter:hover,
.welcome-enter:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.33);
    outline: 2px solid rgba(56, 189, 248, 0.5);
    outline-offset: 2px;
}

.welcome-credit {
    align-self: flex-end;
    margin: -1.6% 4.5% 0 0;
    padding: 0.18rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(5, 8, 14, 0.65);
    color: rgba(255, 255, 255, 0.82);
    font: 500 0.65rem var(--font-mono);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    transition: color var(--transition);
}

.welcome-credit:hover,
.welcome-credit:focus-visible {
    color: var(--gold-light);
}

.welcome-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.welcome-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left center;
    animation: welcome-progress 6s linear both;
}

.welcome-screen.is-closing {
    animation: welcome-screen-out 0.45s ease both;
    pointer-events: none;
}

.welcome-screen.is-closing .welcome-stage {
    animation: welcome-card-out 0.45s ease both;
}

@keyframes welcome-screen-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes welcome-card-in {
    from { opacity: 0; transform: translateY(18px) scale(0.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes welcome-avatar-in {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes welcome-screen-glow {
    from { filter: brightness(0.96); }
    to { filter: brightness(1.08); }
}

@keyframes welcome-character-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes welcome-halo-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.035); }
}

@keyframes welcome-wink-pop {
    0%, 72%, 84%, 100% { transform: rotate(0) scale(1); }
    78% { transform: rotate(-12deg) scale(1.12); }
}

@keyframes welcome-progress {
    to { transform: scaleX(1); }
}

@keyframes welcome-screen-out {
    to { opacity: 0; visibility: hidden; }
}

@keyframes welcome-card-out {
    to { opacity: 0; transform: translateY(-12px) scale(0.985); }
}

/* Lueurs d'arrière-plan */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
    z-index: 0;
}
.glow-crimson {
    width: 450px;
    height: 450px;
    background: var(--crimson-glow);
    top: -100px;
    right: -100px;
}
.glow-gold {
    width: 400px;
    height: 400px;
    background: rgba(197, 160, 89, 0.08);
    bottom: 5%;
    left: -120px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul { list-style: none; }

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

/* TYPOGRAPHIE AÉRÉE ET LISIBLE */
h1, h2, h3, h4 {
    font-family: var(--font-sans);
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.01em; /* Aucun espacement négatif qui écrase les lettres */
    overflow-wrap: break-word;
}

p {
    color: var(--text-secondary);
    line-height: 1.75;
    letter-spacing: 0.015em;
    overflow-wrap: break-word;
}

.mono-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.section-padding {
    padding: 96px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.section-header h2 {
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
    max-width: 720px;
}

.section-intro {
    max-width: 680px;
    margin-top: 0.75rem;
    font-size: 0.98rem;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 65%, #A37B31 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* BOUTONS CORRIGÉS (Zéro résidu de dégradé) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.88rem 1.6rem;
    font-family: var(--font-sans);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    /* Utilisation de l'espace colorimétrique oklch pour lisser le dégradé et supprimer les bandes grises/sombres */
    background: linear-gradient(135deg in oklch, var(--gold-light), var(--gold-primary));
    color: #09080A;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg in oklch, #FFFFFF, var(--gold-light));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.35);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--gold-primary);
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.08);
    transform: translateY(-2px);
}
/* CONTRÔLES DE NAVIGATION */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.audio-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(19, 17, 24, 0.92);
    color: var(--text-primary);
    font: 600 0.8rem var(--font-sans);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.audio-toggle:hover,
.audio-toggle:focus-visible,
.audio-toggle[aria-pressed="true"] {
    border-color: var(--gold-primary);
    color: var(--gold-light);
    outline: none;
}

.audio-toggle i {
    color: var(--gold-primary);
    font-size: 1rem;
}

.audio-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.floating-actions {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 46px;
    flex: 0 0 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: rgba(19, 17, 24, 0.94);
    color: var(--text-primary);
    opacity: 0;
    visibility: hidden;
    transition: width var(--transition), flex-basis var(--transition), opacity var(--transition), color var(--transition), border-color var(--transition);
}

.back-to-top.visible {
    width: 46px;
    flex-basis: 46px;
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    border-color: var(--gold-primary);
    color: var(--gold-light);
    outline: none;
}

.quick-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(37, 211, 102, 0.55);
    border-radius: 999px;
    background: #128c4a;
    color: #fff;
    font: 700 0.82rem var(--font-sans);
    box-shadow: 0 6px 20px rgba(18, 140, 74, 0.3);
    transition: var(--transition);
}

.quick-contact:hover,
.quick-contact:focus-visible {
    background: #0f7a40;
    outline: 2px solid rgba(37, 211, 102, 0.6);
    outline-offset: 3px;
}

.quick-contact i {
    font-size: 1.2rem;
}

/* HEADER & NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(9, 8, 10, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

header.scrolled {
    height: 68px;
    background: rgba(9, 8, 10, 0.96);
    border-bottom-color: var(--border-subtle);
}

.nav-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-accent { color: var(--gold-primary); }
.logo-dot { color: var(--crimson-accent); }

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

.nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    padding: 0.4rem 0;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 2px;
}

.nav-cta {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.15rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.06);
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

.burger {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1002;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 4px 0;
    transition: var(--transition);
}

/* SECTION HERO */
.hero-section {
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 72px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.95rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    color: #A7F3D0;
    margin-bottom: 1.4rem;
    max-width: 100%;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--emerald-status);
    box-shadow: 0 0 8px var(--emerald-status);
}

.hero-title {
    font-size: clamp(2.1rem, 4.5vw, 3.8rem);
    line-height: 1.18;
    margin-bottom: 1rem;
}

.hero-role {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    min-height: 2.2rem;
}

.hero-role strong {
    color: var(--text-primary);
    font-weight: 700;
}

.typed-text {
    color: var(--gold-light);
    font-weight: 600;
}

.cursor {
    color: var(--crimson-accent);
    font-weight: 700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.02rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-description strong {
    color: var(--text-primary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 0.15rem;
}

.meta-label {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.meta-divider {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, 0.12);
}

/* Portrait */
.portrait-frame {
    position: relative;
    max-width: 390px;
    width: 100%;
    margin: 0 auto;
}

.portrait-border-offset {
    position: absolute;
    top: 12px;
    left: 12px;
    right: -12px;
    bottom: -12px;
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(140, 29, 46, 0.25), transparent);
    z-index: 0;
}

.portrait-img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.portrait-badge {
    position: relative;
    z-index: 2;
    margin-top: -28px;
    margin-left: 12px;
    margin-right: 12px;
    background: rgba(19, 17, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-hover);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.portrait-badge i {
    font-size: 1.35rem;
    color: var(--emerald-status);
    flex-shrink: 0;
}

.badge-text strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.badge-text span {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

/* SECTION À PROPOS (BENTO) */
.about-bento {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.bento-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.bento-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-elevated);
    transform: translateY(-5px);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.24);
}

.bento-main {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-main h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--gold-light);
}

.bento-index {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--gold-primary);
    font: 700 0.74rem var(--font-mono);
    letter-spacing: 0.06em;
}

.bento-index span {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.bento-main p {
    margin-bottom: 1.1rem;
}

.bento-main strong {
    color: var(--text-primary);
}

.signature-bar {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links-inline {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
}

.social-links-inline a:hover {
    color: var(--gold-primary);
}

.bento-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--gold-light);
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.bento-stat:hover .bento-icon {
    transform: translateY(-3px) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.18);
}

.bento-stat h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.bento-stat p {
    font-size: 0.93rem;
}

.section-reveal.visible .bento-card:hover,
.section-reveal.visible .skill-pillar:hover {
    transform: translateY(-5px);
}

.section-reveal.visible .timeline-card:hover {
    transform: translateX(4px);
}

/* SECTION COMPÉTENCES */
.skills-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.skill-pillar {
    min-width: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--crimson-accent), var(--gold-primary));
}

.skill-pillar:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.pillar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pillar-num {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pillar-icon {
    font-size: 1.5rem;
    color: var(--gold-primary);
    transition: transform var(--transition);
}

.skill-pillar:hover .pillar-icon {
    transform: translateY(-3px) rotate(5deg);
}

.skill-pillar h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.pillar-desc {
    font-size: 0.92rem;
    margin-bottom: 1.4rem;
}

.skill-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    padding: 0.38rem 0.7rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.skill-tags span:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.skill-tags span.tag-gold {
    background: rgba(197, 160, 89, 0.12);
    border-color: rgba(197, 160, 89, 0.35);
    color: var(--gold-light);
}

/* SECTION PROJETS (GRILLE 2x2 RESPONSIVE) */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.project-filter {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font: 600 0.84rem var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
}

.project-filter:hover,
.project-filter[aria-pressed="true"] {
    border-color: var(--gold-primary);
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-light);
}

.project-filter:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 3px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card[hidden] {
    display: none;
}

.project-filter-empty {
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.project-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0d0b10;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-media img {
    transform: scale(1.04);
}

/* Bannières visuelles pour Optima Shop et DoudouTech Studio */
.project-banner-optima {
    background: radial-gradient(circle at top right, rgba(197, 160, 89, 0.35), rgba(140, 29, 46, 0.35), #0B090E 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

.project-banner-agency {
    background: radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.22), rgba(140, 29, 46, 0.38), #0B090E 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

.banner-overlay-content {
    border: 1px solid rgba(197, 160, 89, 0.35);
    background: rgba(9, 8, 10, 0.75);
    backdrop-filter: blur(8px);
    padding: 1.4rem 2rem;
    border-radius: var(--radius-md);
    width: 85%;
    max-width: 340px;
}

.banner-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.14);
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    margin-bottom: 0.5rem;
}

.banner-overlay-content h4 {
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.banner-overlay-content p {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold-primary);
}

.project-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--gold-primary);
    letter-spacing: 0.06em;
    margin-bottom: 0.45rem;
}

.project-body h3 {
    font-size: 1.28rem;
    margin-bottom: 0.75rem;
}

.project-body p {
    font-size: 0.93rem;
    margin-bottom: 1.3rem;
    flex-grow: 1;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}

.project-tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    padding: 0.28rem 0.6rem;
    background: rgba(140, 29, 46, 0.22);
    border: 1px solid rgba(140, 29, 46, 0.45);
    color: #F4D3D8;
    border-radius: 5px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* SECTION FORMATION & CERTIFICATIONS */
.education-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
}

.column-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--gold-light);
}

.timeline-clean {
    min-width: 0;
    border-left: 2px solid rgba(197, 160, 89, 0.3);
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.timeline-card {
    min-width: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    position: relative;
    overflow-wrap: anywhere;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: calc(-1.5rem - 7px);
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold-primary);
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--gold-primary);
    display: block;
    margin-bottom: 0.3rem;
}

.timeline-card h4 {
    font-size: 1.08rem;
    margin-bottom: 0.25rem;
}

.timeline-card .institution {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.timeline-card .desc {
    font-size: 0.88rem;
}

.cert-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cert-item {
    min-width: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.cert-item:hover {
    border-color: var(--gold-primary);
}

.cert-item i {
    font-size: 1.25rem;
    color: var(--gold-primary);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.cert-text h4 {
    font-size: 0.96rem;
    margin-bottom: 0.15rem;
}

.cert-text {
    min-width: 0;
}

.cert-text span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.profile-facts {
    margin-top: 1.4rem;
    padding: 1.3rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.profile-facts h4 {
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.profile-facts p {
    font-size: 0.88rem;
}

.profile-facts .skill-tags {
    margin-top: 0.85rem;
}

/* SECTION CONTACT */
.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.75rem;
}

.contact-left h2 {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    margin-bottom: 0.85rem;
}

.contact-left > p {
    margin-bottom: 1.8rem;
}

.contact-direct-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

a.contact-method:hover {
    border-color: var(--gold-primary);
}

.method-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(197, 160, 89, 0.14);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-details {
    min-width: 0; /* Permet le retour à la ligne des longs emails sur petits écrans */
}

.method-details span {
    display: block;
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.method-details strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

/* Formulaire */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.field-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

#form-status {
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

/* FOOTER */
footer {
    padding: 2.2rem 0;
    background: #060507;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-brand p {
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

/* ANIMATION REVEAL */
.section-reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-reveal .bento-card,
.section-reveal .skill-pillar,
.section-reveal .timeline-card,
.section-reveal .cert-item,
.section-reveal .profile-facts {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease, border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.section-reveal.visible .bento-card,
.section-reveal.visible .skill-pillar,
.section-reveal.visible .timeline-card,
.section-reveal.visible .cert-item,
.section-reveal.visible .profile-facts {
    opacity: 1;
    transform: translateY(0);
}

.section-reveal.visible .bento-card:nth-child(2),
.section-reveal.visible .skill-pillar:nth-child(2),
.section-reveal.visible .timeline-card:nth-child(2),
.section-reveal.visible .cert-item:nth-child(2) {
    transition-delay: 100ms;
}

.section-reveal.visible .bento-card:nth-child(3),
.section-reveal.visible .skill-pillar:nth-child(3),
.section-reveal.visible .timeline-card:nth-child(3),
.section-reveal.visible .cert-item:nth-child(3) {
    transition-delay: 180ms;
}

.section-reveal.visible .timeline-card:nth-child(4),
.section-reveal.visible .cert-item:nth-child(4) {
    transition-delay: 240ms;
}

.section-reveal.visible .timeline-card:nth-child(5),
.section-reveal.visible .cert-item:nth-child(5) {
    transition-delay: 300ms;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .section-reveal,
    .section-reveal .bento-card,
    .section-reveal .skill-pillar,
    .section-reveal .timeline-card,
    .section-reveal .cert-item,
    .section-reveal .profile-facts {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   MEDIA QUERIES : ADAPTATION PARFAITE SUR TOUS LES ÉCRANS
   ========================================================================== */

/* Tablettes & Petits Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-visual-column {
        order: -1;
    }

    .portrait-frame {
        max-width: 310px;
    }

    .about-bento,
    .skills-matrix,
    .projects-grid,
    .education-grid,
    .contact-box {
        grid-template-columns: 1fr;
    }

    .bento-main {
        grid-row: auto;
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 600px) {
    .welcome-screen {
        padding: 0.5rem;
    }

    .welcome-stage {
        width: min(660px, calc((100dvh - 2rem) * 1.378));
    }

    .welcome-laptop {
        transform: translateX(calc(50vw - 33%));
    }

    .welcome-avatar-column {
        gap: 5px;
    }

    .welcome-avatar {
        width: clamp(42px, 12vw, 62px);
    }

    .welcome-wink {
        font-size: 0.72em;
    }

    .welcome-presence {
        font-size: 6px;
    }

    .welcome-eyebrow {
        margin-bottom: 4px;
        font-size: 6px;
    }

    .welcome-copy h1 {
        margin-bottom: 5px;
        font-size: clamp(16px, 5.3vw, 22px);
    }

    .welcome-copy > p {
        margin-bottom: 5px;
        font-size: clamp(7px, 2.25vw, 9px);
    }

    .welcome-specialties {
        gap: 3px;
        margin-bottom: 5px;
    }

    .welcome-specialties span {
        padding: 0.25em 0.45em;
        font-size: 5px;
    }

    .welcome-enter {
        padding: 0.5em 0.7em;
        font-size: clamp(7px, 2.1vw, 9px);
    }

    .welcome-credit {
        position: fixed;
        right: auto;
        bottom: 0.4rem;
        left: 50%;
        margin: 0;
        white-space: nowrap;
        transform: translateX(-50%);
        font-size: 0.55rem;
    }
}

/* Smartphones & Tablettes Portrait (<= 768px) */
@media (max-width: 768px) {
    .section-padding {
        padding: 72px 0;
    }

    .burger {
        display: block;
    }

    .nav-controls {
        position: relative;
        z-index: 1002;
    }

    .audio-toggle {
        width: 42px;
        height: 42px;
        justify-content: center;
        padding: 0;
    }

    .audio-toggle span {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: #121016;
        border-left: 1px solid var(--border-subtle);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
        z-index: 1001;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.05rem;
    }

    .burger.toggle .line1 { transform: rotate(-45deg) translate(-4px, 5px); }
    .burger.toggle .line2 { opacity: 0; }
    .burger.toggle .line3 { transform: rotate(45deg) translate(-4px, -5px); }

    .hero-section {
        padding-top: calc(var(--nav-height) + 28px);
        padding-bottom: 50px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .meta-divider {
        display: none;
    }

    .hero-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .bento-card,
    .skill-pillar,
    .project-body,
    .contact-box {
        padding: 1.4rem;
    }

    .floating-actions {
        right: 1rem;
        bottom: 1rem;
        gap: 0.5rem;
    }
}

/* Petits Smartphones (<= 480px) */
@media (max-width: 480px) {
    .quick-contact {
        width: 3rem;
        height: 3rem;
        justify-content: center;
        padding: 0;
    }

    .back-to-top,
    .back-to-top.visible {
        height: 3rem;
        width: 3rem;
        flex-basis: 3rem;
    }

    .quick-contact-label {
        display: none;
    }

    .container {
        padding: 0 1.1rem;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }

    .hero-title {
        font-size: 1.95rem;
    }

    .hero-meta {
        grid-template-columns: 1fr;
    }

    .portrait-border-offset {
        display: none; /* Évite tout débordement horizontal sur très petit écran */
    }

    .portrait-badge {
        margin-left: 0;
        margin-right: 0;
    }

    .project-links {
        flex-direction: column;
    }

    .project-links .btn {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-screen,
    .welcome-stage,
    .welcome-avatar-column,
    .welcome-avatar img,
    .welcome-avatar-halo,
    .welcome-wink,
    .welcome-screen-face,
    .welcome-progress span,
    .welcome-screen.is-closing,
    .welcome-screen.is-closing .welcome-stage {
        animation: none;
    }

    .welcome-screen.is-closing {
        opacity: 0;
        visibility: hidden;
    }

    .welcome-progress span {
        transform: scaleX(1);
    }
}
