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

:root {
    --purple: #a392d7;
    --pink: #e04e8e;
    --dark: #3d3d4e;
    --gray: #5a5a6e;
}

body {
    font-family: 'Outfit', sans-serif;
    background: url(images/fond_per.png) center/cover no-repeat fixed;
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1.2rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border-bottom: 1.5px solid rgba(255,255,255,0.6);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}
.logo:hover { color: var(--purple); }

.back-btn {
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.back-btn:hover { color: var(--purple); transform: translateX(-3px); }

/* ── Container ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* ── Header du projet ── */
.project-header {
    margin-bottom: 1.5rem;
}

.project-category {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--purple);
    background: rgba(119, 45, 236, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.project-subtitle {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 500;
}

/* ── Bannière pleine largeur ── */
.project-banner {
    width: 100%;
    height: 420px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    margin-bottom: 3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Disposition : sidebar gauche + description droite ── */
.project-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

/* ── Sidebar gauche ── */
.project-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.9rem;
    display: block;
}

/* Icônes outils */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.8);
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tool-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(119,45,236,0.15);
}

.tool-icon.ps     { background: url(images/photoshop.png)  center/32px no-repeat, rgba(255,255,255,0.75); }
.tool-icon.ai     { background: url(images/illustrator.png) center/32px no-repeat, rgba(255,255,255,0.75); }
.tool-icon.pp     { background: url(images/lightroom.png)  center/32px no-repeat, rgba(255,255,255,0.75); }
.tool-icon.figma  { background: #27272f url(images/figma.svg) center/22px no-repeat; }
.tool-icon.krita  { background: url(images/krita.png)      center/32px no-repeat, rgba(255,255,255,0.75); }
.tool-icon.vsc    { background: url(images/vsc.png)        center/28px no-repeat, rgba(255,255,255,0.75); }

/* Liens utiles */
.useful-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.useful-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s, transform 0.2s;
}
.useful-link::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23772dec' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center/contain no-repeat;
}
.useful-link:hover { color: var(--purple); transform: translateX(3px); }

/* ── Description droite ── */
.project-description h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}
.project-description h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin: 1.5rem 0 0.5rem;
}
.project-description p {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 1rem;
}
.project-description ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}
.project-description li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--gray);
    margin-bottom: 0.4rem;
}
.project-description a {
    color: var(--purple);
    font-weight: 600;
}

/* ── Galerie ── */
.gallery-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.media-item {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.media-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 35px rgba(119,45,236,0.15);
}
.media-item img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .media-grid { grid-template-columns: 1fr; }
}

/* ── CD tournant (projet5 uniquement) ── */
.card-1 {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    margin: 0 auto 2.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(119,45,236,0.12);
    border: 1.5px solid rgba(255,255,255,0.7);
}
.spinning-cd {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: rotateCD 10s linear infinite;
}
.spinning-cd:hover { animation-play-state: paused; }
@keyframes rotateCD {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── CTA contact ── */
.cta-section {
    padding: 3rem 2rem;
    text-align: center;
}
.cta-card {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(119,45,236,0.08);
    border: 1.5px solid rgba(255,255,255,0.7);
}
.cta-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.6rem;
}
.cta-section p {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ── Bouton ── */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--purple);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(119,45,236,0.2);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(119,45,236,0.35);
}

/* ── Footer ── */
footer {
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--gray);
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(20px);
    border-top: 1.5px solid rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .project-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .project-sidebar {
        position: static;
        display: flex;
        flex-direction: row;
        gap: 3rem;
        flex-wrap: wrap;
    }
    h1 { font-size: 2.2rem; }
    .project-banner { height: 280px; }
}

@media (max-width: 640px) {
    .container { padding: 6rem 1rem 3rem; }
    h1 { font-size: 1.8rem; }
    .project-banner { height: 200px; border-radius: 12px; }
    .project-sidebar { flex-direction: column; gap: 1.5rem; }
    .media-grid { grid-template-columns: 1fr; }
    .card-1 { width: 260px; height: 260px; }
}

/*projet1*/
.media-grid--2then3 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.media-grid--2then3 .media-item:nth-child(1),
.media-grid--2then3 .media-item:nth-child(2) {
    grid-column: span 3;
}

.media-grid--2then3 .media-item:nth-child(n+3) {
    grid-column: span 2;
}

/* ── Curseur pointer sur les images de galerie ── */
.media-item img {
    cursor: zoom-in;
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 30, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 88vw;
    max-height: 88vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.3s ease;
    display: block;
}
.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

/* Bouton fermer */
.lightbox-close {
    position: fixed;
    top: 1.4rem;
    right: 1.6rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Boutons précédent / suivant */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10001;
}
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }
.lightbox-prev:hover { background: rgba(255,255,255,0.25); transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { background: rgba(255,255,255,0.25); transform: translateY(-50%) translateX(2px); }

/* Compteur */
.lightbox-counter {
    position: fixed;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 10001;
}

@media (max-width: 640px) {
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}