/* Import police */
@import url('https://fonts.googleapis.com/css?family=Poppins:400,700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Pas de scrollbars */
    font-family: 'Poppins', sans-serif;
    background: #ffe6f2; /* Nouvelle couleur de fond, rose pastel encore différente */
}

.site-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: #f7acc0;
    /* overflow: hidden; */ /* <-- Supprimer ou commenter cette ligne */
}

.vertical-header {
    position: sticky;
    left: 0;
    top: 0;
    height: 100vh;
    width: 15vw;
    min-width: 180px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 2px 0 10px #fca0b9;
    transition: width 0.4s cubic-bezier(.77,0,.18,1);
    /* Animation d'entrée */
    transform: translateX(-100%);
    animation: header-slide-in 1s cubic-bezier(.77,0,.18,1) forwards;
}

@keyframes header-slide-in {
    to { transform: translateX(0); }
}

.header-section {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(.77,0,.18,1);
    border: none;
    outline: none;
    user-select: none;
    min-height: 0;
    min-width: 0;
    z-index: 2;
    width: 100%; /* Agrandit la largeur de base */
    text-decoration: none; /* Enlève le soulignage */
}

.header-section.axel {
    background: #f7acc0;
    color: #d81b60;
}
.header-section.realisations {
    background: #b7f7ff;
    color: #0097a7;
}
.header-section.compte {
    background: #b5ffbb;
    color: #388e3c;
}

/* Hover header : la section s'étend */
.header-section:hover, .header-section:focus {
    width: 100vw;
    z-index: 20;
    box-shadow: 2px 0 20px #d81b6020;
    font-size: 2rem;
    transition: width 0.4s cubic-bezier(.77,0,.18,1), font-size 0.3s;
}

/* Les autres sections restent normales */
.vertical-header .header-section:not(:hover):not(:focus) {
    width: 100%;
    font-size: 1.3rem;
    z-index: 2;
}

/* Layout horizontal */
#horizontal-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow-x: auto; /* Ajoutez ceci */
    overflow-y: hidden;
    position: relative;
    margin-left: 0;
    gap: 0; /* Réduit l'écart entre les slides */
    /* Animation d'entrée pour la vidéo */
}

.slide {
    min-width: 100vw;
    height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.7s, transform 0.7s;
}

.slide.visible {
    opacity: 1;
    transform: translateX(0);
}

.video-slide {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    background: #f7acc0;
    position: relative;
    z-index: 1;
    /* Animation d'entrée après le header */
    animation: video-slide-in 0.7s 1s cubic-bezier(.77,0,.18,1) forwards;
    opacity: 0;
}

@keyframes video-slide-in {
    to { opacity: 1; }
}

.video-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    margin-left: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 1;
}

.video-bg {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    display: block;
    border: none;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.video-bg-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 2;
    pointer-events: all;
}

.presentation-slide {
    background: #f7acc0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 100vw;
    max-width: 100vw;
    padding: 0;
    margin: 0;
}

.presentation {
    width: 100vw;         /* Agrandit la zone de déplacement en largeur */
    max-width: 100vw;
    min-width: 220px;
    height: 100vh;
    margin: 0;
    display: block;
    position: relative;
    z-index: 2;
    background: none;
    overflow: hidden;
}

.presentation-block {
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    padding: 1.2em 2em;
    font-size: 1.5rem;
    font-weight: 500;
    color: #d81b60;
    box-shadow: 0 2px 12px #d81b6020;
    transition: box-shadow 0.3s;
    position: absolute;
    z-index: 2;
    cursor: move;
    user-select: none;
    /* Les marges sont gérées par JS */
}

.presentation-block:last-child {
    margin-bottom: 0;
}

/* Projets : titre centré, cartes sur une ligne, plus hautes et larges */
.projets-slide {
    background: #f7acc0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 100vw;
    max-width: 100vw;
    padding: 0;
    position: relative;
    margin-left: 0;
}

