/* cv.css - Styles unifiés pour la page CV du site de Nicolas TARIELLO */

/* Polices et couleurs cohérentes avec header et footer */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

.cv__title {
    color: #0a4c81;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
}

.cv__title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #40c8ff;
}

/* Styles pour le logo LinkedIn */
.cv__avatar {
    margin: 0 auto 1rem;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv__avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cv__linkedin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cv__linkedin-link:hover {
    background-color: rgba(10, 102, 194, 0.1);
}

.cv__linkedin-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cv__linkedin-link:hover .cv__linkedin-logo {
    transform: scale(1.1);
}

/* Styles pour les icônes améliorées */
.cv__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a4c81 0%, #40c8ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
    box-shadow: 0 3px 10px rgba(10, 76, 129, 0.3);
    transition: all 0.3s ease;
}

.cv__icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(10, 76, 129, 0.4);
}

.cv__icon:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1.2rem;
    color: white;
}

.cv__icon-experience:before {
    content: "\f0b1"; /* briefcase icon */
}

.cv__icon-projects:before {
    content: "\f0ae"; /* tasks icon */
}

.cv__icon-education:before {
    content: "\f19d"; /* graduation cap icon */
}

/* Animation de pulsation pour les icônes */
.cv__icon:after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a4c81 0%, #40c8ff 100%);
    opacity: 0;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Styles pour la partie "Vous voulez en savoir plus" */
.cv__more-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.cv__more-info-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cv__more-info-text {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cv__download-arrow {
    margin: 1rem 0 2rem;
    animation: bounce 2s infinite;
}

.cv__icon-arrow-down {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    position: relative;
}

.cv__icon-arrow-down:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
    left: 10px;
    top: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Appliquer la transformation de retournement à l'élément interne */
.cv__card.flipped .cv__card-inner {
    transform: rotateY(180deg);
}

/* Retirer toute transition sur la carte elle-même */
.cv__card {
    transition: none;
}

/* Empêcher les effets de survol quand la carte est retournée */
.cv__card.flipped {
    transform: none !important;
}

/* Styles généraux de la page */
.cv {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    padding-bottom: 4rem;
    background-color: #f8f9fa;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

/* Section d'introduction */
.cv__intro {
    margin: 4rem auto;
    text-align: center;
}


.cv__intro-text {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: #666;
}

/* Styles pour la carte CV qui se retourne */
.cv__card-container {
    margin: 3rem auto;
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
}

.cv__card {
    width: 100%;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    animation: fadeIn 0.8s ease-out forwards;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.cv__card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.cv__card.flipped {
    transform: rotateY(180deg);
}

.cv__card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.cv__card-front, .cv__card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.cv__card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.cv__card-back {
    background: linear-gradient(135deg, #0a4c81 0%, #1a67a3 100%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.cv__card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cv__avatar-placeholder {
    font-size: 3rem;
    font-weight: 700;
    color: #0a4c81;
}

.cv__card-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a4c81;
    margin-bottom: 0.5rem;
}

.cv__card-title {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.cv__highlights {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
}

.cv__highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv__skills-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.cv__skill-tag {
    background-color: #e9ecef;
    color: #0a4c81;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cv__skill-tag:hover {
    background-color: #0a4c81;
    color: white;
    transform: translateY(-3px);
}

.cv__skill-tag:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.cv__skill-tag:hover:before {
    left: 100%;
}

/* BOUTONS HARMONISÉS AVEC RÉALISATIONS */
.cv__flip-button {
    background-color: #3e6bba; /* Couleur harmonisée avec réalisations */
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px; /* Border-radius harmonisé */
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(10, 76, 129, 0.2); /* Shadow harmonisée */
}

.cv__flip-button:hover {
    background-color: #090844; /* Couleur hover harmonisée */
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(10, 76, 129, 0.3); /* Shadow hover harmonisée */
}

.cv__flip-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;
    z-index: -1;
}

.cv__flip-button:hover:before {
    left: 100%;
}

.cv__icon-flip, .cv__icon-flip-back {
    margin-left: 0.5rem;
}

.cv__section-title {
    color: #0a4c81;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

/* Spécifique pour la section-title à l'intérieur de card-back */
.cv__card-back .cv__section-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    text-align: left;
}

.cv__section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #40c8ff;
}

.cv__timeline {
    margin-bottom: 1.5rem;
}

.cv__timeline-item {
    display: flex;
    margin-bottom: 1rem;
    text-align: left;
    position: relative;
}

.cv__timeline-item:after {
    content: '';
    position: absolute;
    left: 110px;
    top: 10px;
    height: 0;
    width: 2px;
    background-color: #40c8ff;
    transition: height 0.8s ease;
}

.cv__timeline-item.animated:after {
    height: calc(100% - 10px);
}

.cv__timeline-date {
    flex: 0 0 120px;
    font-weight: 600;
    color: #40c8ff;
}

.cv__timeline-content {
    flex: 1;
}

.cv__timeline-content h4 {
    margin: 0 0 0.3rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.cv__timeline-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* BOUTON TÉLÉCHARGEMENT HARMONISÉ */
.cv__download-button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: white;
    color: #3e6bba; /* Couleur harmonisée */
    text-decoration: none;
    border-radius: 50px; /* Border-radius harmonisé */
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2); /* Shadow harmonisée */
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cv__download-button:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(255, 255, 255, 0.3); /* Shadow hover harmonisée */
}

.cv__download-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width 0.8s ease;
}

