/* =========================================================================
   portfolio.css — styles propres à /portfolio.
   Repris de votre page existante, débarrassé de ce qui était dupliqué :
   variables de thème, reset et navbar vivent désormais dans base.css et
   shared-nav.css.
   Les tokens locaux (--modal-bg, --overlay-bg) restent ici : ils ne servent
   qu'à cette page.
   ========================================================================= */

:root {
    --modal-bg:   rgba(255, 255, 255, 0.95);
    --overlay-bg: rgba(0, 0, 0, 0.4);
}
:root.dark-mode,
body.dark-mode {
    --modal-bg:   rgba(28, 28, 30, 0.95);
    --overlay-bg: rgba(0, 0, 0, 0.7);
}

/* Votre CSS ciblait `section { padding: 80px 5% }` : un sélecteur d'élément
   nu, qui s'appliquait aussi aux sections des autres pages une fois les
   feuilles mutualisées. On le scope. */
.pf-section {
    padding: 80px var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 2rem;
}

/* --- Hero ---------------------------------------------------------------- */
.hero-section {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: calc(var(--nav-height) + 60px) var(--gutter) 80px;
    max-width: var(--maxw);
    margin: 0 auto;
}
.hero-text { flex: 1; }
.hero-text h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.10);
}

/* --- Parcours ------------------------------------------------------------ */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
    margin-left: 15px;
    position: relative;
    list-style: none;
}
.timeline-item { margin-bottom: 3rem; position: relative; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-color);
}
.timeline-date { font-size: 0.9rem; color: var(--accent-color); font-weight: 600; margin-bottom: 0.5rem; }
.timeline-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.timeline-desc { color: var(--text-secondary); }

/* --- Projets (carousel) -------------------------------------------------- */
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel-item {
    flex: 0 0 calc(80% - 20px);
    max-width: 400px;
    scroll-snap-align: start;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    /* C'est un <button> désormais : on neutralise les styles natifs. */
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
    font: inherit;
    color: inherit;
}
.carousel-item:hover { transform: scale(1.02); }
.carousel-item img { width: 100%; height: 250px; object-fit: cover; }
/* Un <button> ne peut pas contenir de <h3> (contenu de phrasé uniquement) :
   le titre est un <span> mis en forme comme un titre. */
.carousel-info  { padding: 1.5rem; display: block; }
.carousel-title { display: block; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.carousel-hint  { display: block; color: var(--text-secondary); font-size: 0.9rem; }

/* --- Modal --------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--modal-bg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-color);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}
.close-btn:hover { background: var(--submenu-hover); }

#modal-img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; }
#modal-title { font-size: 1.8rem; margin-bottom: 1rem; padding-right: 2.5rem; }
#modal-desc { color: var(--text-secondary); }

/* --- Compétences --------------------------------------------------------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-category {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.skill-category h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.skill-tag:hover { background: var(--accent-color); color: #FFF; transform: translateY(-2px); }

/* --- Contact ------------------------------------------------------------- */
.contact-section { text-align: center; margin-bottom: 80px; }
.contact-section .section-title { text-align: center; }
.contact-intro { margin-bottom: 2rem; color: var(--text-secondary); }

.contact-btn {
    display: inline-block;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.contact-btn:hover { transform: scale(1.05); }

.contact-form { display: grid; gap: 1rem; max-width: 560px; margin: 0 auto; text-align: left; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea {
    font: inherit;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-color);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { color: var(--text-secondary); font-size: 0.85rem; }
.form-status { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 1.5rem; }
.form-status.ok  { background: rgba(59, 165, 92, 0.12); color: var(--success-color); }
.form-status.err { background: rgba(255, 45, 85, 0.12); color: var(--hot-color); }
.honeypot { position: absolute; left: -9999px; }

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: calc(var(--nav-height) + 40px);
    }
    .pf-section { padding: 60px var(--gutter); }
    .carousel-item { flex: 0 0 85%; }
}

/* Liste sans puce ni filet, utilisée par la page Confidentialité. */
.plain-list { list-style: none; }
.plain-list li { margin-bottom: 1.5rem; }
.plain-list h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.plain-list p { color: var(--text-secondary); }
.plain-list code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--submenu-hover);
    padding: 2px 6px;
    border-radius: 4px;
}
