/* ==========================================================================
   Portfolio v2 : composants ajoutés en septembre 2026
   Garde l'identité existante : fond sombre, Geologica, blanc et gris.
   ========================================================================== */

:root {
    --ink: #ffffff;
    --muted: #cdcdcd;
    --faint: #8a96a3;
    --line: rgba(255, 255, 255, 0.12);
    --panel: rgba(255, 255, 255, 0.04);
    --panel-strong: rgba(255, 255, 255, 0.08);
    --radius: 10px;
}

/* Le texte doit pouvoir être sélectionné : un recruteur copie un e-mail, un nom de techno. */
html, body {
    user-select: auto;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------ Accueil */

.heroKicker {
    display: block;
    margin: 0 0 1.5rem 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
    text-align: start;
}

.featuredBadge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.projectMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1.25rem 0;
    padding: 0;
    list-style: none;
}

.projectMeta li {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.tagList {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag {
    padding: 0.35rem 0.75rem;
    background: var(--panel-strong);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--ink);
}

.rightSide .tagList {
    margin-bottom: 1.5rem;
}

.projectActions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
}

/* ------------------------------------------------------------ Détail projet */

.pd {
    position: relative;
    z-index: 9;
    max-width: 1100px;
    margin: 0 auto;
    padding: 7rem 5.5% 6rem;
}

.pd-back {
    display: inline-block;
    margin-bottom: 2.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.pd-hero {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0f1213;
}

.pd-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-head {
    margin: 2.5rem 0 0;
}

.pd-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
    text-wrap: balance;
}

.pd-tagline {
    max-width: 60ch;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.35rem);
    line-height: 1.45;
}

.pd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.pd-section + .pd-section {
    margin-top: 2.5rem;
}

.pd-label {
    margin: 0 0 1rem;
    color: var(--faint);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pd-text {
    max-width: 65ch;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.pd-list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pd-list li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--muted);
    line-height: 1.6;
}

.pd-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 0.55rem;
    height: 1px;
    background: var(--ink);
}

