/* ALDB Labs - Custom styles */

:root {
    /* Palette basée sur l'image du coquillage */
    --primary: #3D4F5F;
    --primary-hover: #5D7A8C;
    --secondary: #BBCCA8;
    --background-color: #FFFFFF;
    --background-alt: #E8EDEF;
    --background-warm: #F5F3F0;
    --color: #2C3E50;
    --muted-color: #5D7A8C;
    
    /* Fontes - forcer Source Sans Pro */
    --pico-font-family: 'Source Sans Pro', sans-serif;
    --font-family: 'Source Sans Pro', sans-serif;
    --font-size: 18px;
    --line-height: 1.5;
    
    /* Container */
    --pico-container-max-width: 1024px;
}

/* Header transparent sur l'image */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    padding: 0;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.site-header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.site-header nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s;
}

.site-header nav a:hover {
    opacity: 0.8;
}

.site-header .logo {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header .logo svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.site-header .logo .logo-epsilon {
    margin-right: 0.3rem;
}

.site-header .logo .logo-spiral {
    margin-right: 0.3rem;
}

/* Menu principal aligné à droite */
.nav-menu {
    margin-left: auto;
}

/* Sélecteur de langue FR | EN */
.nav-lang {
    margin-left: 1.5rem;
    gap: 0;
}

.nav-lang a {
    padding: 0.5rem 0.4rem;
}

.nav-lang a.active {
    font-weight: 700;
}

.nav-lang .separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    padding: 0;
}

/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/img/home-img.jpg') no-repeat 25% bottom;
    background-size: cover;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Supprimer marges body/html/main */
body, html, main {
    margin: 0 !important;
    padding: 0 !important;
}

/* Pico.css reset */
:root {
    --pico-block-spacing-vertical: 0;
}

/* Supprimer espace blanc entre hero et sections */
.hero + .section,
main > .section:first-child {
    margin-top: 0;
    padding-top: 4rem;
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 900px;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.hero .tagline {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--secondary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section:first-of-type {
    margin-top: 0;
}

.section .container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Titre de section principal */
.section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Sous-titres avec icônes */
.section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section h3 svg {
    width: 52px;
    height: 52px;
    color: var(--secondary);
    flex-shrink: 0;
}

.section-alt {
    background: var(--background-alt);
}

/* Projects */
.projects {
    display: grid;
    gap: 2rem;
}

.project {
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.project h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.project h3 a {
    color: var(--primary);
    text-decoration: none;
}

.project h3 a:hover {
    text-decoration: underline;
}

.project-wip {
    border-left: 4px solid var(--secondary);
}

.project-wip small {
    color: var(--muted-color);
    font-style: italic;
}

/* Liens externes - même style que texte + icône */
.external-link {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: inherit;
}

.external-link:hover {
    text-decoration: none !important;
}

.icon-external {
    width: 18px !important;
    height: 18px !important;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.3rem;
    opacity: 0.6;
}

/* Lien email */
.email-link {
    color: var(--primary) !important;
    text-decoration: none !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    vertical-align: baseline;
    gap: 0.3rem;
}

.email-link:hover {
    text-decoration: none !important;
    opacity: 0.8;
}

.icon-email {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
    margin-top: 0 !important;
}

.site-footer p {
    margin: 0;
    color: #fff;
}

.site-footer p strong {
    font-size: 1.2em;
    opacity: 0.7;
}

.site-footer .logo-spiral {
    vertical-align: baseline;
    margin-right: 0.3rem;
    opacity: 0.7;
    position: relative;
    top: 6px;
}

.footer-logo,
.footer-logo:link,
.footer-logo:visited,
.footer-logo:hover,
.footer-logo:active {
    color: inherit !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.footer-logo:hover {
    opacity: 0.9;
}

.footer-legal {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-legal a,
.footer-legal a:link,
.footer-legal a:visited {
    color: inherit !important;
    text-decoration: none !important;
}

.footer-legal a:hover {
    text-decoration: underline !important;
}

/* Style pour les pages single (mentions légales, etc.) */
.section-page {
    padding-top: 4rem;
}

.section-page h1 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
    display: table;
}

.section-page h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    border-bottom: none;
}

.section-page a {
    color: var(--primary);
    text-decoration: none;
}

.section-page a:hover {
    opacity: 0.8;
}

/* Header fixe pour les pages sans hero */
body:has(.section-page) .site-header {
    position: relative;
    background: var(--primary);
}

/* Supprimer espace entre contact et footer */
.section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 4rem;
}

#contact {
    margin-bottom: 0 !important;
    padding-bottom: 4rem;
}

/* Section alt background doit couvrir tout l'espace */
.section-alt {
    background: var(--background-alt);
    margin: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header nav {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .site-header .logo {
        font-size: 1.6rem;
    }
    
    .site-header nav a {
        font-size: 1.1rem;
        padding: 0.4rem 0.6rem;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .nav-lang {
        margin-left: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .tagline {
        font-size: 1.6rem;
    }
    
    .section .container {
        padding: 0 1rem;
    }
    
    .section p {
        font-size: 1.1rem;
    }
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}