.section-title {
    font-size: 2.6rem;
    color: #d81b60;
    margin: 3vh 0 2vh 0;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    position: static;
    left: unset;
    top: unset;
    width: 100%;
    transform: none;
}

.projects-list {
    display: flex;
    flex-direction: row;
    gap: 4vw;
    justify-content: center;
    align-items: stretch;
    width: 90vw;
    max-width: 1400px;
    margin: 0 auto;
}

.project {
    background: rgba(255,255,255,0.18);
    border-radius: 18px;
    box-shadow: 0 2px 12px #d81b6020;
    padding: 2.5em 1.2em 1.5em 1.2em;
    width: 40vw;
    min-width: 370px;
    max-width: 600px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2vh;
    font-size: 1.1rem;
    justify-content: flex-start;
    position: relative;
}

.project-video {
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 1.5em;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px #d81b6020;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    pointer-events: none;
    background: #fff;
    display: block;
}

.project-info h3 {
    color: #d81b60;
    font-size: 2rem;
    margin: 0 0 0.7em 0;
    text-align: center;
    width: 100%;
}

.project-info p {
    color: #a03c5b;
    font-size: 1.08rem;
    margin: 0;
    text-align: center;
}

/* Réseaux sociaux : titre vertical géant, centré verticalement, penché à -90° */
.reseaux-slide {
    background: #f7acc0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 100vw;
    max-width: 100vw;
    padding: 0;
    height: 100vh;
}

.reseaux-slide .section-title {
    font-size: 10vw;
    font-weight: 900;
    letter-spacing: 2px;
    text-align: center;
    position: absolute;
    left: 0;
    top: 50%;
    width: 70vh;
    height: 70vh;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    margin: 0;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
    opacity: 0.18;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Réseaux sociaux : colonne, hauteur adaptée, images visibles */
.socials {
    display: flex;
    flex-direction: column;
    gap: 6vh;
    justify-content: center;
    align-items: flex-start;
    margin: 0 0 0 12vw;
    width: auto;
    max-width: none;
    height: 80vh;
    z-index: 2;
}

.social-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: #d81b60;
    font-size: 1.5rem;
    font-weight: 600;
    transition: transform 0.2s;
    gap: 1.2em;
}

.social-link:hover {
    transform: scale(1.08);
}

.social-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
    border-radius: 12px;
    background: none !important;
    box-shadow: none !important;
    display: inline-block;
    object-fit: contain;
    /* Correction affichage image */
    max-width: 100%;
    max-height: 100%;
    /* Supprime tout filtre ou opacité éventuelle */
    filter: none !important;
    opacity: 1 !important;
}

::-webkit-scrollbar {
    display: none;
}

/* Bouton d'ajout de texte */
.add-text-btn {
    position: absolute;
    left: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f7acc0;
    color: #d81b60;
    font-size: 2.2rem;
    font-weight: bold;
    border: none;
    box-shadow: 0 2px 8px #d81b6020;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    animation: fadeInLeft 0.6s;
}
.add-text-btn:hover {
    background: #d81b60;
    color: #fff;
    transform: scale(1.08);
}

/* Formulaire d'ajout de texte - design amélioré */
.add-text-form {
    position: absolute;
    left: 80px;
    bottom: 28px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    min-width: 260px;
    max-width: 340px;
    gap: 6px;
    padding: 14px 18px 14px 18px;
    background: rgba(255,255,255,0.98);
    border-radius: 18px;
    box-shadow: 0 4px 24px #d81b6022;
    z-index: 30;
    animation: fadeInUp 0.4s;
    border: 1.5px solid #f7acc0;
}

.add-text-form .text-counter {
    font-size: 1.08rem;
    color: #d81b60;
    font-weight: 700;
    margin-bottom: 2px;
    margin-left: 2px;
    letter-spacing: 0.5px;
    align-self: flex-start;
    width: 100%;
    display: block;
}

.add-text-form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.add-text-form textarea {
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: 10px;
    background: #ffe6f2;
    color: #d81b60;
    width: 220px;
    height: 40px;
    min-width: 220px;
    max-width: 220px;
    min-height: 40px;
    max-height: 40px;
    resize: none;
    box-sizing: border-box;
    overflow: hidden;
    line-height: 1.4;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px #d81b6012;
}

