/* =========================================
   0. VARIABLES & RESETS
   ========================================= */

:root {
    --main: #4A73A1;
    --main-light: #B6D0E2;
    --back: #1A1A1A;
    --back-dots: #333;
    --text: #F5F5F5;
    --aux: #00674F;
}

/* =========================================
   1. GLOBAL
   ========================================= */

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: linear-gradient(to bottom, #00000089, transparent);
    position: fixed;
    top: 0;
}

.nom a {
    font-weight: 600;
    font-size: 24px;
    color: var(--text);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-size: 18px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--main-light);
}

nav ul li a.actif {
    color: var(--main);
}

main {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
}

/* =========================================
   2. ACCUEIL
   ========================================= */

.bio {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    padding: 60px 20px;
}

.bio-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.bio-subtitle {
    font-size: 22px;
    color: var(--main-light);
    margin-bottom: 30px;
    font-weight: 500;
}

.bio-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.bio-liens {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.bio-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.bio-btn.primary {
    background-color: var(--main);
    color: var(--text);
}

.bio-btn.primary:hover {
    background-color: var(--main-light);
    color: var(--back);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 115, 161, 0.2);
}

.bio-btn.secondary {
    background-color: transparent;
    color: var(--main-light);
    border: 2px solid var(--main);
}

.bio-btn.secondary:hover {
    background-color: var(--main-light);
    color: var(--back);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 115, 161, 0.2);
    border: 2px solid var(--main-light);
}

.contact-icons {
    margin-top: 100px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-icons a svg {
    width: 32px;
    height: 32px;
    color: var(--text);
    transition: color 0.3s, transform 0.3s;
}

.contact-icons a:hover svg {
    color: var(--main-light);
    transform: scale(1.1);
}

/* =========================================
   3. PORTFOLIO
   ========================================= */

.portfolio {
    max-width: 1200px;
    width: 100%;
}

.portfolio h2, .portfolio h3, .portfolio p {
    text-align: center;
    margin-bottom: 10px;
}

.portfolio h2 {
    font-weight: 700;
    font-size: 32px;
}

.portfolio h3 {
    margin-top: 40px;
    font-size: 24px;
}

/* Grille de cartes */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
    padding: 0 20px;
}

/* Carte */
.card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px #4a73a11f;
}

/* Minias */
.card-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #1a1a1a;
    flex-shrink: 0;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-thumbnail img {
    transform: scale(1.02);
}

/* Minias francetv avec bordure */
.card.zoom .card-thumbnail img {
    transform: scale(1.07) translateY(-4px);
}

.card.zoom:hover .card-thumbnail img {
    transform: scale(1.09) translateY(-4px);
}

.card-content {
    padding: 15px;
}

.card-content h4 {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--main-light);
}

.card-content p {
    font-weight: 300;
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    text-align: left;
}

/* Modale */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}


.video-modal.active {
    visibility: visible;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    color: var(--main-light);
    transform: rotate(90deg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Mobile responsive pour le modal */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -35px;
        font-size: 35px;
    }
}

/* =========================================
   3. CURRICULUM VITAE
   ========================================= */

.cv-section {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.cv-section h2 {
    text-align: center;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 30px;
}

/* Bouton DL */
.cv-section .save {
    display: block;
    width: fit-content;
    margin: 0 auto 60px auto;
    background-color: var(--main);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.save img {
    width: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

.cv-section .save:hover {
    background-color: var(--main-light);
}

/* Catégories du CV */
.cv-categorie {
    margin-bottom: 60px;
}

.cv-categorie h3 {
    font-size: 28px;
    color: var(--main-light);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main);
}

/* Cartes CV */
.cv-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.cv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(74, 115, 161, 0.12);
}

.cv-card h4 {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--main-light);
}

.cv-card p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--main), var(--main-light));
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -47px;
    top: 5px;
    width: 12px;
    height: 12px;
    background-color: var(--main);
    border-radius: 50%;
    border: 3px solid var(--back);
}

.timeline-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--main-light);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.timeline-content .subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--main);
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 8px;
}

.timeline-content .note {
    font-style: italic;
    color: #b0b0b0;
}

.timeline-content a {
    color: var(--main-light);
    text-decoration: underline;
}

.timeline-content a:hover {
    color: var(--main);
}

/* Tags centres d'intérêt */
.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.interest {
    background-color: var(--main);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.2s;
}

.interest:hover {
    background-color: var(--main-light);
    color: var(--back);
    transform: translateY(-2px);
}

/* =========================================
   4. CONTACT
   ========================================= */

.contact-section {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.contact-section h2 {
    text-align: center;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 15px;
}

.contact-intro {
    text-align: center;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 50px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.contact-form-wrapper h3,
.contact-info-wrapper h3 {
    font-size: 24px;
    color: var(--main-light);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main);
}

/* Formulaire */
.contact-form {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 16px;
    color: var(--main-light);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--back);
    border: 2px solid #333;
    border-radius: 5px;
    color: var(--text);
    font-family: 'Inter Tight', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--main);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--main);
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter Tight', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: var(--main-light);
    color: var(--back);
    transform: translateY(-2px);
}

/* Informations de contact */
.contact-info {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item svg {
    flex-shrink: 0;
    color: var(--main);
    margin-top: 2px;
}

.info-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-light);
    margin-bottom: 5px;
}

.info-item p {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
}

.info-item a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.info-item a:hover {
    color: var(--main-light);
}

.social-liens {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-liens a {
    padding: 6px 14px;
    background-color: var(--back);
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.social-liens a:hover {
    background-color: var(--main);
}

.contact-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 10px;
    border-left: 4px solid var(--main);
}

.contact-note p {
    font-size: 14px;
    color: var(--text);
    font-style: italic;
}

/* =========================================
   9. MOBILE
   ========================================= */
   
@media (max-width: 768px) {
    header {
        padding: 20px 25px;
    }

    .bio {
        padding: 40px 20px;
    }

    .bio-title {
        font-size: 32px;
    }

    .bio-subtitle {
        font-size: 18px;
    }

    .bio-description {
        font-size: 16px;
    }

    .bio-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 10px;
    }

    .card-content h4 {
        font-size: 16px;
    }

    .card-content p {
        font-size: 13px;
    }
    .cv-section h2 {
        font-size: 28px;
    }
    
    .cv-categorie h3 {
        font-size: 24px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding-left: 15px;
    }
    
    .timeline-item::before {
        left: -28px;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-section h2 {
        font-size: 28px;
    }

    .contact-intro {
        font-size: 16px;
    }

    .contact-form,
    .contact-info {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }

    .submit-btn {
        font-size: 15px;
    }
}

/* =========================================
   404
   ========================================= */

.error {
    margin-bottom: 20px;
}