.cv__download-button.downloading:before {
    width: 100%;
}

.cv__flip-back {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.cv__flip-back:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Section des compétences */
.cv__skills-section {
    margin: 4rem auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

.cv__skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cv__skill-category {
    margin-bottom: 1.5rem;
}

.cv__skill-category-title {
    color: #666;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.cv__skill-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv__skill-item {
    margin-bottom: 0.8rem;
}

.cv__skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.cv__skill-name {
    font-weight: 500;
}

.cv__skill-percentage {
    color: #666;
}

.cv__skill-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.cv__skill-bar {
    height: 100%;
    background: linear-gradient(90deg, #0a4c81 0%, #40c8ff 100%);
    border-radius: 4px;
    width: 0; /* Animation par JS */
    position: relative;
    overflow: hidden;
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.cv__skill-bar:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
    transform: skewX(-20deg) translateX(-100%);
    opacity: 0;
}

.animated .cv__skill-bar:after {
    opacity: 1;
}

/* Section expérience interactive */
.cv__experience-interactive {
    margin: 4rem auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

.cv__experience-tabs {
    margin-top: 2rem;
}

.cv__tabs-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
}

/* BOUTONS ONGLETS HARMONISÉS */
.cv__tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cv__tab-button:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #3e6bba; /* Couleur harmonisée */
    transition: width 0.3s ease;
}

.cv__tab-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background-color: rgba(62, 107, 186, 0.1); /* Couleur harmonisée */
    transform: translateX(-50%);
    transition: width 0.3s ease;
    z-index: -1;
}

.cv__tab-button:hover:before {
    width: 100%;
}

.cv__tab-button.active {
    color: #3e6bba; /* Couleur harmonisée */
}

.cv__tab-button.active:after {
    width: 100%;
}

.cv__tab-button:hover {
    color: #3e6bba; /* Couleur harmonisée */
}

.cv__tabs-content {
    position: relative;
    min-height: 300px;
}

.cv__tab-pane {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.cv__tab-pane.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.cv__tab-pane.fade-in {
    animation: fadeInTab 0.3s forwards;
}

.cv__tab-pane.fade-out {
    animation: fadeOutTab 0.3s forwards;
}

.cv__job {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.cv__job:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.cv__job-title {
    color: #0a4c81;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.cv__job-period {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cv__job-tasks {
    padding-left: 1.2rem;
}

.cv__job-tasks li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 5px;
}

.cv__job-tasks li:before {
    content: '';
    position: absolute;
    left: -1.2rem;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #40c8ff;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.cv__job-tasks li.animated:before {
    transform: scale(1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOutTab {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-20px); }
}

@keyframes shimmer {
    100% {
        transform: skewX(-20deg) translateX(300%);
    }
}

/* Classes d'animation génériques */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, all 0.3s ease;
}

.animate-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Media queries pour responsive */
@media (max-width: 992px) {
    .cv__skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cv__card-container {
        height: auto;
    }

    .cv__card {
        height: 650px;
    }

    .cv__tabs-nav {
        flex-wrap: wrap;
    }

    .cv__tab-button {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.8rem 1rem;
    }

    .cv__title, .cv__section-title {
        font-size: 1.6rem;
    }

    .cv__card-name {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .cv__card {
        height: 700px;
    }

    .cv__highlights {
        flex-direction: column;
        gap: 1rem;
    }

    .cv__highlight {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }

    .cv__title, .cv__section-title {
        font-size: 1.4rem;
    }

    .cv__tabs-nav {
        overflow-x: auto;
    }
}