.add-text-form textarea:focus {
    background: #fff0fa;
    box-shadow: 0 2px 8px #d81b6022;
}

.add-text-form .send-text-btn {
    background: #d81b60;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    margin-left: 6px;
    box-shadow: 0 2px 8px #d81b6020;
}
.add-text-form .send-text-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}
.add-text-form .send-text-btn:hover {
    background: #b71c50;
}

.text-counter {
    font-size: 1rem;
    color: #d81b60;
    margin-bottom: 2px;
    margin-left: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
    align-self: flex-start;
    width: 100%;
    display: block;
}

/* Animation d'entrée */
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px);}
    to { opacity: 1; transform: translateX(0);}
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Style pour les nouveaux textes créés dynamiquement */
.presentation-block.user-block {
    background: rgba(255,255,255,0.22);
    color: #d81b60;
    font-size: 1.2rem;
    font-weight: 500;
    min-width: 120px;
    max-width: 320px;
    padding: 1em 1.5em;
    animation: fadeInUp 0.5s;
    border: 1px dashed #f7acc0;
}

/* Responsive */
@media (max-width: 900px) {
    .vertical-header {
        width: 18vw;
        min-width: 80px;
        max-width: 120px;
    }
    .header-section {
        font-size: 1.1rem;
        padding: 1.2vh 0;
    }
    .slide, .presentation-slide, .projets-slide, .reseaux-slide {
        min-width: 100vw;
        max-width: 100vw;
        width: 100vw;
        padding: 0;
        margin: 0;
    }
    .section-title {
        font-size: 1.3rem;
        margin: 2vh 0 1vh 0;
    }
    .section-title-giant, .reseaux-slide .section-title {
        font-size: 2.5rem !important;
        width: 100vw !important;
        height: auto !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        position: static !important;
        margin: 0 0 1em 0 !important;
        text-align: center !important;
        display: block !important;
    }
    .presentation {
        width: 98vw;
        max-width: 99vw;
        min-width: 120px;
        height: 80vh;
        min-height: 320px;
    }
    .presentation-block, .presentation-block.user-block {
        font-size: 1rem;
        min-width: 80px;
        max-width: 90vw;
        padding: 0.7em 1em;
    }
    .add-text-btn {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
        left: 8px;
        bottom: 8px;
    }
    .add-text-form {
        left: 54px;
        bottom: 12px;
        min-width: 120px;
        max-width: 90vw;
        padding: 8px 10px;
    }
    .add-text-form textarea {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        font-size: 0.95rem;
        height: 32px;
        max-height: 32px;
    }
    .add-text-form .send-text-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    .text-counter {
        font-size: 0.9rem;
    }
    .projects-list {
        flex-direction: column;
        gap: 2vw;
        width: 98vw;
        max-width: 99vw;
        align-items: stretch;
    }
    .project {
        width: 95vw;
        min-width: 0;
        max-width: 99vw;
        padding: 1.2em 0.7em 1em 0.7em;
        font-size: 1rem;
    }
    .project-video {
        min-height: 160px;
        max-height: 40vw;
    }
    .socials {
        margin: 0 0 0 2vw;
        gap: 2vh;
        height: auto;
    }
    .social-link {
        font-size: 1rem;
    }
    .social-icon {
        width: 36px;
        height: 36px;
    }
}

/* Pour très petits écrans */
@media (max-width: 600px) {
    .vertical-header {
        min-width: 48px;
        width: 12vw;
        max-width: 60px;
    }
    .presentation {
        height: 60vh;
    }
    .project {
        min-width: 0;
        max-width: 99vw;
        font-size: 0.95rem;
    }
    .project-video {
        min-height: 120px;
        max-height: 30vw;
    }
    .add-text-form {
        left: 38px;
        bottom: 4px;
        min-width: 80px;
        max-width: 95vw;
        padding: 4px 6px;
    }
}
