/* ══════════════════════════════════════════════
   VARIABLES — Thème teal/cyan (inspiré référence)
══════════════════════════════════════════════ */
:root {
    --bg:            #0d1117;
    --bg-card:       #161b22;
    --bg-card-hover: #1c232d;
    --accent:        #0bc5ea;
    --accent-dim:    rgba(11, 197, 234, 0.12);
    --accent-glow:   rgba(11, 197, 234, 0.25);
    --text:          #e6edf3;
    --text-muted:    #7d8590;
    --border:        #21262d;
    --mono:          'Fira Code', monospace;
    --sans:          'Inter', sans-serif;
    --nav-h:         62px;
    --radius:        10px;
    --ease:          0.22s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Canvas fond ─────────────────────────────── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Wrapper ─────────────────────────────────── */
.site-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem 4rem;
}

/* ══════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    gap: 1.5rem;
    background: rgba(13, 17, 23, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    margin: 0 -2.5rem;
    padding: 0 2.5rem;
}

.logo {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.logo-bracket { color: var(--accent); font-weight: 700; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.15rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    transition: color var(--ease), background var(--ease);
}
.nav-link:hover  { color: var(--text); background: rgba(255,255,255,.04); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }

.nav-spacer { flex: 1; }

.nav-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--sans);
    transition: color var(--ease);
}
.nav-icon-link:hover { color: var(--accent); }

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-family: var(--mono);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--ease), color var(--ease);
    white-space: nowrap;
}
.cv-btn:hover { background: var(--accent); color: var(--bg); }

/* ══════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════ */
.page-section {
    padding-top: 3rem;
}
.last-section { padding-bottom: 2rem; }

.section-header-block { margin-bottom: 1.75rem; }

.section-tag {
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
    opacity: 0.8;
    letter-spacing: 0.04em;
}

.section-title {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}
.section-title .slash { color: var(--accent); }

.section-sub {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.subsection-title {
    font-size: 1.05rem;
    margin: 2.2rem 0 1rem;
}
.subsection-title .hash { color: var(--accent); }

/* ── Séparateurs ─────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 3rem;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divider-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--accent);
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════ */
.hero-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem;
}

/* Code déco tags */
.code-deco {
    position: absolute;
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--accent);
    opacity: 0.12;
    user-select: none;
    pointer-events: none;
}
.code-deco--1 { top: 8%;  left: 2%;  font-size: 1.2rem; }
.code-deco--2 { top: 22%; left: 5%;  font-size: 0.85rem; }
.code-deco--3 { bottom: 30%; left: 1%; font-size: 1rem; }
.code-deco--4 { bottom: 18%; left: 8%; font-size: 0.75rem; }

/* Texte gauche */
.hero-left {
    flex: 1;
    min-width: 0;
    z-index: 2;
}

.hero-greeting {
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-family: var(--sans);
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}
.hero-name .accent { color: var(--accent); }

.hero-role {
    font-family: var(--mono);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-sub {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.hero-sub .mono { color: var(--accent); font-family: var(--mono); font-size: 0.78rem; }

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 7px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.82rem;
    padding: 0.6rem 1.25rem;
    border-radius: 7px;
    border: 1px solid var(--border);
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat { text-align: center; }
.stat-num {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    display: block;
    font-family: var(--sans);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
}

.stat-sep {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Photo droite */
.hero-right {
    position: relative;
    flex: 0 0 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11,197,234,0.18) 0%, transparent 70%);
    z-index: 0;
}

.hero-photo {
    position: relative;
    z-index: 1;
    width: 300px;
    height: 360px;
    object-fit: cover;
    object-position: top center;
    border-radius: 16px;
    filter: drop-shadow(0 12px 32px rgba(0,0,0,.6));
    border: 1px solid var(--border);
}

/* Badges tech flottants */
.tech-badge {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.72rem;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 2;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    animation: float 4s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.tech-badge i { color: var(--accent); }

.tb-1 { top: 10%;  left: -10%; animation-delay: 0s; }
.tb-2 { top: 28%;  right: -8%; animation-delay: 0.8s; }
.tb-3 { top: 55%;  left: -12%; animation-delay: 1.6s; }
.tb-4 { bottom: 22%; right: -5%; animation-delay: 2.4s; }
.tb-5 { bottom: 8%;  left: 0%;  animation-delay: 0.4s; }

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

/* Skills bar (sous le hero) */
.skills-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.skill-pill {
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.73rem;
    color: var(--text-muted);
    transition: border-color var(--ease), color var(--ease);
    cursor: default;
}
.skill-pill:hover { border-color: var(--accent); color: var(--text); }

/* ══════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════ */
.about-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}

.about-photo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
}
.about-photo-wrap::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11,197,234,0.18) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.about-photo {
    position: relative;
    z-index: 1;
    width: 180px;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
    border: 1px solid var(--border);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.5));
}

