/* VARIABLES CSS -->
 https://www.youtube.com/watch?v=pi-jnnNFTiQ 
 https://developer.mozilla.org/fr/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties */

:root {
    --color-bg: rgb(18 18 18);
    --color-text: rgb(207, 201, 201);
    --color-white: #ffffff;
    --color-highlight: rgb(255, 46, 136);
    --color-highlight-dark: rgba(255, 255, 255, 0.3);
    --color-navbar: rgb(18 18 18);
    --color-card-bg: aliceblue;
    --color-description-bg: #9cb9dc;
    --color-skill-bg: #3c3c3c;

    --font-primary: 'Inter', sans-serif;
    --font-title: 'Clash Display', sans-serif;

    --radius-large: 35px;
    --radius-medium: 18px;
    --transition-fast: 0.3s ease-in-out;
    --transition-smooth: 0.5s ease;

    --space-small: 1vh;
    --space-medium: 5vh;

    /* tailles UI carrousel */
    --ctrl-size: 32px;
    --dot: 7px;
}

/* BASIQUES */
* {
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    line-height: 1.2;
    font-family: var(--font-primary);
    background-color: var(--color-bg);
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

.hidden {
    display: none !important;
}

/* TEXTES */
p {
    color: var(--color-text);
    font-size: 1.1em;
    text-align: center;
}

h1 {
    text-align: center;
    font-size: 5em;
    font-weight: bold;
    font-family: var(--font-title);
    color: var(--color-white);
    z-index: 1;
}

h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--color-highlight);
    position: relative;
    display: inline-block;
    animation: brillance 3s linear infinite;
    /* Pour éviter que le texte "saute" pendant l'animation */
    -webkit-text-fill-color: transparent;
}

@keyframes brillance {

    /* 
    Obligé d'utiliser les % (je crois), car en utilisant seulement "from" et "to"
    ça faisait un effet de "cassure" à la fin de l'animation, ce qui la rendait moins belle. 
    */
    0% {
        -webkit-text-stroke-color: var(--color-highlight);
        filter: brightness(1);
    }

    50% {
        -webkit-text-stroke-color: rgb(241, 113, 169);
        filter: brightness(1.05);
        transform: scale(1.01);
    }

    100% {
        -webkit-text-stroke-color: var(--color-highlight);
        filter: brightness(1);
    }
}

@keyframes boutonZoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1.1);
    }
}

h2 {
    font-size: 3em;
    font-family: var(--font-title);
}

h2 span,
span {
    text-transform: uppercase;
    color: var(--color-highlight);
}

#experiences h2 span {
    color: #0b0b0b00;
    -webkit-text-stroke: 1px white;
}

/* ESPACEMENTS */
.smallSpaceTop {
    margin-top: var(--space-small);
}

.spaceTop {
    margin-top: var(--space-medium);
}

.spaceTopPadding {
    padding-top: var(--space-medium);
}

.smallSpaceTopPadding {
    padding-top: var(--space-small);
}

/* FLEX */
.flex {
    display: flex;
}

/* HEADER + NAVBAR */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20vh;
    padding: 0 5%;
    background-color: var(--color-navbar);
    font-family: var(--font-title);

}

.menu-btn {
    display: none;
}

/* Flowbite, bouton burger apparaît que sur mobile */


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

nav .titre {
    font-size: 1.5em;
    color: var(--color-white);
}

nav .titre span {
    color: var(--color-highlight);
}

nav ul {
    display: flex;
    flex-direction: row;
    gap: 30px;
    list-style: none;
}

nav ul li a {
    color: var(--color-text);
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.25s ease;
}

nav ul li a:hover {
    color: var(--color-highlight);
}




/* INTRO SECTION */
.intro {
    background-color: var(--color-navbar);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    color: var(--color-text);
    justify-content: center;
    align-items: center;
}

.intro .description {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.intro p {
    width: 35%;
}

.intro a {
    background: linear-gradient(to bottom right, var(--color-highlight), var(--color-highlight-dark));
    color: var(--color-white);
    padding: 15px 40px;
    border-radius: var(--radius-medium);
    font-size: 0.9em;
    transition: all var(--transition-smooth);
    text-align: center;
    animation: boutonZoom 1s linear infinite alternate;
    /* L'utilisation de alternate me permet de ne pas
     casser l'animation à la fin, et de jouer l'animation dans le sens inverse jusqu'à la recommencer */
}

.intro a:hover {
    background-color: rgba(244, 194, 194, 0.8);
    animation: boutonZoom 1s linear;
}

/* Portrait header */

.portrait-container {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.95;
}

.portrait {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.05);
}

