/* ==========================================================
   Surcharges du thème hugo-profile — style cohérent du site
   Titres : Alata · Texte : Roboto
   ========================================================== */

/* --- Polices : une seule famille pour le texte, une pour les titres --- */
body,
.secondary-font, #secondary-font,
#single, #single .page-content {
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.navbar, .navbar-brand, .nav-link, .btn,
.card-title, .toc .toc-title, #single .title h1 {
    font-family: "Alata", "Roboto", sans-serif !important;
    letter-spacing: 0.01em !important;
}

/* --- Titres de section : même look partout --- */
#about > .container > h3,
#experience > .container > h3,
#education > .container > h3,
#projects > .container > h3 {
    color: var(--text-color) !important;
    font-size: clamp(1.7rem, 3vw, 2.2rem) !important;
    opacity: 1 !important;
    margin-bottom: 2.5rem !important;
}

#about > .container > h3::after,
#experience > .container > h3::after,
#education > .container > h3::after,
#projects > .container > h3::after {
    content: "";
    display: block !important;
    width: 48px !important;
    height: 3px !important;
    margin: 0.6rem auto 0 !important;
    border-radius: 2px !important;
    background: var(--primary-color) !important;
}

/* --- Hero : sous-titre lisible sur 1 ou 2 lignes --- */
#hero h3 {
    font-size: clamp(1.6rem, 3.6vw, 2.6rem) !important;
    line-height: 1.2 !important;
    opacity: 0.6 !important;
    margin-bottom: 1.2rem !important;
}

#hero .hero-content {
    max-width: 640px !important;
    line-height: 1.7 !important;
}

/* --- À propos : pleine largeur, compétences en grille --- */
#about .content {
    flex: 0 0 100% !important;
    max-width: 920px !important;
    margin: 0 auto !important;
    font-weight: 400 !important;
}

#about .content p {
    margin-bottom: 0.9rem !important;
}

#about .content ul {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important;
    gap: 0.4rem 1.5rem !important;
    margin-top: 0.8rem !important;
}

#about .content ul li {
    margin-bottom: 0.35rem !important;
    line-height: 1.5 !important;
}

#about .content ul li p {
    margin: 0 !important;
    display: inline !important;
}

#about .content ul li strong {
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

.about-skills-title {
    display: block !important;
    margin-top: 1.6rem !important;
    font-family: "Alata", sans-serif !important;
    font-size: 1.15rem !important;
    color: var(--primary-color) !important;
}

/* --- Expériences : onglets plus lisibles --- */
#experience .nav-link {
    font-size: 0.9rem !important;
}

#experience .tab-content ul li {
    margin-bottom: 0.35rem !important;
    line-height: 1.55 !important;
}

#experience .company-name {
    color: var(--primary-color) !important;
}

/* --- Formation : cartes homogènes --- */
#education .card {
    border-radius: 1rem !important;
}

/* --- Projets : images de même taille, sans débordement --- */
#projects .card-img-top {
    height: 190px !important;
    width: 100% !important;
    object-fit: contain !important;
    padding: 0.9rem !important;
    background: #ffffff !important;
}

#projects .card:hover .card-img-top {
    transform: scale(1.04) !important;
}

#projects .card-title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
}

#projects .card-text,
#projects .card-body p {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
}

/* --- Pages projet --- */
#single .page-content {
    font-size: 1.02rem !important;
    line-height: 1.75 !important;
}

#single .page-content h2,
#single .page-content h3 {
    margin-top: 1.8rem !important;
}

.toc .toc-content {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* --- Mode sombre --- */
.dark #about > .container > h3,
.dark #experience > .container > h3,
.dark #education > .container > h3,
.dark #projects > .container > h3,
.dark #about .content ul li strong {
    color: var(--text-color-dark) !important;
}

.dark #projects .card-img-top {
    background: #f4f5f7 !important;
}

/* --- Mobile --- */
@media (max-width: 576px) {
    #about .content ul {
        grid-template-columns: 1fr !important;
    }
    #projects .card-img-top {
        height: 160px !important;
    }
}

/* --- Menu : bouton thème aligné avec les liens --- */
.navbar .text-center:has(#theme-toggle) {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
}

#theme-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 8px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

#theme-toggle svg {
    vertical-align: 0 !important;
    width: 20px !important;
    height: 20px !important;
}

body.dark #theme-toggle #moon,
body:not(.dark) #theme-toggle #sun {
    display: none !important;
}
