/* ===== VARIABLES ===== */
:root {
    --bordeaux: #9E2A2F;
    --ardoise: #2C3E50;
    --rouge-clair-1: #C44E52;
    --rouge-clair-2: #D68A8C;
    --beige: #f9f9f9;
}

/* ===== RESET ET STYLES DE BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SECTION HÉRO ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: var(--beige);
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    gap: 20px;
}

/* Photo en cercle */
.profile-pic-container {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bordeaux);
    flex-shrink: 0;
    transition: all 0.5s ease;
    position: relative;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Texte à droite de la photo */
.hero-text {
    text-align: left;
}

.hero-text h1 {
    font-size: 36px;
    font-weight: bold;
    color: var(--ardoise);
    margin-bottom: 10px;
}

.hero-text h2 {
    font-size: 24px;
    font-weight: bold;
    color: var(--bordeaux);
    margin-bottom: 5px;
}

.hero-text p {
    font-size: 16px;
    color: var(--bordeaux);
    margin-bottom: 5px;
}

.hero-text .subtitle {
    font-size: 14px;
    color: var(--ardoise);
}

/* Photo réduite après scroll */
.shrunk-photo-container {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--bordeaux);
    z-index: 1000;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.shrunk-photo-container.visible {
    opacity: 1;
    transform: scale(1);
}

.shrunk-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* En-tête après scroll */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s ease;
}

.header.visible {
    transform: translateY(0);
    opacity: 1;
}

.header-bar {
    height: 6px;
    background-color: var(--bordeaux);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.name-title {
    margin-left: 70px;
}

.name-title h2 {
    font-size: 18px;
    font-weight: bold;
    color: var(--ardoise);
}

.name-title p {
    font-size: 12px;
    color: var(--bordeaux);
}

/* Menu de navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

nav ul li a {
    text-decoration: none;
    color: var(--ardoise);
    font-size: 12px;
    padding: 5px 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--rouge-clair-1);
}

/* ===== SECTION PRINCIPALE ===== */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== SECTIONS ===== */
section {
    padding: 40px 0;
    position: relative;
}

section h2 {
    font-size: 24px;
    font-weight: bold;
    color: var(--bordeaux);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--bordeaux);
}

/* ===== SECTION QUI SUIS-JE ? ===== */
#qui-suis-je {
padding: 40px 0;
background-color: #ffffff;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.about-content p {
    color: #333333;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* ===== CARTES DE COMPÉTENCES ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.skill-card {
    background-color: var(--beige);
    border: 1px solid var(--bordeaux);
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.skill-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 10px rgba(214, 138, 140, 0.2);
    background-color: var(--rouge-clair-2);
    border-color: var(--rouge-clair-1);
}

.skill-card h3 {
    font-size: 14px;
    font-weight: bold;
    color: var(--ardoise);
    margin-bottom: 8px;
}

.skill-card .rating {
    color: var(--bordeaux);
    font-size: 18px !important;
}

/* ===== FLÈCHE SVG ===== */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 100%;
    height: 100%;
    fill: var(--bordeaux);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== CHRONOLOGIE POUR LE PARCOURS ===== */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--bordeaux);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--bordeaux);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--bordeaux);
}