/* halo rose  */
.portrait-container::before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    height: 580px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 46, 136, 0.12) 0%, transparent 75%);
    z-index: -1;
    animation: softPulse 7s ease-in-out infinite;
}

/* Animation  */
@keyframes softPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.7;
    }
}

/* Animation au chargement de la page */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/*----*/
.showCase {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-white);
}

.showCase p {
    width: 35%;
}

.showCase h2 {
    text-align: center;
}

/* SECTION PROJETS ET CARROUSSEL */
#projets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: start;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    background-color: var(--color-navbar);
    color: var(--color-white);
}

.projets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 70%;
    background-color: var(--color-navbar);
    color: var(--color-white);
}

#projets .card {
    width: 80%;
    position: relative;
    border-radius: 12px;
    /* soft, sans écrasements plus bas */
    background: rgba(255, 255, 255, .02);
    border: 1px solid #ffffff1a;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

#projets .card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .34);
}

#projets .cardNumber {
    display: flex;
    justify-content: center;
    margin: 10px 0 0 0;
    gap: 10px;
}

#projets .cardNumber .bullet {
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    background-color: #8b8b8b;
    cursor: pointer;
}

#projets .cardNumber div.active {
    background-color: var(--color-highlight);
}

#projets .card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    height: auto;
    border-radius: 10px;
    outline: 1px solid #ffffff12;
    outline-offset: -1px;
    transition: transform .18s ease, filter .18s ease;
}

#projets .card:hover img {
    transform: scale(1.01);
    filter: brightness(.9) contrast(1.02);
}

/* scrim léger */
#projets .card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, 0) 45%);
    transition: background .25s ease;
}

#projets .card:hover::after {
    background: linear-gradient(to top, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .08) 65%);
}

#projets .card .skill {
    position: absolute;
    color: var(--color-card-bg);
    background-color: var(--color-highlight);
    padding: 2px 8px;
    border-radius: var(--radius-large);
    min-width: 50px;
    text-align: center;
    font-family: var(--font-title);
    margin: 1vh;
    font-size: 0.8em;
    top: 8px;
    left: 8px;
    color: #fff;
    font-weight: 600;
    /* soft */
    background: rgba(255, 46, 136, .18);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 4px 10px;
}

/* overlay */
#projets .card .description {
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility 0s .3s;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 56px;
    /* remonté pour libérer le CTA */
    color: #fff;
    padding: 12px 14px 14px;
    box-sizing: border-box;
    z-index: 10;
    background: linear-gradient(to top, rgba(15, 15, 15, .55), rgba(15, 15, 15, .12));
    border-radius: 0 0 12px 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
    transform: translateY(6px);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: clamp(100px, 16vh, 200px);
}

#projets .card .description p {
    margin: 0;
    line-height: 1.5;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* https://developer.mozilla.org/fr/docs/Web/CSS/line-clamp */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#projets .card:hover .description {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

#projets .card .more-info {
    /* soft par défaut, statique pour rester visible */
    position: static;
    display: inline-block;
    margin: 10px 0 2px;
    padding: 9px 14px;
    box-sizing: border-box;
    color: #fff;
    background: transparent;
    border-radius: 999px;
    font-weight: 700;
    font-size: .92rem;
    border: 1px solid rgba(255, 46, 136, .35);
    box-shadow: none;
    text-align: center;
}

#projets .card .more-info:hover,
#projets .card .more-info:active {
    background: rgba(255, 46, 136, .12);
}

#projets .card .bottom {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-title);
    padding: 6px 2px 0;
    align-items: baseline;
    gap: 10px;
}

#projets .card .bottom p:first-child {
    color: #fff;
    font-weight: 700;
    letter-spacing: .2px;
}

#projets .card .bottom p:last-child {
    opacity: .7;
    font-size: .95rem;
}

/* cartes carrousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 70%;
    margin: 0 auto;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel .decoration-haut {
    display: none;
}

/* scope carrousel */
.carousel .card {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 10px;
}

/* contrôles */
.controlButtons {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    position: static;
    gap: 10px;
}

