/* =====================================================
   MODERN UPGRADE — style-modern.css
   Appliqué par-dessus les styles existants
   ===================================================== */

/* 1. Poppins — hébergée en local */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 2. Base typography */
body,
main {
    font-family: 'Poppins', Calibri, sans-serif;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

/* Bouton langue FR/EN dans la navbar */
.lang-switch-item a#langSwitchNav {
    background: linear-gradient(135deg, rgba(3,169,244,0.15), rgba(123,47,247,0.15)) !important;
    border: 1px solid rgba(3,169,244,0.35) !important;
    border-radius: 20px !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    padding: 8px 16px !important;
    margin: auto 8px;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
}
.lang-switch-item a#langSwitchNav:hover {
    background: linear-gradient(135deg, rgba(3,169,244,0.35), rgba(123,47,247,0.35)) !important;
    box-shadow: 0 0 15px rgba(3,169,244,0.3);
}
.lang-switch-item a#langSwitchNav::after {
    display: none !important;
}

.main-navigation {
    background: rgba(18, 18, 28, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.main-navigation ul li a {
    letter-spacing: 1.5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(220, 220, 235, 0.85);
    padding: 22px 28px;
    position: relative;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #03a9f4, #7b2ff7);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

.main-navigation ul li:hover > a::after,
.main-navigation ul li.focus > a::after {
    width: 80%;
    left: 10%;
}

.main-navigation ul li:hover > a,
.main-navigation ul li.focus > a {
    background: rgba(3, 169, 244, 0.1);
    color: #ffffff;
}

/* =====================================================
   HERO / SECTION PRÉSENTATION
   ===================================================== */

#sectionPresentation {
    background: linear-gradient(135deg, #0b0718 0%, #140b34 45%, #1c1050 100%);
    padding-top: 90px;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}

/* Glow ambiance top-right */
#sectionPresentation::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(3, 169, 244, 0.12) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    pointer-events: none;
    z-index: 0;
}

/* Glow ambiance bottom-left */
#sectionPresentation::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(123, 47, 247, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 0;
}

/* Titre principal avec dégradé */
#titre {
    font-family: 'Poppins', sans-serif;
    font-size: 3.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #03a9f4 55%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

/* Photo de profil — circulaire + halo */
#presentation #presentationGauche img {
    border-radius: 50% !important;
    border: 3px solid rgba(3, 169, 244, 0.5);
    box-shadow: 0 0 0 6px rgba(3, 169, 244, 0.08),
                0 0 40px rgba(3, 169, 244, 0.25),
                0 0 80px rgba(123, 47, 247, 0.12);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

#presentation #presentationGauche img:hover {
    box-shadow: 0 0 0 8px rgba(3, 169, 244, 0.12),
                0 0 60px rgba(3, 169, 244, 0.4),
                0 0 100px rgba(123, 47, 247, 0.2);
    transform: scale(1.04) !important;
}

/* Texte de présentation */
#presentation #presentationDroite {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-style: normal;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

#presentationDroite p {
    color: rgba(200, 210, 230, 0.9);
    margin: 0.7em 0;
}

/* =====================================================
   TITRES DE SECTIONS — soulignement décoratif
   ===================================================== */

#titreCompetence,
#titreProfessionnel,
#titreFormation,
#MonPortfolio h2,
#titrePortfolio {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#titreCompetence::after,
#titreProfessionnel::after,
#titreFormation::after,
#MonPortfolio h2::after,
#titrePortfolio::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #03a9f4, #a855f7);
    border-radius: 2px;
    margin: 14px auto 0;
}

/* =====================================================
   BOUTON CV
   ===================================================== */

#buttonCV,
#buttonCV2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 50px;
    padding: 14px 36px;
    line-height: normal;
    transform: none;
    display: inline-block;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#buttonCV:hover,
#buttonCV2:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(3, 169, 244, 0.5);
}

/* =====================================================
   SECTION COMPÉTENCES
   ===================================================== */

.technologies h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 20px;
}

/* =====================================================
   SECTION PORTFOLIO — cartes modernisées
   ===================================================== */

#portfolio article,
#modalExpertPorfolio article,
#modalAvancePorfolio article,
#modalDebutantPorfolio article {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}

