/* -------------------------- */
/* FONTS & RESET */
/* -------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Inter",sans-serif;
    -webkit-tap-highlight-color:transparent;
}

html{
    scroll-behavior:smooth;
}

/* -------------------------- */
/* THEME VARIABLES */
/* -------------------------- */

:root{
    --bg:#ffffff;
    --bg-soft:#f3f6fb;
    --text:#111;
    --text-muted:#6d6d6d;
    --card:#ffffff;
    --border:#dcdcdc;
    --accent:#1d4ed8;
    --accent-soft:rgba(29,78,216,0.12);
    --shadow:0 6px 18px rgba(0,0,0,0.08);
}

.dark-theme{
    --bg:#0F121A;
    --bg-soft:#161C27;
    --text:#e8ecf5;
    --text-muted:#9aa6c5;
    --card:#1B2230;
    --border:#2d3647;
    --accent:#3b82f6;
    --accent-soft:rgba(59,130,246,0.15);
    --shadow:0 6px 18px rgba(0,0,0,0.35);
}

/* -------------------------- */
/* BODY */
/* -------------------------- */

body{
    background:var(--bg);
    color:var(--text);
    transition:.25s ease-in-out;
}

/* -------------------------- */
/* HEADER */
/* -------------------------- */

header{
    position:sticky;
    top:0;
    background:var(--bg);
    border-bottom:1px solid var(--border);
    z-index:10;
    backdrop-filter:blur(8px);
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 0;
}

.container{
    width:min(1200px,90%);
    margin:auto;
}

.logo{
    font-size:1.2rem;
    font-weight:700;
    color:var(--accent);
}

.nav-links{
    list-style:none;
    display:flex;
    gap:25px;
}

.nav-links a{
    text-decoration:none;
    color:var(--text-muted);
    font-size:.95rem;
    transition:.2s;
}

.nav-links a:hover{
    color:var(--accent);
}


/* Buttons in nav */
.nav-actions{
    display:flex;
    gap:10px;
}

#themeToggle,.btn-small{
    cursor:pointer;
    padding:7px 14px;
    border-radius:6px;
    border:1px solid var(--border);
    background:var(--accent-soft);
    color:var(--accent);
    transition:.25s;
}

#themeToggle:hover,.btn-small:hover{
    background:var(--accent);
    color:#fff;
}

/* -------------------------- */
/* HERO */
/* -------------------------- */

.hero{
    text-align:center;
    padding:100px 0 50px;
}

.profile-img{
    width:150px;
    height:150px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid var(--accent);
    margin-bottom:15px;
    box-shadow:var(--shadow);
}

h1{
    font-size:2.4rem;
    margin-bottom:5px;
}

h1 span{
    color:var(--accent);
}

.subtitle{
    color:var(--text-muted);
    font-size:1rem;
    margin-bottom:10px;
}

.hero-text{
    max-width:650px;
    margin:auto;
    color:var(--text-muted);
    line-height:1.6;
    font-size:1rem;
}

/* -------------------------- */
/* SECTIONS */
/* -------------------------- */

.section{
    padding:60px 0;
}

h2{
    font-size:1.9rem;
    margin-bottom:20px;
}

/* -------------------------- */
/* ABOUT */
/* -------------------------- */

.para{
    max-width:700px;
    line-height:1.6;
    font-size:1.05rem;
    color:var(--text-muted);
}

/* ---- COMPETENCES NEW STYLE ---- */

.skills-intro{
    color:var(--text-muted);
    max-width:650px;
    margin-bottom:25px;
    font-size:1rem;
}

.skills-bar-container{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.skill-line{
    width:100%;
}

.skill-title{
    display:flex;
    justify-content:space-between;
    font-weight:600;
    color:var(--text);
    margin-bottom:6px;
}

.level{
    color:var(--accent);
}

.progress{
    width:100%;
    height:10px;
    background:var(--border);
    border-radius:6px;
    overflow:hidden;
}

.progress-value{
    height:100%;
    background:var(--accent);
    border-radius:6px;
    transition:width 1.1s ease-out;
}


/* -------------------------- */
/* ENTREPRISE */
/* -------------------------- */

.enterprise-block{
    background:var(--card);
    border:1px solid var(--border);
    padding:20px;
    border-radius:15px;
    box-shadow:var(--shadow);
    margin-top:10px;
}

.enterprise-logo{
    width:120px;
    display:block;
    margin:0 auto 15px;
}

.enterprise-meta{
    font-size:.9rem;
    color:var(--text-muted);
    margin-bottom:12px;
    text-align:center;
}

.enterprise-text{
    line-height:1.6;
    margin-top:10px;
    text-align:center;
}

.map{
    width:100%;
    height:260px;
    border-radius:10px;
    margin:12px 0;
    border:1px solid var(--border);
}

.map-link{
    display:inline-block;
    margin-top:8px;
    font-weight:600;
    color:var(--accent);
    text-decoration:none;
}

.map-link:hover{
    opacity:0.7;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
}

.map-wrapper .map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
    border-radius: 10px;
}