#prevBtn,
#nextBtn {
    width: var(--ctrl-size);
    height: var(--ctrl-size);
    padding: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #ffffff1a;
    border: 1px solid #ffffff29;
    color: #fff;
    font-weight: 700;
}

#prevBtn:hover,
#nextBtn:hover {
    background: #ffffff30;
}

#toggleMode {
    height: var(--ctrl-size);
    line-height: var(--ctrl-size);
    padding: 0 .7rem;
    border-radius: 999px;
    background: #ffffff14;
    border: 1px solid #ffffff29;
    color: #fff;
    font-size: .85rem;
}

/* SECTION SKILLS */
#skills {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20vh;
}

.skills {
    width: 70%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
    gap: 5vh;
    margin-top: 10vh;
}

.skill {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius-medium);
    border: 1px solid #3b82f64d;
    justify-content: center;
    width: 20%;
    transition: transform 0.5s ease-out;
    background-color: rgba(21, 21, 21, 0.3);
    border: 1px solid #3b82f64d;
    padding: 1rem;
    position: relative;
    text-align: center;
    font-size: 0.8em;
    background-image: linear-gradient(to bottom right, #06b6d433, #3b82f633);
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1rem;
}

.skill:hover {
    background-image: linear-gradient(to bottom right, #3b82f633, #06b6d433);
}

.skill svg {
    box-sizing: content-box;
    /* annule le border-box pour les SVG */
    display: inline-block;
    width: 20px;
    height: 20px;
    padding: 12px;
    border-radius: 12px;
    background-color: #ffffff0d;
    color: rgb(96 165 250);
}

.skill progress {
    position: absolute;
    bottom: 1vh;
    width: 60%;
}

/* SECTION EXPERIENCES */
#experiences {
    width: 80%;
    margin: 0 auto;
    margin-top: 15vh;
    display: flex;
    flex-direction: row;
    background: linear-gradient(to bottom right, var(--color-highlight), var(--color-highlight-dark));
    padding: 20px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    box-sizing: border-box;
    max-width: 100%;
}

#experiences:hover {
    width: 100%;
    height: auto;
}

#experiences li:hover {
    background-color: rgba(51, 50, 50, 0.3);
}

#experiences .showCase p {
    width: 80%;
}

#experiences .left {
    width: 70%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#experiences .right {
    width: 30%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

#experiences .filtre {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

#experiences .filtre label {
    color: var(--color-text);
    margin-right: 10px;
}

#experiences .filtre select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--color-highlight);
    background-color: var(--color-navbar);
    color: var(--color-text);
}

#experiences ul {
    width: 100%;
    list-style-type: none;
    padding: 0;
}

#experiences li {
    width: 100%;
    background-color: rgba(21, 21, 21, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease-in-out;
    border: 1px solid #ffffff1a;
}

#experiences li p {
    margin: 5px 0;
    color: var(--color-text);
}

#experiences .date {
    color: var(--color-highlight);
    font-weight: bold;
}

#experiences .right img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* RESPONSIVE */

/* Tablettes + petits écrans */
@media (max-width: 1024px) {

    /* header */
    header {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    nav {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    /* bouton burger mobile */
    .menu-btn {
        display: inline-grid;
        place-items: center;
        width: 40px;
        height: 40px;
        background: #ffffff12;
        border: 1px solid #ffffff24;
        border-radius: 8px;
    }

    /* icône */
    .menu-icon {
        position: relative;
        width: 18px;
        height: 2px;
        background: #fff;
    }

    .menu-icon::before,
    .menu-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 18px;
        height: 2px;
        background: #fff;
    }

    .menu-icon::before {
        top: -6px;
    }

    .menu-icon::after {
        top: 6px;
    }

    /* Flowbite retire .hidden, le menu s'ouvre */
    #menu {
        width: 100%;
    }

    #menu:not(.hidden) {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding-top: 12px;
    }


    /* intro */
    .intro p {
        width: 80%;
    }

    /* projets */
    .carousel-container {
        width: 90%;
    }

    #projets .card {
        width: 100%;
    }

    /* compétences */
    .skills {
        width: 90%;
        gap: 3vh;
    }

    .skill {
        width: 80%;
    }

    .skills {
        width: 70%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5vh;
        margin-top: 10vh;
    }

    .skill {
        display: flex;
        align-items: center;
        gap: 0.9rem;
        width: 42%;
        padding: 1rem;
        border-radius: var(--radius-medium);
        border: 1px solid #3b82f64d;
        background-color: rgba(21, 21, 21, .3);
        background-image: linear-gradient(to bottom right, #06b6d433, #3b82f633);
    }

    .skill:hover {
        background-image: linear-gradient(to bottom right, #3b82f633, #06b6d433);
    }

    .skill svg {
        width: 22px;
        height: 22px;
        padding: 12px;
        border-radius: 12px;
        background-color: #ffffff0d;
        color: rgb(96 165 250);
    }

    .skill p {
        text-align: left;
        margin: 0;
        color: var(--color-white);
    }

    .skill p strong {
        display: block;
        font-weight: 700;
        letter-spacing: .2px;
    }

    .skill p span {
        display: block;
        margin-top: 2px;
        font-size: .92em;
        color: var(--color-text);
        opacity: .9;
    }

    .skill p span {
        line-height: 1.5;
    }

    @media (max-width: 1024px) {
        .skill {
            width: 80%;
        }
    }


    /* expériences */
    #experiences {
        flex-direction: column;
        width: 90%;
    }

    #experiences .left,
    #experiences .right {
        width: 100%;
    }

    #experiences .showCase p {
        width: 90%;
    }
}