#portfolio article:hover,
#modalExpertPorfolio article:hover,
#modalAvancePorfolio article:hover,
#modalDebutantPorfolio article:hover {
    box-shadow: 0 20px 50px rgba(3, 169, 244, 0.25) !important;
    transform: translateY(-8px);
}

#portfolio article div p:first-child,
#modalExpertPorfolio article div p:first-child,
#modalAvancePorfolio article div p:first-child {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #1a1a2e;
}

/* =====================================================
   SECTION CONTACTS — remplace l'orange
   ===================================================== */

#Contacts {
    background: linear-gradient(160deg, #0f0c29 0%, #1a1640 40%, #16213e 100%) !important;
    border-top: 3px solid rgba(3, 169, 244, 0.4);
    padding: 80px 20px 80px;
}

#Contacts h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
}

#Contacts h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: rgba(200, 215, 240, 0.8);
    letter-spacing: 0.5px;
}

/* Icônes sociales */
#Contacts img {
    height: 56px;
    width: 56px;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#Contacts a:hover img {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 12px 35px rgba(3, 169, 244, 0.45) !important;
}

/* Séparateur HR */
hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 200px;
}

/* Formulaire de contact */
#Contacts .form input,
#Contacts .form textarea {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 14px 18px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

#Contacts .form input:focus,
#Contacts .form textarea:focus {
    border-color: #03a9f4;
    background: rgba(3, 169, 244, 0.07);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.15);
}

#Contacts .form input::placeholder,
#Contacts .form textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#Contacts .form input[type=submit],
.button_pink {
    background: linear-gradient(135deg, #03a9f4, #7b2ff7) !important;
    color: white !important;
    border-radius: 50px !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600 !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 32px !important;
    font-size: 0.8em !important;
    max-width: 220px !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(3, 169, 244, 0.3) !important;
}

#Contacts .form input[type=submit]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(3, 169, 244, 0.5) !important;
}

/* Validation — moins agressif */
:valid {
    box-shadow: none !important;
}
:invalid {
    box-shadow: none !important;
}
#Contacts .form input:valid:not([type=submit]):not([type=hidden]),
#Contacts .form textarea:valid {
    border-color: rgba(3, 169, 244, 0.4);
}
#Contacts .form input:invalid:not([type=submit]):not([type=hidden]):not(:placeholder-shown),
#Contacts .form textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(244, 65, 165, 0.5);
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    background: linear-gradient(135deg, #0b0718, #0d0d1a) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 35px 30px;
}

.whiteNoBold {
    color: rgba(255, 255, 255, 0.5) !important;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82em;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    margin: 0;
}

footer div p.whiteNoBold:hover {
    color: #03a9f4 !important;
    cursor: default;
}

/* =====================================================
   SCROLLBAR PERSONNALISÉE
   ===================================================== */

::-webkit-scrollbar {
    width: 7px;
}
::-webkit-scrollbar-track {
    background: #0d0d1a;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(#03a9f4, #7b2ff7);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(#29b6f6, #9c4df4);
}

/* =====================================================
   TIMELINE — améliorations
   ===================================================== */