/* -------------------------- */
/* PROJECTS */
/* -------------------------- */

.grid{
    display:grid;
    gap:22px;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
}

.project-card{
    background:var(--card);
    padding:20px;
    border-radius:12px;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    transition:.25s;
}

.project-card:hover{
    transform:translateY(-4px);
    border-color:var(--accent);
}

.status{
    display:inline-block;
    margin-top:10px;
    padding:6px 10px;
    border-radius:6px;
    font-size:.8rem;
    font-weight:600;
}

.status.in-progress{
    background:#fff3cd;
    color:#9a6b00;
}

.status.done{
    background:#d1fae5;
    color:#0b6d44;
}

.more-btn{
    margin-top:10px;
    padding:8px 14px;
    background:var(--accent);
    border:none;
    color:white;
    border-radius:6px;
    cursor:pointer;
    transition:.2s;
    font-size:.9rem;
}

.more-btn:hover{
    opacity:.9;
}

/* Espacement propre entre sous-titres et cartes projets */
.sub {
    margin: 35px 0 15px;
    font-size: 1.3rem;
    color: var(--accent);
}


/* -------------------------- */
/* VEILLE */
/* -------------------------- */

.veille-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:12px;
    padding:20px;
    box-shadow:var(--shadow);
    text-align: center;
}

/* Amélioration espacement bouton PDF dans la veille */
.veille-card .more-btn {
    margin-top: 18px; /* espace propre */
    display: inline-block;
}


/* -------------------------- */
/* CONTACT */
/* -------------------------- */

.contact-form{
    background:var(--card);
    padding:25px;
    border:1px solid var(--border);
    border-radius:12px;
    display:flex;
    flex-direction:column;
    gap:15px;
    box-shadow:var(--shadow);
}

.contact-form input,
.contact-form textarea{
    padding:12px;
    border-radius:8px;
    border:1px solid var(--border);
    background:var(--bg-soft);
    color:var(--text);
}

/* Centrage et style du bouton dans la section contact */
.contact-form button {
    display: block;
    margin: 20px auto; /* centre horizontalement */
    width: auto; /* empêche d'être trop large */
    padding: 10px 25px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.contact-form button:hover {
    opacity: 0.8;
    transform: scale(1.03);
}

/* Amélioration espacement des labels et champs */
.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px; /* espace entre le texte du label et le champ */
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px; /* espace entre chaque champ */
}

.field-error {
    color: #dc2626;          /* rouge */
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

input.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 4px rgba(220, 38, 38, 0.6);
}

/* ---- SOCIAL ICONS ---- */

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-links img {
    width: 35px;
    height: 35px;
    transition: 0.3s ease;
    cursor: pointer;
    filter: var(--icon-filter);
}

.social-links img:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

.light-theme {
    --icon-filter: none;
}

.dark-theme {
    --icon-filter: invert(1);
}


/* Style des inputs et textarea */
.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s ease;
}

/* Effet focus (lumière professionnelle) */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

/* Animation douce pour la section contact */
.contact-form {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Quand visible (activée via JS) */
.contact-form.visible {
    opacity: 1;
    transform: translateY(0);
}


#messageStatus{
    margin-top:10px;
    font-weight:600;
    color:var(--accent);
}

.field-error{
    color:#dc2626;
    font-size:.8rem;
    margin-top:4px;
    display:block;
}
input.invalid, textarea.invalid{
    border-color:#dc2626;
    box-shadow:0 0 4px rgba(220,38,38,0.5);
}


/* -------------------------- */
/* FOOTER */
/* -------------------------- */

footer{
    text-align:center;
    padding:20px;
    margin-top:50px;
    border-top:1px solid var(--border);
    background:var(--bg-soft);
    color:var(--text-muted);
}

/* -------------------------- */
/* SCROLL ANIMATION */
/* -------------------------- */

.reveal{
    opacity:0;
    transform:translateY(25px);
    transition:.6s ease;
}

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

/* -------------------------- */
/* RESPONSIVE */
/* -------------------------- */

@media(max-width:820px){
    .nav-links{
        display:none;
    }
}
