/* Variables CSS pour les couleurs */
:root {
    --white: #FFFFFF;
    --light-beige: #F2EEE2;
    --dark-teal: #04656C;
    --darker-teal: #065D64;
    --very-dark-green: #224048;
    --light-sage: #BAD1C6;
}

/* Préloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: var(--white);
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-sage);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.preloader-progress {
    width: 200px;
    height: 4px;
    background: var(--light-sage);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.preloader-bar {
    height: 100%;
    background: var(--white);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--dark-teal);
    color: var(--very-dark-green);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    min-height: 100vh;
    position: relative;
    padding: 2rem 1rem;
}

/* Background texture effect */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('texture.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: multiply;
    opacity: 0.3;
    z-index: 1;
}

/* Logo Z&KO */
.logo-zandko {
    position: fixed;
    bottom: -50px;
    left: -100px;    
    width: 700px;
    height: 700px;
    z-index: 5;
    pointer-events: none;
}

.logo-zandko img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    color: var(--light-beige);
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    padding: 0 1rem;
    line-height: 1.2;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main content */
.content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modules communs */
.module {
    background-color: var(--light-beige);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.module:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Module Vidéo */
.video-module {
    width: 365px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.video-container {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* Gestion desktop/tablette vs mobile */
.vimeo-player-desktop {
    display: block;
}

.vimeo-player-mobile {
    display: none;
}

/* Image de prévisualisation mobile */
.vimeo-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
}

/* Supprimer l'ancien overlay et utiliser le même bouton que desktop */
.vimeo-player-mobile .custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--dark-teal);
    border: 3px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: auto;
}

.vimeo-player-mobile .custom-play-button:hover {
    background: var(--darker-teal);
    transform: translate(-50%, -50%) scale(1.1);
}

.vimeo-player-mobile .custom-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid var(--white);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

/* Modal Vimeo */
.vimeo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.vimeo-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vimeo-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.vimeo-modal-close:hover {
    color: #ccc;
}

.vimeo-modal-iframe-container {
    width: 100%;
    height: 100%;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
}

.vimeo-modal-iframe-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}


/* Bouton de lecture personnalisé */
.custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--dark-teal);
    border: 3px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: auto;
}

.custom-play-button:hover {
    background: var(--darker-teal);
    transform: translate(-50%, -50%) scale(1.1);
}

.custom-play-button.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* S'assurer que le bouton soit au-dessus de tout le contenu Vimeo */
.video-container {
    position: relative;
}

#vimeoPlayer {
    position: relative;
    z-index: 1;
}

.custom-play-button {
    z-index: 9999 !important;
}

.custom-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid var(--white);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.video-container {
    position: relative;
}



/* Module Carousel */
.carousel-module {
    width: 500px;
    height: 600px;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    padding-bottom: 4rem;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    pointer-events: none;
    z-index: 1;
}

.carousel-slide.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.slide-content h3 {
    color: var(--dark-teal);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.slide-content p {
    color: var(--very-dark-green);
    font-size: 1rem;
    line-height: 1.6;
}

/* Image Viewer dans le carousel */
.image-viewer {
    width: 100%;
    height: calc(100% - 4rem);
    border-radius: 15px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
    background: var(--white);
}

.carousel-image:hover {
    transform: scale(1.02);
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-link:hover .carousel-image {
    transform: scale(1.02);
}

/* PDF Placeholder pour fallback */
.pdf-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-beige) 0%, var(--white) 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed var(--dark-teal);
}

.pdf-placeholder:hover {
    background: linear-gradient(135deg, var(--light-sage) 0%, var(--light-beige) 100%);
    transform: scale(1.02);
    border-color: var(--darker-teal);
}

.pdf-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.pdf-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-teal);
    margin-bottom: 0.5rem;
}

.pdf-subtitle {
    font-size: 1rem;
    color: var(--very-dark-green);
    opacity: 0.8;
}