/* Menu mobile flowbite, animations */
@media (max-width: 1024px) {

    /* état de base (menu fermé) forcer l'élément à exister pour l'animer */
    #menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding-top: 12px;

        /* animation */
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height .28s ease, opacity .28s ease;
    }

    /* Flowbite ajoute/retire .hidden -> on anime */
    #menu.hidden {
        display: flex !important;
        max-height: 0;
        opacity: 0;
    }

    /* aria-expanded="true" */
    #menuBtn[aria-expanded="true"]+#menu {
        max-height: 240px;
        opacity: 1;
    }

    /* anim de l’icône burger qui se transforme en croix */
    .menu-icon,
    .menu-icon::before,
    .menu-icon::after {
        transition: transform .25s ease, opacity .2s ease, top .25s ease, background .2s ease;
    }

    #menuBtn[aria-expanded="true"] .menu-icon {
        background: transparent;
    }

    #menuBtn[aria-expanded="true"] .menu-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    #menuBtn[aria-expanded="true"] .menu-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }
}



/* Téléphones et + petit */
@media (max-width: 768px) {

    /* texte */
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2em;
    }

    p {
        font-size: 0.9em;
    }

    /* intro */
    .intro p {
        width: 80%;
    }

    /* compétences */
    .skills {
        flex-direction: column;
        width: 100%;
        margin-top: 6vh;
        align-items: center;
    }

    .skill {
        width: 80%;
        flex-direction: column;
    }

    .skill progress {
        position: static;
        width: 80%;
        margin-top: 10px;
    }

    /* expériences */
    #experiences {
        width: 100%;

        border-radius: 14px;
    }

    #experiences li {
        padding: 12px;
    }

    .filtre {
        justify-content: center;
        margin-bottom: 15px;
        gap: 10px;
        flex-wrap: wrap;

    }

    /* boutons */
    .intro a {
        padding: 10px 20px;
        font-size: 0.8em;
    }

    .controlButtons {
        display: none;
    }

    #projets .cardNumber {
        display: none;
    }

    /* projets -> liste */
    .carousel-container {
        width: 92%;
        overflow: visible;
    }

    .carousel {
        display: block;
        transform: none !important;
    }

    .carousel .card {
        padding: 8px;
        margin-bottom: 16px;
    }


    #projets .card {
        background: rgba(255, 255, 255, .02);
        border: 1px solid #ffffff1a;
        border-radius: 14px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    }

    #projets .card:active {
        transform: scale(.992);
    }

    #projets .card img {
        border-radius: 10px;
        outline: 1px solid #ffffff12;
        outline-offset: -1px;
    }

    #projets .card .skill {
        top: 8px;
        left: 8px;
        transform: none;
        padding: 5px 10px;
        font-size: .72rem;
        font-weight: 600;
        border-radius: 999px;
        background: rgba(255, 46, 136, .18);
        color: #fff;
        box-shadow: none;
    }

    #projets .card .bottom {
        margin-top: 8px;
        align-items: baseline;
        gap: 8px;
    }

    #projets .card .bottom p:first-child {
        color: #fff;
        font-weight: 700;
        font-size: .98rem;
        text-align: left;
    }

    #projets .card .bottom p:last-child {
        opacity: .65;
        font-size: .9rem;
    }

    #projets .card .description {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        background: transparent;
        height: auto;
        padding: 6px 2px 0;
        text-shadow: none;
    }

    #projets .card .description p {
        text-align: left;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


    #projets .card .more-info {
        position: static;
        display: block;
        width: 100%;
        margin: 10px 0 2px;
        padding: 10px 14px;
        font-weight: 700;
        font-size: .95rem;
        text-align: center;
        border-radius: 999px;
        background: transparent;
        border: 1px solid rgba(255, 46, 136, .35);
        box-shadow: none;
    }

    #projets .card .more-info:hover,
    #projets .card .more-info:active {
        background: rgba(255, 46, 136, .12);
    }

    /* section */
    .showCase p {
        width: 80%;
    }

    /* nav au dessus du portrait */
    header,
    nav,
    #menu {
        position: relative;
        z-index: 1000;
    }

    /* retirer halo sur mobile */
    .portrait-container::before {
        display: none;
    }

    .portrait-container {
        top: 22%;
        transform: translate(-50%, -18%);
    }

    .portrait {
        width: 280px;
        height: 280px;
        filter: brightness(1.12) contrast(1.08);
    }

    .intro {
        padding-top: 70px;
    }



}

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