.timeline2 ul {
    background: linear-gradient(160deg, #2a3f6f, #3a4fc8) !important;
}

.timeline2 ul li div {
    background: linear-gradient(135deg, #03a9f4, #1565c0) !important;
    border-radius: 8px;
}

.timeline2 ul li:nth-child(odd) div::before {
    border-color: transparent #03a9f4 transparent transparent !important;
}
.timeline2 ul li:nth-child(even) div::before {
    border-color: transparent transparent transparent #03a9f4 !important;
}

/* =====================================================
   FORMATIONS — lisibilité
   ===================================================== */

.texteTitreFormation {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
}

.texteFormation {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    line-height: 1.8;
}

/* =====================================================
   FIX OVERFLOW HORIZONTAL — empêche l'ascenseur mobile
   ===================================================== */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* nav negative margin → déborde sur mobile */
.main-navigation {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* sectionTitre a une largeur fixe de 1841px */
.sectionTitre {
    width: 100% !important;
    left: 0 !important;
    position: relative !important;
}

/* betterToRead marges latérales fixes */
@media screen and (max-width: 900px) {
    .betterToRead {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }
}

/* =====================================================
   RESPONSIVE — menu burger étendu à 768px
   ===================================================== */

@media screen and (max-width: 768px) {
    #navOrdinateur {
        display: none !important;
    }
    #menuPortable {
        display: flex !important;
        height: auto;
        min-height: 56px;
        background: rgba(18, 18, 28, 0.97) !important;
        border-bottom: 1px solid rgba(3, 169, 244, 0.2);
        align-items: center;
        padding: 0 16px;
    }
    #menuCentrePortable {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 0 !important;
        background: transparent !important;
    }
    #menuBurger {
        width: 36px !important;
        height: auto;
        cursor: pointer;
        position: relative;
        top: 0;
        filter: brightness(1.5);
    }
    /* Ajout nom sur la navbar mobile */
    #menuCentrePortable::before {
        content: 'Théophile Avenel';
        color: rgba(200, 215, 240, 0.85);
        font-family: 'Poppins', sans-serif;
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    /* Modal menu mobile */
    .liLienMenuPortable {
        background: rgba(3, 169, 244, 0.06) !important;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.07);
        transition: background 0.2s;
    }
    .liLienMenuPortable:hover {
        background: rgba(3, 169, 244, 0.15) !important;
    }
    .liLienMenuPortable a {
        color: rgba(200,215,240,0.9);
        font-family: 'Poppins', sans-serif;
        font-size: 0.95rem;
        font-weight: 500;
        letter-spacing: 1px;
        display: block;
        padding: 12px 0;
    }
    /* Hero sur mobile */
    #titre {
        font-size: 2.2rem !important;
        margin-top: 80px !important;
    }
    #presentation {
        flex-direction: column;
        margin-left: 0 !important;
        padding: 0 16px;
        width: 100% !important;
        box-sizing: border-box;
    }
    #presentationGauche,
    #presentationDroite {
        width: 100% !important;
        box-sizing: border-box;
    }
    .image {
        width: 60%;
        margin: 0 auto 24px;
    }

    /* Timeline — cartes trop larges sur mobile */
    .timeline2 ul li div {
        width: calc(100vw - 80px) !important;
        max-width: 280px;
    }
    .timeline2 ul li:nth-child(even) div {
        left: 45px !important;
    }
    .timeline2 ul li:nth-child(odd) div {
        left: 45px !important;
    }
    .timeline2 ul li:nth-child(even) div::before {
        left: -15px !important;
        right: auto !important;
        border-width: 16px 16px 16px 0 !important;
        border-color: transparent #03a9f4 transparent transparent !important;
    }
    .timeline2 ul li {
        margin-left: 16px !important;
    }
    .timeline2 ul li:nth-child(odd) .time,
    .timeline2 ul li:nth-child(even) .time {
        position: static !important;
        display: block;
        font-size: 0.75rem;
        opacity: 0.7;
        width: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        margin-top: 6px;
    }

    /* Sections pleine largeur */
    #MesExperiencesProfessionnel,
    #MesFormations,
    #MonPortfolio,
    #Contacts,
    #MesCompetences {
        width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Formations */
    #formations {
        padding: 0 16px !important;
        box-sizing: border-box;
    }
    .texteTitreFormation,
    .texteFormation {
        word-break: break-word;
    }
}

@media screen and (min-width: 421px) and (max-width: 768px) {
    #menuPortable {
        display: flex !important;
    }
    #navOrdinateur {
        display: none !important;
    }
    #presentation {
        flex-direction: column;
        margin-left: 0 !important;
        padding: 0 16px;
        width: 100% !important;
        box-sizing: border-box;
    }
    #presentationGauche,
    #presentationDroite {
        width: 100% !important;
        box-sizing: border-box;
    }
    .image {
        width: 50%;
        margin: 0 auto 24px;
    }
    #titre {
        margin-top: 70px !important;
    }
}

/* =====================================================
   LIENS CERTIFICATS
   ===================================================== */

#lienCertificat a {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
}

#lienCertificat a:hover {
    background: rgba(3, 169, 244, 0.15);
    border-color: #03a9f4;
    color: #03a9f4;
}