.carousel-controls {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    width: calc(100% - 1rem);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
    background: rgba(242, 238, 226, 0.98);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.carousel-btn {
    background-color: var(--white);
    color: var(--dark-teal);
    border: 2px solid var(--dark-teal);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.carousel-btn:hover {
    background-color: var(--dark-teal);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-dots {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--light-sage);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dot.active {
    background-color: var(--dark-teal);
    transform: scale(1.2);
}

/* Module Profil */
.profile-module {
    width: 865px;
    height: 700px;
    overflow-y: auto;
}

.profile-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-header {
    text-align: center;
    border-bottom: 2px solid var(--light-sage);
    padding-bottom: 1rem;
}

.profile-name {
    color: var(--dark-teal);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-title {
    color: var(--very-dark-green);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.profile-location {
    color: var(--very-dark-green);
    font-size: 0.9rem;
    opacity: 0.8;
}

.profile-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    color: var(--dark-teal);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-link {
    color: var(--very-dark-green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--dark-teal);
    text-decoration: underline;
}

.profile-section {
    border-bottom: 1px solid var(--light-sage);
    padding-bottom: 1rem;
}

.profile-section h3 {
    color: var(--dark-teal);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.skill-tag {
    background: var(--dark-teal);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.languages-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
}

.language-name {
    color: var(--very-dark-green);
    font-weight: 500;
}

.language-level {
    color: var(--dark-teal);
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-summary {
    color: var(--very-dark-green);
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: justify;
}

.experience-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-sage);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.experience-header h4 {
    color: var(--dark-teal);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.experience-duration {
    color: var(--very-dark-green);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--light-sage);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.experience-role {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.experience-role strong {
    color: var(--very-dark-green);
    font-size: 1rem;
    font-weight: 600;
}

.experience-period {
    color: var(--dark-teal);
    font-size: 0.85rem;
    font-weight: 500;
}

.experience-description {
    color: var(--very-dark-green);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: justify;
}

/* Bloc Contact */
.contact-block {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.contact-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 300px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact-button:hover::before {
    left: 100%;
}

.email-button {
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--darker-teal) 100%);
    color: var(--white);
}

.email-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(4, 101, 108, 0.3);
}

.phone-button {
    background: linear-gradient(135deg, var(--very-dark-green) 0%, var(--dark-teal) 100%);
    color: var(--white);
}

.phone-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(34, 64, 72, 0.3);
}

.button-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.button-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.button-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.button-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
    
    .video-module,
    .carousel-module,
    .profile-module {
        width: 100%;
        max-width: 500px;
    }
    
    .video-module {
        max-width: 500px;
    }
    
    .carousel-module {
        max-width: 500px;
        height: 700px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .content {
        gap: 2rem;
    }
    
    .module {
        padding: 1.5rem;
    }
    
    .video-module,
    .carousel-module,
    .profile-module {
        height: 600px;
        width: 100%;
        max-width: 100%;
    }
    
    /* Gestion vidéo mobile */
    .vimeo-player-desktop {
        display: none !important;
    }
    
    .vimeo-player-mobile {
        display: block !important;
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    /* Cacher le bouton de lecture personnalisé sur desktop mobile, mais garder celui du mobile */
    .vimeo-player-desktop .custom-play-button {
        display: none !important;
    }
    
    .vimeo-player-mobile .custom-play-button {
        display: flex !important;
    }
    
    .carousel-image {
        object-fit: cover;
        max-height: 100%;
    }
    
    .profile-content {
        gap: 1rem;
    }
    
    .profile-name {
        font-size: 1.8rem;
    }
    
    .profile-contact {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .skills-grid {
        gap: 0.5rem;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-button {
        min-width: 250px;
        padding: 1.2rem 1.5rem;
    }
    
    .button-icon {
        font-size: 1.5rem;
    }
    
    .button-title {
        font-size: 1rem;
    }
    
    .button-subtitle {
        font-size: 0.8rem;
    }
    
    .pdf-placeholder {
        padding: 1rem;
    }
    
    .pdf-icon {
        font-size: 2rem;
    }
    
    .pdf-title {
        font-size: 1.2rem;
    }
    
    .carousel-controls {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        background: rgba(242, 238, 226, 0.98);
        padding: 0.6rem 0.8rem;
        width: calc(100% - 1rem);
        border-radius: 10px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .carousel-dots {
        gap: 0.3rem;
        margin: 0 0.8rem;
    }
    
    .dot {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .module {
        padding: 1rem;
    }
    
    .video-module,
    .carousel-module,
    .profile-module {
        height: 500px;
        width: 100%;
        max-width: 100%;
    }
    
    .slide-content h3 {
        font-size: 1.5rem;
    }
    
    .cv-item {
        padding: 1rem;
        min-height: 120px;
    }
    
    .cv-item h3 {
        font-size: 1.1rem;
    }
    
    .contact-block {
        margin: 2rem auto 0;
    }
    
    .contact-button {
        min-width: 200px;
        padding: 1rem 1.2rem;
    }
    
    .button-icon {
        font-size: 1.3rem;
    }
    
    .button-title {
        font-size: 0.9rem;
    }
    
    .button-subtitle {
        font-size: 0.75rem;
    }
}
