/* ==========================================================================
   1. BASE & GENERAL
   ========================================================================== */
body {
    color: #011826;
    background-color: #efeceb;
    margin: 0;
    padding: 0;
    width: 100%;
}

main {
    padding-top: 130px;
    box-sizing: border-box;
    width: 100%;
}

/* ==========================================================================
   2. TITRE PRINCIPAL
   ========================================================================== */
#projet-titre {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 40px;
}

#projet-titre h1 {
    color: #800000;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   3. STRUCTURE CONTENU PRINCIPAL & GALERIES STANDARD
   ========================================================================== */
.projet-main-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

.galerie-captures {
    display: flex !important;
    flex-direction: row;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
}

.galerie-captures figure {
    width: 45%;
    max-width: 550px;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.barre-navigateur {
    background-color: #f1f1f1;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #e1dedd;
}

.point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.point:nth-child(1) { background-color: #ff5f56; }
.point:nth-child(2) { background-color: #ffbd2e; }
.point:nth-child(3) { background-color: #27c93f; }

.url-navigateur {
    font-size: 0.7rem;
    color: #999;
    font-family: monospace;
    margin-left: 10px;
}

.galerie-captures img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* ==========================================================================
   4. OPTIMISATIONS SPECIFIQUES MOCKUP INSTAGRAM (JPO POST)
   ========================================================================== */
.preview-static-box {
    width: 50% !important;
    max-width: 450px !important;
    margin: 0 !important;
}

/* CORRIGÉ : Plus de coupure sur les images ou vidéos statiques de gauche */
.preview-static-box img,
.preview-static-box video {
    width: 100% !important;
    height: auto !important;
    max-height: 580px !important; /* Calé sur la hauteur max des mockups */
    object-fit: contain !important; /* Force l'affichage entier sans rogner */
    border-radius: 0 0 12px 12px;
    display: block;
}

.instagram-mockup-container {
    width: 50% !important;
    max-width: 450px !important;
    margin: 0 !important;
    background-color: #000000;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    user-select: none;
}

.insta-slides-viewport {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.insta-slides {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.insta-slides::-webkit-scrollbar {
    display: none;
}

.insta-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
}

.insta-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    pointer-events: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    transition: opacity 0.2s, background-color 0.2s;
}

.carousel-arrow:hover {
    background-color: #ffffff;
}

.carousel-arrow svg {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
}

.arrow-left { left: 10px; }
.arrow-right { right: 10px; }

/* ==========================================================================
   5. MOCKUPS INTERACTIFS (IFRAMES TABLETTE & MOBILE AGRANDIS)
   ========================================================================== */
.galerie-captures-peuchere {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important; /* Aligne les deux blocs sur leur centre horizontal */
    gap: 30px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.mockup-device {
    background-color: #1a1a1a;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.mockup-device iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background-color: #000;
}

/* Maquette Tablette - Hauteur de référence */
.tablet-box {
    width: 60% !important;
    max-width: 680px !important;
    height: 580px !important;
    border: 14px solid #2e2e2e;
    border-radius: 24px;
}

/* Maquette Téléphone - Version élargie pour Peuchère et Zéro Pointé */
.phone-box {
    width: 100% !important;
    max-width: 380px !important;
    height: 580px !important;
    border: 12px solid #2e2e2e;
    border-radius: 40px;
    box-sizing: border-box;
    position: relative;
}

.phone-box iframe {
    width: 100% !important;
    height: 100% !important;
    transform: scale(1);
    transform-origin: top left;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 16px;
    background-color: #2e2e2e;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

/* ==========================================================================
   6. FICHE TECHNIQUE
   ========================================================================== */
.explication-droite {
    width: 100%;
}

.fiche-technique {
    width: 100%;
    background-color: #ffffff;
    border: none;
    padding: 20px 25px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow-x: auto;
}

.fiche-titre {
    display: none;
}

.fiche-ligne {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: fit-content;
    padding: 0;
}

.fiche-label {
    font-weight: bold;
    color: #800000;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.fiche-valeur {
    color: #011826;
    font-weight: 500;
    font-size: 0.88rem;
    text-align: center;
    white-space: nowrap;
}

/* ==========================================================================
   7. ZONE DESCRIPTIONS & APPRENTISSAGES CRITIQUES
   ========================================================================== */
.zone-bas-contenu {
    width: 100%;
    margin-top: 35px;
    margin-bottom: 80px;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.description-cadre {
    background-color: #ffffff;
    border: 1px solid #e1dedd;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
}

.description-texte {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    text-align: justify;
    margin: 0;
}

.description-texte p { margin: 0 0 15px 0; }
.description-texte p:last-child { margin-bottom: 0; }
.description-texte strong { color: #800000; }

.btn-container {
    display: flex;
    justify-content: flex-start;
}

.btn-download {
    background-color: #011826;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 24px;
    border-radius: 20px;
    border: 1px solid #011826;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-download:hover {
    background-color: transparent;
    color: #011826 !important;
}

.competences-block {
    background-color: #ffffff;
    border-left: 4px solid #800000;
    padding: 25px 35px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-top: 1px solid #e1dedd;
    border-right: 1px solid #e1dedd;
    border-bottom: 1px solid #e1dedd;
    width: 100%;
    box-sizing: border-box;
}

.competences-block h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #800000;
    font-size: 1rem;
    text-transform: uppercase;
}

.ac-tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-tag-list li {
    font-size: 0.92rem;
    line-height: 1.6;
    display: flex;
    gap: 15px;
    align-items: center;
}

.ac-code {
    font-weight: bold;
    color: #800000;
    background-color: #ffebee;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}

.ac-desc { color: #333; }

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES (TABLETTES & SMARTPHONES)
   ========================================================================== */
@media screen and (max-width: 900px) {
    main,
    .projet-main-content,
    .zone-bas-contenu {
        padding-left: 20px;
        padding-right: 20px;
    }

    .galerie-captures {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .galerie-captures-peuchere {
        flex-direction: column !important;
        align-items: center !important;
        gap: 40px !important;
    }

    .preview-static-box, 
    .instagram-mockup-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .preview-static-box img,
    .preview-static-box video,
    .insta-slides-viewport {
        height: 380px !important;
    }
    
    .tablet-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 400px !important;
    }

    .phone-box {
        width: 100% !important;
        max-width: 340px !important;
        height: 520px !important;
    }

    .fiche-technique {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .fiche-ligne {
        flex: none;
        width: 40%;
    }
}