@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Orbitron:wght@600&family=Poppins:wght@400;600;700&display=swap');

@keyframes shine { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}

@keyframes fadeIn { 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

@keyframes modalZoomIn { 
    from { 
        transform: scale(0.85); 
        opacity: 0; 
    } 
    to { 
        transform: scale(1); 
        opacity: 1; 
    } 
}

@keyframes fadeInUp { 
    from { 
        opacity: 0; 
        transform: translateY(clamp(20px, 5vw, 35px)); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.hidden {
    display: none ;
}

/*#Region 1080 */
    * 
        
    

    html {
        font-size: 16px;
    }

    body {
        margin: 0;
        font-family: 'Poppins', Arial, sans-serif;
        background-color: #111;
        color: white;
        scroll-behavior: smooth;
        overflow-x: hidden;
        width: 100%;
    }

    section {
        min-height: 100vh;
        min-height: 50dvh; /* Pour les mobiles */

        box-sizing: border-box;
        width: 100%;
        position: relative;
    }

    /* Contact Shortcut - Adaptatif */
    .contact-shortcut {
        position: fixed;
        top: clamp(10px, 2vw, 20px);
        left: clamp(10px, 2vw, 20px);
        display: flex;
        align-items: center;
        z-index: 1000;
        gap: clamp(8px, 1.5vw, 12px);
        background-color: rgba(0, 0, 0, 0.6);
        padding: clamp(6px, 1.5vw, 12px) clamp(8px, 2vw, 15px);
        border-radius: clamp(6px, 1.5vw, 10px);
        backdrop-filter: blur(8px);
        max-width: calc(100vw - 40px);
    }

    .contact-link {
        color: #00ffff;
        font-weight: 600;
        text-decoration: none;
        font-size: clamp(12px, 2.5vw, 14px);
        white-space: nowrap;
    }

    .contact-icons {
        display: flex;
        gap: clamp(6px, 1.5vw, 10px);
        flex-wrap: wrap;
    }

    .contact-icons img {
        width: clamp(20px, 4vw, 28px);
        height: clamp(20px, 4vw, 28px);
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .contact-icons img:hover {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px cyan);
    }

    /* Slide 1: Accueil - Complètement responsive */
    .accueil {
        position: relative;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: radial-gradient(80rem 40rem at 10% -10%, rgba(185,132,255,.20), transparent 60%),
                    radial-gradient(80rem 40rem at 110% 10%, rgba(108,240,255,.16), transparent 60%),
                    linear-gradient(180deg,#0a0f2a,#071533);
    }

    .hero-bg { 
        position: absolute; 
        inset: 0; 
        pointer-events: none; 
        overflow: hidden;
    }

    .orb {
        position: absolute; 
        border-radius: 50%; 
        filter: blur(clamp(20px, 5vw, 50px)); 
        opacity: clamp(0.2, 0.45, 0.6); 
        transform: translateZ(0);
        will-change: transform;
    }

    .orb-a { 
        top: clamp(-60px, -15vw, -120px); 
        left: clamp(-60px, -15vw, -120px); 
        background: #b984ff; 
        width: clamp(200px, 50vw, 450px); 
        height: clamp(200px, 50vw, 450px); 
    }

    .orb-b { 
        bottom: clamp(-70px, -18vw, -140px); 
        right: clamp(-80px, -20vw, -160px); 
        background: #6cf0ff; 
        width: clamp(200px, 50vw, 450px); 
        height: clamp(200px, 50vw, 450px); 
    }

    .orb-c { 
        top: clamp(30%, 40%, 50%); 
        left: clamp(45%, 55%, 65%); 
        background: #ff7edb; 
        opacity: clamp(0.2, 0.35, 0.5); 
        width: clamp(120px, 30vw, 280px); 
        height: clamp(120px, 30vw, 280px); 
    }

    .hero-center { 
        position: relative; 
        text-align: center; 
        z-index: 2; 
        padding: clamp(15px, 4vw, 25px);
        max-width: 95%;
        width: 100%;
    }

    .bienvenue {
  font-size: 90px;
  font-weight: bold;
  color: red;
  margin: 0 0 12px 0;
  user-select: none;
  cursor: pointer;
  animation: zoomIn 1s ease-out;
  transition: transform 1.3s ease;
}
.bienvenue:hover { transform: scale(2.05); }
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.bienvenue span {
  display: inline-block;
  font-weight: 800; letter-spacing: .6px;
  font-size: clamp(46px, 10vw, 120px);
  line-height: 1.05;
  background: linear-gradient(90deg,#ffffff,#cfd6ff,#ff7edb,#b984ff);
  background-size: 250% 100%;
  -webkit-background-clip: text; color: transparent;
  text-shadow: 0 6px 40px rgba(185,132,255,.25);
  animation: shine 6s linear infinite;
}
@keyframes shine {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}
.bienvenue:hover span { transform: translateY(-2px); transition: .25s }

.hero-sub {
  margin: 46px 0 20px;
  min-height: 1.6em;
  color: #e8ecff;
  opacity: .9;
  font-size: clamp(14px,2.4vw,18px);
}

.cta-btn {
  margin-top: 6px; padding: 12px 22px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07); color: #fff; font-weight: 700; letter-spacing: .3px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.cta-btn:hover {
  transform: translateY(-2px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28);
  box-shadow: 0 12px 32px rgba(0,0,0,.36);
}
.cta-btn:active { transform: translateY(0); }









    /* Contact cards */
    .contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 28px 0 40px;
    }
    .contact-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: #eae6f7;
    padding: 18px 22px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
    min-width: 160px;
    }
    .contact-card img {
    width: 64px; height: 64px; object-fit: contain; border-radius: 14px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.3));
    transition: transform .25s, filter .25s;
    }
    .contact-card p {
    margin: 0; font-weight: 600; font-size: .95rem; letter-spacing: .2px; opacity: .95;
    background: linear-gradient(90deg,#fff,#d9b6ff);
    -webkit-background-clip: text; color: transparent;
    }
    .contact-card a:hover {
    transform: translateY(-4px) scale(1.03);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    }
    .contact-card a:hover img { transform: scale(1.06) rotate(-2deg); }
    .contact-card a:hover img[alt="LinkedIn"] { filter: drop-shadow(0 0 24px rgba(14,118,168,.9)); }
    .contact-card a:hover img[alt="GitLab"]   { filter: drop-shadow(0 0 24px rgba(255,94,0,.9)); }
    .contact-card a:hover img[alt="Gmail"]    { filter: drop-shadow(0 0 24px rgba(234,67,53,.9)); }
    .contact-card a:focus-visible {
    outline: 2px solid rgba(255,255,255,.6);
    outline-offset: 3px;
    }

























    /* Slide 2: À Propos - Responsive complet */
    .slide2 {
        min-height: 100vh;
        min-height: 10dvh;

        flex-direction: column;
        justify-content: center;
        background-image: url('image/back_S2.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }

    .contenu-slide2 {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: clamp(20px, 4vw, 40px);
        max-width: min(95%, 1200px);
        margin: auto;
        width: 100%;
        padding: clamp(15px, 3vw, 25px);
    }

    .cadre-img {
        background-color: rgba(57, 54, 54, 0.8);
        padding: clamp(8px, 2vw, 15px);
        border-radius: clamp(15px, 3vw, 30px);
        box-shadow: 0 clamp(3px, 1vw, 8px) clamp(8px, 2vw, 15px) rgba(51, 49, 49, 0.6);
        max-width: clamp(200px, 40vw, 400px);
        flex: 1;
        min-width: 0;
    }

    .photo-gauche {
        width: 100%;
        height: auto;
        border-radius: clamp(15px, 3vw, 25px);
        transition: transform 0.3s ease;
        display: block;
    }

    .photo-gauche:hover { transform: rotate(3deg); }
    .cadre-img:hover { transform: rotate(-2deg); }

    .info-container {
        flex: 2;
        display: flex;
        flex-direction: column;
        gap: clamp(20px, 4vw, 30px);
        min-width: 0;
    }

    .info-box {
        padding: clamp(15px, 3vw, 25px) clamp(18px, 4vw, 30px);
        border-radius: clamp(25px, 5vw, 50px);
        color: white;
        box-shadow: 0 clamp(2px, 1vw, 5px) clamp(5px, 2vw, 10px) rgba(122, 119, 119, 0.4);
        font-size: clamp(14px, 2.8vw, 24px);
        background-image: url('image/back_ss.jpg');
        background-size: cover;
        background-position: center;
        min-width: 0;
        line-height: 1.4;
        backdrop-filter: blur(2px);
    }

    .info-box p {
        margin: clamp(8px, 1.5vw, 12px) 0;
    }

    .info-box:hover { 
        transform: scale(1.02); 
        background-color: rgba(76, 76, 76, 0.1); 
    }

    .contact-icons-slide2 {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: clamp(25px, 5vw, 40px);
        padding: clamp(15px, 3vw, 25px);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: clamp(20px, 4vw, 35px);
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 clamp(8px, 3vw, 15px) clamp(25px, 6vw, 40px) rgba(0, 0, 0, 0.3);
    }

    .contact-icons-slide2 a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: clamp(60px, 12vw, 80px);
        height: clamp(60px, 12vw, 80px);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(8px);
        border: 2px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .contact-icons-slide2 a:hover {
        transform: scale(1.15) translateY(-5px);
        background: rgba(0, 255, 255, 0.2);
        border-color: rgba(0, 255, 255, 0.5);
        box-shadow: 0 clamp(10px, 4vw, 20px) clamp(30px, 8vw, 50px) rgba(0, 255, 255, 0.4);
    }

    .contact-icons-slide2 img {
        width: clamp(35px, 7vw, 50px);
        height: clamp(35px, 7vw, 50px);
        filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
        transition: all 0.3s ease;
    }

    .contact-icons-slide2 a:hover img {
        filter: brightness(1.5) drop-shadow(0 0 15px rgba(0, 255, 255, 0.8));
    }

    /* Slide 3: Compétences - Layout en coins ÉNORME */
    .slide3 {
        position: relative;
        width: 100%;
        min-height: 100vh;
        box-sizing: border-box;
        min-height: 100dvh;
        background: linear-gradient(135deg, #1c1c1c, #333);
        background-image: url('image/back_ss.jpg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        background-attachment: fixed;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: clamp(20px, 4vw, 40px);
        overflow: hidden;
    }

    .titre-slide3 {
        position: absolute;
        top: 1%;
        left: 50%;
        transform: translateX(-50%);
        font-size: clamp(28px, 5vw, 50px);
        font-weight: 800;
        background: linear-gradient(90deg, #ff8c00, #ff4b2b, #ff1493, #8a2be2);
        background-size: 300%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 clamp(15px, 3vw, 25px) rgba(210, 38, 8, 0.7);
        animation: gradientAnim 5s linear infinite;
        text-align: center;
        line-height: 1.1;
        z-index: 10;
    }

    .competences-container {
        position: relative;
        width: 100%;
        height: 100%;
        max-width: 2400px;
        max-height: 1600px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .rond-central {
        width: clamp(180px, 25vw, 320px);
        height: clamp(180px, 25vw, 320px);
        border-radius: 50%;
        overflow: hidden;
        border: clamp(4px, 1vw, 8px) solid rgba(85, 82, 82, 0.9);
        background-image: url('image/garcon-fait-plusieurs-choses-fois_118167-8219-2799706052.jpg');
        background-size: cover;
        background-position: center;
        box-shadow: 0 0 clamp(25px, 5vw, 45px) rgba(0,0,0,0.7);
        z-index: 5;
    }

    .flip-box {
        position: absolute;
        width: 350px;
        height: 300px;
        perspective: 1000px;
        opacity: 0;
        transform: translateY(30px);
        animation: fadeIn 1.5s forwards;
        cursor: pointer;
        border-radius: clamp(25px, 5vw, 40px);
        overflow: hidden;
    }

    /* Positionnement dans les coins TRÈS ESPACÉ */
    .flip-box.top-left {
        top: clamp(60px, 10vh, 120px);
        left: clamp(20px, 4vw, 80px);
        animation-delay: 0.1s;
    }

    .flip-box.top-right {
        top: clamp(60px, 10vh, 120px);
        right: clamp(20px, 4vw, 80px);
        animation-delay: 0.2s;
    }

    .flip-box.bottom-left {
        bottom: clamp(20px, 6vh, 80px);
        left: clamp(20px, 4vw, 80px);
        animation-delay: 0.3s;
    }

    .flip-box.bottom-right {
        bottom: clamp(20px, 6vh, 80px);
        right: clamp(20px, 4vw, 80px);
        animation-delay: 0.4s;
    }



    .flip-box-inner {
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
        position: relative;
    }

    .flip-box.retourne .flip-box-inner { 
        transform: rotateY(180deg); 
    }
/*#region flip front back  */
    .flip-box-front, .flip-box-back {
        position: absolute; 
        width: 100%;
        height: 75%;
        backface-visibility: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: clamp(10px, 2vw, 18px);
        font-weight: 600;
        padding: clamp(12px, 3vw, 20px);
        color: white;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
/*#endregion  */

    .flip-box-back {
        transform: rotateY(180deg);
        background-image: url('image/BACK_S1.png');
        background-size: cover;
        background-position: center;
        padding: clamp(15px, 4vw, 25px);
    }

    .flip-box-front::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
        pointer-events: none;
        z-index: 1;
        border-radius: clamp(10px, 2vw, 18px);
    }

    .card-title {
        position: relative;
        z-index: 2;
        font-family: 'Montserrat', sans-serif;
        font-weight: 900;
        font-size: 1.8em;
        text-transform: uppercase;
        letter-spacing: clamp(1px, 1px, 1px);
        background: linear-gradient(90deg, #e8f6ff, #7cafff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        /* -webkit-text-stroke: clamp(2px, 0.4vw, 4px) rgba(0,0,0,0.8); */
        text-shadow: 0 4px 20px rgba(0,0,0,0.8);
        transition: all 0.3s ease;
        text-align: center;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }

    .flip-box:hover .card-title { 
        transform: scale(1.08); 
        letter-spacing: clamp(2px, 3px, 6px); 
    }

    .skills-list-reseaux, 
    .skills-list-systemes, 
    .skills-list-cybersecurite, 
    .skills-list-SD {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: left;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 1em;
        margin-bottom: clamp(8px, 2vw, 15px);
        line-height: 1.4;
        opacity: 0.95;
        font-weight: 600;
        word-wrap: break-word;
        hyphens: auto;
    }


    /* Slide 4: Timeline - Responsive intelligent */
    .slide4 {
        background-color: #0d0d0d;
        background-image: url('image/back_S4.jpg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        background-attachment: fixed;
        padding: clamp(30px, 6vw, 60px) clamp(15px, 3vw, 25px);
        position: relative;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .titre-slide4 {
        text-align: center;
        font-size: clamp(24px, 5vw, 40px);
        font-weight: 800;
        color: #00f5ff;
        text-shadow: 0 0 clamp(8px, 2vw, 15px) rgba(0, 255, 255, 0.6);
        margin-bottom: clamp(40px, 8vw, 80px);
        line-height: 1.2;
    }

    .timeline {
        position: relative;
        max-width: min(95%, 1200px);
        margin: 0 auto;
        padding: 0;
    }

    .timeline::after {
        content: '';
        position: absolute;
        width: clamp(3px, 0.5vw, 5px);
        background-color: #00f5ff;
        top: 0;
        bottom: 0;
        left: 50%;
        margin-left: calc(clamp(3px, 0.5vw, 5px) / -2);
        box-shadow: 0 0 clamp(5px, 1vw, 10px) rgba(0, 255, 255, 0.3);
    }

    .container {
        padding: clamp(20px, 4vw, 40px) 0;
        position: relative;
        width: 50%;
        display: flex;
        align-items: center;
        gap: clamp(10px, 3vw, 20px);
    }

    .content {
        background-color: rgba(26, 26, 26, 0.9);
        padding: clamp(15px, 3vw, 25px);
        border-radius: clamp(10px, 2vw, 18px);
        color: #fff;
        flex: 1;
        box-shadow: 0 0 clamp(8px, 2vw, 15px) rgba(0, 255, 255, 0.3);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(0, 255, 255, 0.2);
    }

    .year {
        font-size: clamp(18px, 4vw, 26px);
        font-weight: 800;
        color: #00f5ff;
        margin-bottom: clamp(8px, 2vw, 15px);
        text-align: center;
        text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    }

    .img-circle {
        flex-shrink: 0;
        width: clamp(60px, 12vw, 120px);
        height: clamp(60px, 12vw, 120px);
        border-radius: 50%;
        overflow: hidden;
        border: clamp(2px, 0.5vw, 4px) solid #c99f07;
        box-shadow: 0 0 clamp(8px, 2vw, 15px) rgba(201, 159, 7, 0.4);
    }

    .img-circle img { 
        width: 100%; 
        height: 100%; 
        object-fit: cover; 
    }

    .container.right { 
        left: 50%; 
        justify-content: flex-start; 
    }

    .container.right .img-circle { 
        order: 1; 
    }

    .container.right .content { 
        order: 2; 
    }

    .container.left { 
        left: 0%; 
        justify-content: flex-end; 
    }

    .container.left .img-circle { 
        order: 2; 
    }

    .container.left .content { 
        order: 1; 
    }

    .content ul {
        margin: 0;
        padding-left: clamp(15px, 3vw, 25px);
    }

    .content ul li {
        margin-bottom: clamp(6px, 1.5vw, 10px);
        font-size: clamp(13px, 2.5vw, 16px);
        line-height: 1.5;
        opacity: 0.95;
    }

    /* Slide 5: Projets - Grille 3x3 ÉNORME */
    .slide5 {
        padding: clamp(60px, 8vw, 120px) clamp(30px, 6vw, 60px);
        background: rgba(15, 20, 30, 0.95);
        backdrop-filter: blur(8px);
        min-height: 100vh;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .titre-slide5 {
        text-align: center;
        font-size: clamp(40px, 8vw, 80px);
        font-weight: 900;
        background: linear-gradient(90deg, #ff8c00, #ff4b2b, #ff1493, #8a2be2);
        background-size: 300%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 clamp(25px, 5vw, 50px) rgba(210, 38, 8, 0.8);
        animation: gradientAnim 5s linear infinite;
        margin-bottom: clamp(50px, 8vw, 100px);
        line-height: 1.1;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(9, 1fr);
        gap: clamp(35px, 6vw, 70px);
        width: min(95vw, 2000px);
        height: 2000px;
        max-width: 2000px;
        max-height: 1200px;
        margin: 0 auto;
        justify-items: center;
        align-items: center;
    }

    .project-card {
        position: relative;
        width: 100%;
        max-width: 400px;
        aspect-ratio: 4 / 3;
        border-radius: clamp(12px, 2vw, 18px);
        /* overflow: hidden; */
        cursor: pointer;
        box-shadow: 0 clamp(3px, 1vw, 8px) clamp(12px, 3vw, 20px) rgba(0,0,0,0.4);
        transition: all 0.3s ease;
    }

    .project-card:hover { 
        transform: scale(1.03); 
        box-shadow: 0 clamp(5px, 2vw, 12px) clamp(20px, 5vw, 35px) rgba(0,0,0,0.6);
    }

    .card-bg {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        z-index: 1;
        transition: transform 0.3s ease;
    }

    .project-card:hover .card-bg {
        transform: scale(1.05);
    }

    .cards-title {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: clamp(12px, 3vw, 18px);
        background: linear-gradient(transparent, rgba(0,0,0,0.8));
        font-weight: 700;
        font-size: clamp(14px, 2.8vw, 18px);
        z-index: 2;
        text-align: center;
        line-height: 1.3;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }

    /* Modal - Apparence améliorée */
    .modal {
        display: none;
        position: fixed;
        inset: 0;
        backdrop-filter: blur(clamp(8px, 3vw, 15px));
        background-color: rgba(0,0,0,0.7);
        z-index: 1000;
        align-items: center;
        justify-content: center;
        padding: clamp(15px, 4vw, 25px);
    }

    .modal-content {
        background-image: url(image/cubes.png);
        backdrop-filter: blur(15px);
        border: 2px solid rgba(255, 140, 0, 0.3);
        color: #eee8eb;
        border-radius: clamp(15px, 4vw, 25px);
        padding: clamp(30px, 7vw, 60px);
        box-shadow: 
            0 0 clamp(30px, 8vw, 60px) rgba(0, 255, 200, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        width: min(98vw, 1200px);
        max-height: 95vh;
        overflow-y: auto;
        text-align: center;
        animation: modalZoomIn 0.4s ease;
        position: relative;
    }

    .modal-content::before {
        content: '';
        position: absolute;
        inset: 0;
        background: url('cubes.png') repeat;
        opacity: 0.05;
        border-radius: clamp(15px, 4vw, 25px);
        z-index: -1;
    }

    .modal-content img {
        max-width: 0px;
        border-radius: clamp(10px, 3vw, 18px);
        margin: clamp(15px, 4vw, 25px) 0;
        height: auto;
        box-shadow: 0 clamp(8px, 3vw, 15px) clamp(25px, 8vw, 40px) rgba(0,0,0,0.5);
        border: 2px solid rgba(10, 1, 11, 0.1);
    }

    .close-btn {
        position: absolute;
        top: clamp(15px, 3vw, 25px);
        right: clamp(20px, 4vw, 30px);
        font-size: clamp(28px, 6vw, 40px);
        cursor: pointer;
        color: #fff;
        z-index: 10;
        line-height: 1;
        padding: clamp(8px, 2vw, 12px);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: clamp(45px, 10vw, 60px);
        height: clamp(45px, 10vw, 60px);
    }

    .close-btn:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.2);
        border-color: rgba(255, 107, 107, 0.4);
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 0 clamp(15px, 4vw, 25px) rgba(255, 107, 107, 0.3);
    }

    #modal-title {
        font-size: clamp(24px, 5vw, 42px);
        margin-bottom: clamp(20px, 4vw, 30px);
        line-height: 1.3;
        font-weight: 800;
        background: linear-gradient(135deg, #ff8c00, #ff4b2b, #ff1493);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 clamp(15px, 4vw, 25px) rgba(255, 140, 0, 0.3);
        letter-spacing: clamp(1px, 0.2vw, 2px);
    }

    #modal-description {
        max-width: 100%;
        margin: clamp(40px, 9vw, 70px) auto;
        padding: clamp(40px, 10vw, 80px);
        font-size: clamp(20px, 5vw, 32px);
        line-height: 1.9;
        text-align: left;
        background: linear-gradient(135deg, 
            rgba(25, 35, 50, 0.9), 
            rgba(35, 45, 65, 0.9),
            rgba(45, 55, 75, 0.9)
        );
        border: 2px solid transparent;
        border-image: linear-gradient(135deg, #ff8c00, #ff4b2b, #8a2be2) 1;
        border-radius: clamp(18px, 5vw, 30px);
        box-shadow: 
            0 0 clamp(30px, 10vw, 60px) rgba(255, 140, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 0 clamp(35px, 10vw, 60px) rgba(255, 140, 0, 0.05);
        animation: fadeInUp 0.6s ease;
        position: relative;
        backdrop-filter: blur(8px);
        font-weight: 500;
        min-height: clamp(180px, 25vh, 300px);
    }

    #modal-description::before {
        content: '🚀 Projet Réalisé';
        position: absolute;
        top: clamp(-55px, -12vw, -100px);
        left: clamp(25px, 6vw, 45px);
        background: linear-gradient(135deg, #ff8c00, #ff6b35);
        color: #111;
        padding: clamp(10px, 2.5vw, 18px) clamp(20px, 5vw, 35px);
        border-radius: clamp(12px, 3vw, 20px);
        font-weight: 800;
        font-size: clamp(15px, 3.5vw, 24px);
        box-shadow: 
            0 0 clamp(20px, 5vw, 35px) rgba(255, 140, 0, 0.8),
            0 clamp(6px, 2vw, 12px) clamp(20px, 5vw, 35px) rgba(0,0,0,0.5);
        text-transform: uppercase;
        letter-spacing: clamp(1px, 0.3vw, 2px);
    }



    /* Scrollbar personnalisée pour la modal */
    .modal-content::-webkit-scrollbar {
        width: clamp(6px, 1.5vw, 10px);
    }

    .modal-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: clamp(3px, 1vw, 6px);
    }

    .modal-content::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #ff8c00, #ff4b2b);
        border-radius: clamp(3px, 1vw, 6px);
        box-shadow: 0 0 clamp(5px, 1vw, 8px) rgba(255, 140, 0, 0.3);
    }

    .modal-content::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #ff7700, #ff3311);
    }

    .reveal {
        opacity: 0;
        transform: translateY(clamp(20px, 5vw, 40px));
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

    .reveal.visible { 
        opacity: 1; 
        transform: translateY(0); 
    }

    
    /* ---- TITRE : ajoute de l'air sous "Mes Projets" ---- */
    .section-head { 
      margin-bottom: clamp(16px, 3vw, 40px);
    }

    /* ---- Grille par défaut ---- */
    .projects-grid{
      /* centre la grille et ajoute du padding interne */
      width: min(1200px, 92vw);
      margin: clamp(12px, 2vw, 24px) auto 0;
      padding-inline: clamp(8px, 2vw, 24px);

      /* espace plus généreux entre cartes */
      gap: clamp(14px, 2.2vw, 28px);

      /* évite que la grille se comprime verticalement */
      align-content: start;
    }

    /* === Slide 3 : mise en page robuste, sans toucher au HTML === */
    .slide3{
  display: grid;
  grid-template-columns: 1fr minmax(220px, 380px) 1fr;
  grid-template-rows: 1fr minmax(220px, 380px) 1fr;
  gap: 6em;
  align-items: center;
  justify-items: center;
  padding-block: clamp(16px, 3vw, 40px);
  position: relative;
    }

    /* Rond central bien centré et responsive */
    .slide3 .rond-central{
  grid-column: 2;
  grid-row: 2;
  width: clamp(180px, 28vw, 360px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border: 4px solid rgba(255,255,255,.15);
  /* background: radial-gradient(60% 60% at 50% 40%, rgba(255,255,255,.08), transparent 60%); */
  z-index: 1; /* au-dessus si une carte s'approche */
    }

    /* Cartes dans les 4 coins de la grille 3x3 */
    .slide3 .flip-box{
  width: clamp(240px, 28vw, 360px);
  min-height: clamp(160px, 20vw, 240px);
    }

    .slide3 .top-left    { grid-column: 1; grid-row: 1; }
    .slide3 .top-right   { grid-column: 3; grid-row: 1; }
    .slide3 .bottom-left { grid-column: 1; grid-row: 3; }
    .slide3 .bottom-right{ grid-column: 3; grid-row: 3; }

    /* --- Projets : grille fluide et centrée --- */
    .projects-grid {
  margin: 0 auto;
  justify-items: center;
  align-items: start;
  width: min(1200px, 95vw);
  gap: clamp(18px, 4vw, 36px);
    }

    /* --- Cartes projets : largeur max et centrage --- */
    .project-card {
  max-width: 380px;
  margin-inline: auto;
    }

    /* --- Typo et boutons : taille adaptée partout --- */
    .cta-btn, .close-btn {
      font-size: clamp(14px, 2vw, 20px);
      padding: clamp(10px, 2vw, 18px) clamp(18px, 4vw, 28px);
    }

    /* --- Pour éviter tout débordement horizontal --- */
    body, html {
      overflow-x: hidden;
      max-width: 100vw;
    }
    /* IMPORTANT : si tu as ailleurs une règle globale qui centre des items,
       limite-la à la slide projets pour qu'elle n'affecte pas .slide3. Ex. */
    #projects .project-card:nth-child(9){
      grid-column: 1 / 2;
      max-width: 70%;
      justify-self: center;
    }
    /* Et supprime/neutralise l'ancienne version SANS le #projects */

    /* --- Amélioration générale du padding et centrage --- */
   
/* #endregion */

/* media queries pour tablettes sur les flip box slide 3 */
@media (max-width: 1366px) {
    .flip-box {
        position: absolute;
        width: 450px;
        height: 280px;
        perspective: 1000px;
        opacity: 0;
        transform: translateY(30px);
        animation: fadeIn 1.5s forwards;
        cursor: pointer;
        border-radius: clamp(25px, 5vw, 40px);
        overflow: hidden;
    }

    .rond-central {
        position: relative;
        margin: 0 auto;
        width: 300px;
        height: 300px;
        border-radius: 50%;
        overflow: hidden;
        border: clamp(4px, 1vw, 8px) solid rgba(85, 82, 82, 0.9);
        background-image: url('garcon-fait-plusieurs-choses-fois_118167-8219-2799706052.jpg');
        background-size: cover;
        background-position: center;
        box-shadow: 0 0 clamp(25px, 5vw, 45px) rgba(0,0,0,0.7);
        z-index: 5;
    }
}

@media (max-width: 600px) {
/* Slide 2 mobile - Stack vertical */
    .contenu-slide2 {
      flex-direction: column;
      align-items: center;
      gap: 18px;
    }
    .cadre-img {
      margin-bottom: 12px;
    }
/*  */

/* Time line */
    .timeline::after {
        left: 20px;
    }

    .timeline {
    max-width: 98vw;
    padding-left: 0;
  }
  .container {
    width: 100%;
    left: 0 ;
    justify-content: flex-start ;
    padding-left: 30px;
    gap: 10px;
  }

    .container.left .img-circle,
    .container.right .img-circle {
        order: 1;
    }
    
    .container.left .content,
    .container.right .content {
        order: 1;
    }

        .container {
        width: 100%;
        left: 0 !important;
        justify-content: flex-start !important;
        padding-left: 35px;
        gap: 10px;
    }
    
/*  */

/* Contact shortcut */
    .contact-shortcut {
        flex-direction: column;
        gap: 8px;
        padding: 8px 10px;
        max-width: calc(100vw - 20px);
    }
    
    .contact-link {
        font-size: 11px;
    }
/*  */

/* Slide 3 mobile - Stack vertical */
    .titre-slide3 {
        position: relative;
        transform: none;
        left:auto
    }

  .slide3 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(12px, 3vw, 20px);
    padding-block: clamp(10px, 2vw, 20px);
  }
  .flip-box {
    position: static !important;
    width: 95vw !important;
    max-width: 380px !important;
    height: auto !important;
    margin: 0 auto 18px auto !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .flip-box-inner {
    min-height: 220px;
  }
  .rond-central {
    position: static !important;
    margin: 24px auto !important;
    transform: none !important;
    width: 50vw !important ;
    height: 50vw !important ;
  }
/*  */
    .timeline::after {
        left: 15px;
    }
/*slide 5  */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: minmax(9, auto); /* Let rows grow as needed */
    gap: clamp(35px, 6vw, 70px);
    width: min(95vw, 2000px);
    /* Remove height and max-height for auto-sizing */
    /* height: 2000px; */
    /* max-height: 1200px; */
    max-width: 2000px;
    margin: 0 auto;
    justify-items: center;
    align-items: center;
}

.slide5 {
    background: rgba(15, 20, 30, 0.95);
    backdrop-filter: blur(8px);
    min-height: 0;      /* Let content define height */
    height: auto;       /* Let content define height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Stack from top */
    align-items: center;
    overflow: auto;
}

/*  */
}











/* Contact box */
.contact-box {
  position: fixed;
  top: 30px;
  left: 1500px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  padding: 20px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.contact-title {
  color: cyan;
  font-weight: bold;
  font-size: 1.5rem;
  text-decoration: none;
}
.contact-title:hover { color: white; }
.contact-icons {
  display: flex;
  gap: 20px;
}
.contact-link img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.2s, filter 0.2s;
  filter: none !important;
  opacity: 1;
  border-radius: 10px;
}
.contact-link img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px cyan);
}