/*
Theme Name: Mon Portfolio
Theme URI: https://exemple.com
Author: Ton Nom
Author URI: https://exemple.com
Description: Un thème portfolio personnalisé.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mon-portfolio
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0070f3;
    --secondary: #7928ca;
    --accent: #ff0080;
    --text: #333;
    --text-light: #666;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

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

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--gradient);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-secondary {
    border: 2px solid white;
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Sections */
section {
    padding: 5rem 0;
}
#experiences {
    padding-bottom: 0rem; /* enlève totalement l’espace sous Expériences */
}

#contact {
    padding-top: 1rem; /* garde juste un petit souffle visuel */
}


.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    text-align: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    margin: 0 auto;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-card li:last-child {
    border-bottom: none;
}

/* Projects Section */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem;
}

.project-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-period {
    opacity: 0.9;
    font-size: 0.9rem;
}

.project-content {
    padding: 1.5rem;
}

.project-objective {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.project-result {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-style: italic;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.stack-tag {
    background: var(--gradient-accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Experience Section */
.experience-timeline {
    position: relative;
    padding-left: 2rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient);
}

.experience-item {
    position: relative;
    margin-bottom: 3rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-left: 2rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary);
}

.experience-header {
    margin-bottom: 1rem;
}

.experience-role {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.experience-company {
    font-weight: 600;
    margin: 0.5rem 0;
}

.experience-period {
    color: var(--text-light);
    font-style: italic;
}

.experience-achievements {
    list-style: none;
    margin-top: 1rem;
}

.experience-achievements li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.experience-achievements li::before {
    content: '✨';
    margin-top: 0.1rem;
}

/* Contact Section */
.contact {
    background: var(--gradient);
    color: white;
}

.contact-content {
    text-align: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.contact-item {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contact-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-item a {
    color: white;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.btn-tertiary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 2px solid #764ba2;
    color: #764ba2;
    background: transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-tertiary:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Ajouts personnalisés (profil, certifications statiques, veille IA) === */
.about .profile-image img{
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 4px solid var(--bg-light);
    display: block;
}

.certifications{
    padding: 5rem 0;
    background: var(--bg-light);
}
.certifications .section-subtitle{
    color: var(--text-light);
    margin-top: .5rem;
}
.cert-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}
.cert-item{
    background: var(--bg);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    text-align: center;
}
.cert-item img{
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: .75rem;
    background: rgba(255,255,255,.35);
}
.cert-item figcaption{
    margin-top: .75rem;
    font-weight: 600;
}

.tech-watch{
    padding: 5rem 0;
    background: var(--bg);
}
.techwatch-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.tw-card{
    background: var(--bg-light);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.tw-icon{
    font-size: 1.75rem;
    margin-bottom: .5rem;
    opacity: .9;
}
.tw-bullets{
    margin: .75rem 0 0 1rem;
    list-style: disc;
    color: var(--text-light);
}


/* === Correctif: Titre "Me contacter" en blanc dans la section contact === */
.contact .section-title{
    background: none !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    color: #fff !important;
}


/* === Link reset (added) === */
a { text-decoration: none; }
a:hover, a:focus { text-decoration: none; }
.certifications .cert-item a { display: inline-block; }




.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-weight: 600;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* === Project actions placement (minimal) === */
.projects .project-card {
  display: flex;
  flex-direction: column;
}
.projects .project-card .project-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

/* === Media grid: 1 colonne, images centrées, non rognées, responsive === */
.media-grid {
  display: grid !important;
  grid-template-columns: 1fr !important; /* empilé, pas côte à côte */
  gap: 1rem;
}

.media-grid > * {
  width: 100%;
}

.media-grid img {
  display: block;
  margin: 0 auto;               /* centre l'image */
  width: 100% !important;        /* prend toute la largeur disponible */
  max-width: 100% !important;    /* ne dépasse jamais le conteneur */
  height: auto !important;       /* conserve le ratio → pas de rognage */
  object-fit: contain !important;/* si un fit était imposé ailleurs */
  max-height: none !important;   /* neutralise une hauteur forcée */
}

/* (Optionnel) limiter un peu la largeur sur très grands écrans */
@media (min-width: 1400px) {
  .media-grid img {
    max-width: 1100px;           /* garde de belles marges sur desktop XL */
  }
}
/* === YouTube cards plus petites (veille-methodes) === */
.yt-grid figure {
  max-width: 760px;
  margin: 0 auto;
}

.yt-grid img {
  display: block;
  margin: 0.5rem auto;
  width: 100%;
  max-width: 420px !important;  /* taille cible desktop */
  height: auto !important;       /* jamais rogné */
  object-fit: contain !important;
}

.yt-grid figcaption {
  font-size: 0.95rem;
}

.yt-grid .btn-tertiary {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

/* un peu plus petit sur mobile */
@media (max-width: 768px) {
  .yt-grid img {
    max-width: 340px !important;
  }
}
