/* ============================================
   Portfolio BTS SIO SISR — Styles
   ============================================ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --accent-dark: #0284c7;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(56, 189, 248, 0.12);
    --border-hover: rgba(56, 189, 248, 0.35);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Sora', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === BACKGROUND EFFECTS === */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
    z-index: -1;
    animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 3%); }
}

/* === NOISE TEXTURE === */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* === HEADER / NAV === */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--text-muted);
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

.nav-links a, .nav-dropdown > span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-links a:hover, .nav-dropdown:hover > span,
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > span::after {
    content: '▾';
    font-size: 0.65rem;
    margin-left: 0.15rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover > span::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    font-size: 0.825rem;
    border-radius: 8px;
}

.dropdown-menu a:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

/* === MOBILE MENU === */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === SECTIONS === */
.page-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.5s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
}

/* === QUI SUIS-JE (ACCUEIL) === */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.hero-text { animation: fadeUp 0.6s ease 0.1s both; }

.hero-name {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-name .accent { color: var(--accent); }

.hero-role {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    background: rgba(56, 189, 248, 0.05);
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeUp 0.6s ease 0.3s both;
}

.avatar-frame {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    padding: 4px;
    position: relative;
}

.avatar-frame::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px dashed var(--border);
    animation: spin 30s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.08);
}

.info-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.info-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.info-card p {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* === PARCOURS / CV === */
.timeline {
    position: relative;
    padding-left: 2.5rem;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.5s ease both;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.65rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-org {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cv-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.cv-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

/* === BTS SIO SECTION === */
.bts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.bts-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
    cursor: default;
}

.bts-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.1);
}

.bts-card-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: var(--accent-glow);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.bts-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bts-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === PROCEDURES === */
.procedures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.procedure-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.procedure-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.procedure-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.1);
}

.procedure-card:hover::before {
    opacity: 1;
}

.procedure-number {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.procedure-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.procedure-card p {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.procedure-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.procedure-tag {
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

/* === ÉPREUVE === */
.epreuve-content {
    margin-top: 2rem;
}

.epreuve-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.epreuve-block h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.epreuve-block p, .epreuve-block li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.epreuve-block ul {
    list-style: none;
    padding-left: 0;
}

.epreuve-block li {
    padding: 0.35rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.epreuve-block li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* === VEILLE SANITAIRE === */
.veille-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.veille-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.veille-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.1);
}

.veille-card-header {
    padding: 1.5rem 1.5rem 0;
}

.veille-card-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.veille-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.veille-card p {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0 1.5rem 1.5rem;
}

/* === A VOIR === */
.a-voir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

/* === FOOTER === */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: transparent;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        min-height: auto;
        padding-top: 2rem;
    }

    .hero-visual { order: -1; }
    .hero-tags { justify-content: center; }
    .avatar-frame { width: 200px; height: 200px; }
    .info-cards { grid-template-columns: 1fr; }
}