/* sécurité overflow, pour pas que certaines div puissent être plus grandes que l'écran */
html,
body {
    overflow-x: hidden;
}


@media (prefers-reduced-motion: reduce) {
    #projets .card {
        transition: none !important;
    }
}

/* Pop-up quand on clique sur un projet */
.popup[aria-hidden="true"] {
    display: none !important;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(2px);
}

.popup-box {
    position: relative;
    width: min(92vw, 720px);
    margin: 6vh auto;
    background: rgba(21, 21, 21, .95);
    border: 1px solid #ffffff1a;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    overflow: hidden;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}

.popup[aria-hidden="false"] .popup-box {
    transform: translateY(0);
    opacity: 1;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 18px;
    border: 1px solid #ffffff24;
    background: #ffffff12;
    color: #000000;
}

.popup-close:hover {
    background: #ffffff1f;
}

.popup-media {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
}

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

.popup-body {
    padding: 14px 14px 16px;
}

.popup-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.popup-title {
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.25rem;
    line-height: 1.2;
}

.popup-date {
    color: #ffffffa6;
    font-size: .95rem;
}

.popup-desc {
    margin-top: 8px;
    color: var(--color-text);
    line-height: 1.55;
    text-align: left;
}

.popup-cta {
    display: block;
    width: 100%;
    margin-top: 12px;
    text-align: center;
    padding: 12px 14px;
    border-radius: 999px;
    font-weight: 800;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 46, 136, .35);
}

.popup-cta:hover,
.popup-cta:active {
    background: rgba(255, 46, 136, .12);
}

/* Centre la popup  */
.popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
}

.popup-box {
    width: min(92vw, 720px);
    max-height: calc(100svh - 12vh);
    margin: 6vh auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* L’image garde sa taille mais ne prends pas tout l’écran */
.popup-media {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 45svh;
    background: #111;
}

/* Simuler la barre de scroll pour montrer qu'il y a encore du texte en dessous */
.popup-body {
    position: relative;
}

.popup-body::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 46, 136, .4), rgba(241, 113, 169, .7));
    border-radius: 100%;
    pointer-events: none;
    /* n'empêche pas le scroll */
}

/* Rendre scrollable si le contenu est trop long */
.popup-body {
    flex: 1 1 auto;
    min-height: 0;
    /* Pour faire marcher overflow dans un flex */
    overflow: auto;
    /* scroll interne */
    padding: 14px 14px 16px;
    scrollbar-color: var(--color-highlight) var(--color-navbar);
    scrollbar-width: thin;
}



body.no-scroll {
    overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
    .popup-box {
        transition: none !important;
    }
}

/* Force le clic sur "En savoir plus" à ouvrir la popup 
pointer-events: none; laisse le clic “traverser” le bouton pour atteindre la .card pour ouvrir la popup et non le lien :)*/

#projets .card {
    cursor: pointer;
}

#projets .card .more-info {
    pointer-events: none;
}

#projets .card .description p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limiter l'affichage des descriptions de projet à 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}