/* Cartes du parcours avec effet de fondu */
.timeline-content {
    max-height: 100px;
    overflow: hidden;
    background-color: var(--beige);
    border: 1px solid var(--bordeaux);
    border-radius: 5px;
    padding: 12px;
    transition: all 0.5s ease;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.timeline-content::after {
    content: "ⓘ";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    color: var(--bordeaux);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.timeline-content:hover, .timeline-content.force-expand {
    max-height: 700px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(214, 138, 140, 0.3);
    border-color: var(--rouge-clair-1);
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
}

.timeline-content:hover::after, .timeline-content.force-expand::after {
    opacity: 1;
    transform: scale(1.2);
}

.timeline-content::before {
    content: "Appuyez pour voir les détails";
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    font-size: 11px;
    color: var(--bordeaux);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-content:hover::before, .timeline-content.force-expand::before {
    opacity: 0;
}

.timeline-content p.hidden-details {
    opacity: 0;
    max-height: 0;
    transition: opacity 0.5s ease, max-height 0.5s ease;
}

.timeline-content:hover p.hidden-details,
.timeline-content.force-expand p.hidden-details {
    opacity: 1;
    max-height: 600px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--bordeaux);
}

.timeline-content h3 {
    color: var(--ardoise);
    font-size: 16px;
    margin-bottom: 5px;
}

.timeline-content .company {
    color: var(--bordeaux);
    font-weight: bold;
    font-size: 14px;
}

.timeline-content .period {
    color: #666666;
    font-size: 12px;
    margin-bottom: 8px;
}

/* ===== FORMATIONS ===== */
.formation-item {
    background-color: var(--beige);
    border-left: 4px solid var(--bordeaux);
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.formation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 10px rgba(214, 138, 140, 0.2);
    background-color: var(--rouge-clair-2);
}

.formation-item h3 {
    color: var(--ardoise);
    font-size: 16px;
    margin-bottom: 5px;
}

.formation-item .school {
    color: var(--bordeaux);
    font-weight: bold;
    font-size: 14px;
}

.formation-item .period {
    color: #666666;
    font-size: 12px;
    margin-bottom: 8px;
}

/* ===== BOUTON DE TÉLÉCHARGEMENT ===== */
.download-cv {
    display: inline-block;
    background-color: var(--bordeaux);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
    font-size: 14px;
}

.download-cv:hover {
    background-color: var(--rouge-clair-1);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.download-cv i {
    margin-right: 6px;
}

/* ===== CARTES DE LOGICIELS ===== */
.logiciels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.logiciel-card {
    background-color: var(--beige);
    border: 1px solid var(--bordeaux);
    border-radius: 5px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.logiciel-card::after {
    content: "ⓘ Cliquez pour voir les détails";
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    font-size: 12px;
    color: var(--bordeaux);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logiciel-card:hover::after {
    opacity: 1;
}

.logiciel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(214, 138, 140, 0.2);
    background-color: var(--rouge-clair-2);
}

.logiciel-card h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--ardoise);
    margin-bottom: 10px;
}

.logiciel-card p {
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== MODALE ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalOpen 0.5s ease;
    overflow-y: auto;
}

@keyframes modalOpen {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: var(--bordeaux);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--rouge-clair-1);
}

.modal-header {
    border-bottom: 2px solid var(--bordeaux);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-header h2 {
    color: var(--ardoise);
    font-size: 24px;
}

.modal-body p {
    color: #333333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-body .rating {
    color: var(--bordeaux);
    font-size: 18px !important;
    margin: 5px 0;
}

/* ===== PIED DE PAGE ===== */
footer {
    background-color: var(--bordeaux);
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

/* ===== RESPONSIVE POUR MOBILE ===== */
@media (max-width: 768px) {
    /* Modale */
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    .modal-header h2 {
        font-size: 20px;
    }
    .modal-body p {
        font-size: 14px;
    }
    .close {
        font-size: 24px;
    }

    /* Correction pour la photo sur mobile */
    .hero-content {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }

    .profile-pic-container {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto 20px !important;
    }

    .profile-pic {
        object-fit: cover !important;
        object-position: center !important;
    }

    .hero-text h1 {
        font-size: 28px !important;
    }

    .hero-text h2 {
        font-size: 20px !important;
    }

    .header-content {
        flex-direction: column !important;
        text-align: center;
        padding: 8px !important;
    }

    .name-title {
        margin-left: 0 !important;
        margin-top: 8px !important;
    }

    nav ul {
        justify-content: center !important;
        margin-top: 8px !important;
    }

    main {
        padding: 20px 10px !important;
    }

    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .shrunk-photo-container {
        left: 5px !important;
        width: 50px !important;
        height: 50px !important;
    }

    /* Alignement de la ligne chronologique */
    .timeline::before {
        left: 10px !important;
    }

    .timeline-item::before {
        left: -20px !important;
    }

    .timeline {
        padding-left: 25px !important;
        margin-left: 5px !important;
    }

    .timeline-content {
        max-height: 70px !important;
        padding: 10px !important;
    }

    .timeline-content:hover, .timeline-content.force-expand {
        max-height: 600px !important;
        padding: 12px !important;
    }

    .timeline-content::before {
        bottom: -18px !important;
        font-size: 10px !important;
    }

    .formation-item, .project-item, .vae-section {
        padding: 12px !important;
    }

    .logiciels-grid {
        grid-template-columns: 1fr !important;
    }

    .logiciel-card::after {
        bottom: -20px !important;
        font-size: 11px !important;
    }
}