.pd-aside {
    align-self: start;
    padding: 1.75rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.pd-aside .pd-section + .pd-section {
    margin-top: 2rem;
}

.pd-facts {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.pd-facts div {
    display: grid;
    gap: 0.2rem;
}

.pd-facts dt {
    color: var(--faint);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pd-facts dd {
    margin: 0;
    color: var(--ink);
}

.pd-links {
    display: grid;
    gap: 0.6rem;
}

.linkBtn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.linkBtn:hover {
    background: var(--panel-strong);
    border-color: rgba(255, 255, 255, 0.3);
}

.linkBtn span:last-child {
    color: var(--faint);
}

.pd-video {
    margin-top: 3.5rem;
}

.pd-video video {
    display: block;
    width: 100%;
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.pd-screens {
    margin-top: 3.5rem;
}

/* Deux colonnes quand la place le permet, une seule sur téléphone, sans media query. */
.pd-screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1.5rem;
}

.pd-screens figure {
    margin: 0;
}

.pd-screens img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    background: #0f1213;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.pd-screens figcaption {
    margin-top: 0.6rem;
    color: var(--faint);
    font-size: 0.85rem;
}

.pd-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.pd-nav a {
    display: grid;
    gap: 0.3rem;
    max-width: 45%;
}

.pd-nav a.pd-next {
    margin-left: auto;
    text-align: right;
}

.pd-nav small {
    color: var(--faint);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ------------------------------------------------------- À propos : parcours */

.sectionPath {
    position: relative;
    z-index: 9;
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 5.5%;
}

.sectionPath h2 {
    margin: 0 0 2.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
}

.timeline {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline > li {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 2rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--line);
}

.timeline > li:last-child {
    border-bottom: 1px solid var(--line);
}

.tl-when {
    color: var(--faint);
    font-size: 0.95rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.tl-when span {
    display: block;
    color: var(--muted);
}

.tl-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.tl-org {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.tl-body {
    margin-top: 1rem;
}

.tl-body .pd-list li {
    font-size: 0.98rem;
}

.tl-body p {
    max-width: 65ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 1024px) {
    .pd-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Les visuels projet sont plus larges que 16/9 : recadrés, ils perdaient le logo sur les
       côtés. Sous 1024 px, l'image s'affiche entière, à sa hauteur naturelle. */
    .pd-hero {
        aspect-ratio: auto;
    }

    .pd-hero img {
        height: auto;
    }

    .timeline > li {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .pd-nav a {
        max-width: 48%;
    }

    /* Titre posé sur la carte 3D : le <pre> ne revient pas à la ligne, il doit tenir dans la carte
       (18rem sur tablette, 13rem sur téléphone) jusqu'aux titres de 16 caractères. */
    .textOverlay .midMiddleBaseSize {
        font-size: clamp(1.1rem, 0.8rem + 1.2vw, 1.6rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html, body {
        scroll-behavior: auto;
    }

    .linkBtn {
        transition: none;
    }
}

/* ------------------------------------------------- Accueil : phrase d'accroche */

/* Taille propre plutôt que .textBaseSize, qui passe à 2rem sous 1024 px et fait déborder l'accueil. */
.heroLead {
    max-width: 46ch;
    margin: 2.5rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.5;
    text-align: start;
}

/* --------------------------------------------------- À propos : compétences */

.skillGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.skillCard {
    padding: 1.75rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.skillCard h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.skillCard p {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.skillList {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skillList li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: var(--panel-strong);
    border-radius: 6px;
    font-size: 0.9rem;
}

.skillList img {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

.sectionContact p {
    max-width: 60ch;
    margin-inline: auto;
    line-height: 1.6;
}

.contactLinks {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

/* ------------------------------------------------- Tablette et téléphone */
/* Sous 1024 px, style.css empile les cartes projet en 40/20/40 % de hauteur : sans ces
   règles, le contenu débordait des sections pleine hauteur. */

@media (max-width: 1024px) {
    .skillGrid {
        grid-template-columns: 1fr;
    }

    .sectionWho .descriptionWho.textBaseSize,
    .sectionWho .aboutWho.smallBaseSize,
    .sectionWorks .stickyTitle .textBaseSize,
    .sectionContact .smallBaseSize,
    .more .textBaseSize {
        font-size: 1.1rem;
        line-height: 1.45;
    }

    /* Cartes projet : l'essentiel seulement, la stack complète est sur la page du projet.
       Les trois blocs prennent leur hauteur réelle et se centrent autour d'une carte réduite. */
    .project {
        justify-content: center;
        gap: 1.5rem;
    }

    .leftSide,
    .middleSide,
    .rightSide {
        height: auto;
    }

    .pre-container {
        width: 18rem;
        height: 18rem;
    }

    /* border-box : sans lui, width 100 % plus le padding coupait le texte à droite. */
    .rightSide {
        box-sizing: border-box;
        gap: 0.25rem;
        padding: 0 1.5rem;
        text-align: center;
    }

    .rightSide .title.midMiddleBaseSize {
        font-size: 1.6rem;
    }

    .rightSide .projectMeta,
    .projectActions {
        justify-content: center;
    }

    .rightSide .projectMeta {
        margin: 0.5rem 0 0.75rem;
    }

    .rightSide .descriptionProject.smallBaseSize {
        padding: 0;
        font-size: 1rem;
        line-height: 1.45;
    }

    .rightSide .tagList {
        display: none;
    }

    .projectActions {
        margin-top: 1rem;
    }

    .rightSide .buttonProject.smallBaseSize,
    .projectNext.smallBaseSize,
    .projectNext .smallBaseSize {
        font-size: 1rem;
    }
}

/* ------------------------------------------------------------ Petit écran */
/* basic-rule.css grossit aussi .titleBaseSize sous 1024 px : trop pour un téléphone. */

@media (max-width: 640px) {
    .heroKicker {
        margin-bottom: 1rem;
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    /* À 10.5vw, « PRODUCTION. » tient encore sur une ligne à 375 px sans être coupé. */
    main .wrapper .title.titleBaseSize {
        font-size: 10.5vw;
    }

    .heroLead {
        margin-top: 1.5rem;
    }

    /* Titre de la page À propos : à 61 px, « DÉVELOPPEUR » se coupait en plein mot. */
    .wrapper h1.title.middleBaseSize {
        font-size: 10vw;
        text-wrap: balance;
    }

    .pre-container {
        width: 13rem;
        height: 13rem;
    }
}

/* ------------------------------------------------------------------ En-tête */
/* Les liens ne se coupent plus en plein mot. Sous 1024 px, ils gardent une taille de menu. */

header a {
    white-space: nowrap;
}

@media (max-width: 1024px) {
    header ul {
        margin: 1rem 5% 0;
    }

    header .rightMenu {
        gap: 1.25rem;
        align-items: center;
    }

    header .textBaseSize {
        font-size: 1.05rem;
    }

    header .flagCountry {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 400px) {
    header ul {
        margin: 0.9rem 4% 0;
    }

    header .rightMenu {
        gap: 0.75rem;
    }

    header .textBaseSize {
        font-size: 0.9rem;
    }

    header .flagCountry {
        width: 1.6rem;
        height: 1.6rem;
    }
}

/* ------------------------------------------------------ Sections plein écran */
/* min-height plutôt que height : le contenu ne déborde plus sur la section suivante quand
   l'écran est court, et 100svh suit la barre d'adresse des navigateurs mobiles. Le padding
   garde le contenu hors de l'en-tête fixe et de la flèche du bas. */

main,
.sectionWho,
.sectionContact {
    box-sizing: border-box;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
}

/* Fond opaque sous l'image floutée : tant qu'elle charge, le titre « Projets » ne transparaît
   plus à travers la carte. */
.projectWrapper {
    height: 100vh;
    height: 100svh;
    background-color: #191d1e;
}

@media (min-width: 1025px) {
    .leftSide,
    .rightSide {
        height: 100vh;
        height: 100svh;
    }
}

/* Le titre « Projets » se colle sous l'en-tête, plus derrière. */
.sectionWorks .stickyTitle {
    top: 5.5rem;
}

/* Carte projet : bord discret et coins arrondis, à la place du cadre noir de 3 px. */
.css-only pre {
    border-radius: var(--radius);
}

.middleSide img {
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ------------------------------------------------------------------ Contact */

.contactLead {
    max-width: 60ch;
    margin: 1.5rem auto 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

.contactActions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btnPrimary {
    background: var(--ink);
    color: #191d1e;
}

.btnPrimary:hover {
    background: #e4e4e4;
}

.btnGhost {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--ink);
}

.btnGhost:hover {
    background: var(--panel-strong);
    border-color: rgba(255, 255, 255, 0.55);
}

.contactLinks {
    gap: 1.75rem;
    margin-top: 1.75rem;
}

.contactLinks a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.contactLinks a:hover {
    color: var(--ink);
}

@media (max-width: 400px) {
    .btnGhost {
        font-size: 0.9rem;
    }
}

/* ---------------------------------------------------------- Moins d'animation */

@media (prefers-reduced-motion: reduce) {
    .arrowMore:hover img,
    .arrowMore:hover span {
        animation: none;
    }

    .css-only pre,
    .btn,
    .contactLinks a {
        transition: none;
    }
}