.about-quick-info {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.qi-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.qi-item i { color: var(--accent); width: 14px; text-align: center; opacity: 0.8; }
.qi-link { color: var(--accent); text-decoration: none; }
.qi-link:hover { text-decoration: underline; }

.text-paragraph {
    font-family: var(--sans);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 1.1rem;
}
.text-paragraph strong { color: var(--text); font-weight: 600; }

/* ── Parcours 2 colonnes ── */
.parcours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 0.5rem;
}

.parcours-col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
}

/* ── Skills Showcase avec cartes & jauges ── */
.skills-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.skill-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(11,197,234,0.08);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(11,197,234,0.12);
    border: 1px solid rgba(11,197,234,0.25);
    color: var(--accent);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.skill-card-header h4 {
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}
.skill-card-header p {
    font-family: var(--sans);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.skill-simple-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.2rem 0;
}

.skill-simple-list li {
    font-family: var(--sans);
    font-size: 0.81rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.skill-simple-list li i {
    color: var(--accent);
    font-size: 0.72rem;
    margin-top: 0.25rem;
    opacity: 0.85;
}

.skill-simple-list li strong {
    color: var(--text);
    font-weight: 600;
}

.skill-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
}

.mini-tag {
    font-size: 0.68rem;
    font-family: var(--mono);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.skill-card:hover .mini-tag {
    border-color: rgba(11,197,234,0.3);
    color: var(--text);
}


/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border);
    position: relative;
}

.timeline-item {
    position: relative;
    padding: 0 0 2rem 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.tl-dot {
    position: absolute;
    left: -8px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
}
.tl-dot--done { background: var(--accent); border-color: var(--accent); }

.tl-date {
    font-size: 0.72rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
    font-family: var(--mono);
}
.tl-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
    font-family: var(--sans);
}
.tl-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--sans);
}

/* ══════════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.project-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 1.4rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(11,197,234,0.1);
}

.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-icon {
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0.6;
}

.tech-stack {
    font-size: 0.68rem;
    color: var(--accent);
    opacity: 0.75;
    font-family: var(--mono);
    text-align: right;
    line-height: 1.5;
}

.project-card h3 {
    font-size: 1rem;
    color: var(--text);
    font-family: var(--sans);
    font-weight: 600;
}
.project-card p {
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.project-badge {
    align-self: flex-start;
    font-size: 0.66rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    font-family: var(--mono);
    opacity: 0.7;
}

/* Small projects grid */
.small-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.small-project-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform var(--ease), border-color var(--ease);
}
.small-project-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.spc-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-dim);
    border: 1px solid rgba(11,197,234,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.95rem;
}

.small-project-content h3 {
    font-size: 0.85rem;
    color: var(--text);
    font-family: var(--sans);
    font-weight: 600;
    margin: 0.5rem 0 0.35rem;
}
.small-project-content p {
    font-family: var(--sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.small-project-content .tech-stack {
    text-align: left;
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(11,197,234,.08);
}

.cc-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-dim);
    border: 1px solid rgba(11,197,234,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.cc-info { flex: 1; }
.cc-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--sans);
    margin-bottom: 0.15rem;
}
.cc-value {
    font-size: 0.82rem;
    color: var(--text);
    font-family: var(--sans);
    font-weight: 500;
}

.cc-arrow { color: var(--text-muted); font-size: 0.7rem; flex-shrink: 0; }

/* Carte Leaflet */
.contact-right {}

.map-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-family: var(--sans);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#map {
    width: 100%;
    height: 360px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* Surcharge Leaflet pour dark mode */
.leaflet-container { background: var(--bg-card) !important; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1050px) {
    .hero-wrapper        { flex-direction: column; min-height: auto; padding-top: 4rem !important; }
    .hero-right          { order: -1; flex: none; width: 100%; max-width: 300px; align-self: center; }
    .about-layout        { grid-template-columns: 1fr; }
    .parcours-grid       { grid-template-columns: 1fr; }
    .skills-showcase     { grid-template-columns: 1fr; }
    .projects-grid       { grid-template-columns: repeat(2, 1fr); }
    .small-projects-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-layout      { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .site-wrapper        { padding: 0 1.25rem 5rem; }
    .navbar              { margin: 0 -1.25rem; padding: 0 1.25rem; }
    .projects-grid       { grid-template-columns: 1fr; }
    .small-projects-grid { grid-template-columns: 1fr; }
    .skills-showcase     { grid-template-columns: 1fr; }
    .hero-name           { font-size: 2.1rem; }
    .section-title       { font-size: 1.7rem; }
    .nav-icon-link       { display: none; }
    .tb-1, .tb-2, .tb-3, .tb-4, .tb-5 { display: none; }
    #map                 { height: 280px; }
}

/* Scrollbar */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }