@font-face {
    font-family: 'American Captain';
    src: url("In/Font/American Captain.otf") format('opentype');
    font-weight: normal;
    font-style: normal;

}

/* Police pour les titres uniquement */
h1, h2, h3, h4, h5, h6, nav a {
    font-family: 'American Captain', sans-serif;
}

/* Police de base pour tout le reste */
body, p, li, span, a:not(nav a) {
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    font-family: 'American Captain', Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

h1 {
    font-size: calc(1rem + 3rem); /* 1rem de base + 1rem supplémentaire */
}

h2 {
    font-size: calc(1rem + 2rem); /* 1rem de base + 1rem supplémentaire */
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #000;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
}
nav a {
    font-family: 'American Captain', sans-serif;
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: calc(1rem + 1rem); /* taille augmentée */
    font-weight: normal;
}

nav a:hover {
    color: #898989;
}

/* HERO */
.hero {
    background-image: url('In/img/Variant3.png');
    background-size: 40%;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero h2, .hero p {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 96px;
    margin-bottom: 40px;
}

.hero p {
    font-size: 40px;
    max-width: 1200px;
    line-height: 1.8;
}



/* LIGHTBOX */
#lightbox,
.three-d-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#lightbox.visible,
.three-d-lightbox.visible {
    opacity: 1;
    visibility: visible;
}

#lightbox img,
.three-d-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.close,
.three-d-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}




#lightbox,
.three-d-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#lightbox.visible,
.three-d-lightbox.visible {
    opacity: 1;
    visibility: visible;
}

#lightbox img,
#lightbox video,
.three-d-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.close,
.three-d-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}





/* PROJECTS */
.projects {
    padding: 40px 20px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-item,
.project-item-video {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
    transition: transform 0.3s, border-color 0.3s;
}

.project-item:hover,
.project-item-video:hover {
    transform: scale(1.05);
    border-color: #ffffff;
}

.project-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.project-item-video {
    padding: 0;
    aspect-ratio: 1080 / 1820;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-item-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* ABOUT ME */
.about-me {
    padding: 60px 20px;
    background: linear-gradient(135deg, #000000, #000000);
    color: #fff;
    text-align: center;
}

.about-me h2 {
    font-size: calc(1rem + 1rem + 15px); /* équivaut à ~48px */
    margin-bottom: 20px;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    font-size: 25px; /* réduit depuis 18px ou calc(...) */
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
}

.about-content p {
    margin-bottom: 20px;
}

/* CONTACT */
.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
}

.contact-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 40px 60px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    font-size: 36px;
    line-height: 2.4;
    max-width: 800px;
}

.contact-info a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 36px;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* 3D PROJECTS */
.three-d-projects {
    padding: 40px 20px;
    text-align: center;
}

.three-d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.three-d-item,
.three-d-item-video {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.three-d-item:hover,
.three-d-item-video:hover {
    transform: scale(1.05);
    border-color: #ffffff;
}

.three-d-item-video {
    padding: 0;
    aspect-ratio: 1080 / 1820;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none; /* Pas de fond sombre */
}

.three-d-item-video video,
.three-d-item-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.three-d-item-video a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.three-d-item-video a:hover {
    box-shadow: 0 0 10px #fff5;

}
.three-d-item-video:hover {
    transform: scale(1.05);
    border-color: #ffffff;
    box-shadow: 0 0 10px #ffffff44;
}
.three-d-item:hover {
    transform: scale(1.05);
    border-color: #ffffff;
    box-shadow: 0 0 10px #ffffff44;
}

/* grille (si tu ne l’as pas déjà) */
.dessin-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  
  /* carte, même look que .dessin-video-item */
  .dessin-video-item-16-9 {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, border-color 0.3s;
  }
  .dessin-video-item-16-9:hover { transform: scale(1.05); border-color: #fff; }
  
  /* ratio 16:9 robuste */
  .dessin-video-item-16-9::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 */
  }
  
  /* la vidéo remplit le cadre */
  .dessin-video-item-16-9 > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;   /* mets 'contain' si tu préfères zéro recadrage */
    border-radius: 8px;
  }
  
  /* pour éviter qu’une ancienne règle 9:16 interfère */
  .dessin-video-item video { aspect-ratio: auto; }

/* ==== STYLE PRINCIPAL POUR .dessin-video ==== */

.dessin-video {
    padding: 40px 20px;
    text-align: center;
}

.dessin-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dessin-video-item,
.dessin-video-item-video {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
    transition: transform 0.3s, border-color 0.3s;
}

.dessin-video-item:hover,
.dessin-video-item-video:hover {
    transform: scale(1.05);
    border-color: #ffffff;
}

.dessin-video-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.dessin-video-item-video {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dessin-video-item video {
    aspect-ratio: 9 / 16;
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
}
/* ==== LIGHTBOX ==== */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#lightbox.visible {
    opacity: 1;
    visibility: visible;
}

#lightbox img,
#lightbox video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

/* ==== MEDIA QUERIES ==== */
@media screen and (max-width: 768px) {
    .dessin-video-grid {
        grid-template-columns: 1fr;
    }

    .dessin-video-item,
    .dessin-video-item-video {
        padding: 10px;
    }

    #lightbox img,
    #lightbox video {
        max-width: 95%;
        max-height: 80%;
    }

    #lightbox .close {
        top: 10px;
        right: 20px;
        font-size: 32px;
    }
}




/* MEDIA QUERIES — RESPONSIVE */
@media (max-width: 1024px) {
    .hero h2 {
        font-size: 72px;
    }

    .hero p {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    nav a {
        display: block;
        margin: 10px 0;
    }

    .hero h2 {
        font-size: 48px;
    }

    .hero p {
        font-size: 20px;
    }

    .preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info {
        padding: 20px 30px;
        font-size: 24px;
    }

    .about-me h2 {
        font-size: 28px;
    }

    .about-content {
        font-size: 16px;
    }
}

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

    .hero h2 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .contact-info {
        font-size: 20px;
    }

    .contact-info a {
        font-size: 20px;
    }

    .about-me h2 {
        font-size: 24px;
    }

    .about-content {
        font-size: 14px;
    }
}