/* Styles globaux */
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
}

/* En-tête */
header {
  background: #0b3d91;
  color: white;
  text-align: center;
  padding: 50px 20px;
}

header h1 {
  margin: 0;
}

/* Navigation */
nav {
  background: #f0f0f0;
  padding: 10px;
  text-align: center;
  position: sticky;
  top: 0;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #0b3d91;
  font-weight: bold;
}

/* Section générale */
section {
  padding: 50px 20px;
  max-width: 900px;
  margin: auto;
}

/* Titres de sections */
h2 {
  color: #0b3d91;
  border-bottom: 2px solid #0b3d91;
  display: inline-block;
  margin-bottom: 20px;
  text-align: center;
  font-size: 2rem;
}

/* Bouton */
.btn {
  background: #0b3d91;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
}

.btn:hover {
  background: #062b66;
}

/* Timeline Expériences */
.experience {
  font-family: "Poppins", sans-serif;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.timeline-item {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.3rem;
}

.timeline-item .date {
  display: block;
  margin: 5px 0 15px;
  color: #888;
  font-size: 0.9rem;
}

/* Barre de progression (durée) */
.bar {
  background: #eee;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  width: var(--duration);
  animation: growBar 2s ease forwards;
  border-radius: 8px;
}

@keyframes growBar {
  from { width: 0; }
  to { width: var(--duration); }
}

/* Projets */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.projects-grid img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.projects-grid img:hover {
  transform: scale(1.05);
}

/* Footer */
footer {
  background: #0b3d91;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}

/* Bulle de photo de profil dans l'en-tête */
.profile-pic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Résumé de compétences 42 */
.summary-skills {
  padding: 50px 20px;
  background-color: #f9f9f9;
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.summary-skills h2 {
  color: #0b3d91;
  font-size: 2rem;
  margin-bottom: 40px;
}

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

.skill-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.skill-card h3 {
  color: #0b3d91;
  margin-bottom: 10px;
}

.skill-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Section projets */
.projects-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #0b3d91;
}

/* Section Hackathon */
.hackathon-section {
  padding: 60px 20px;
  background-color: #f5f7fa;
  text-align: center;
}

.hackathon-section h2 {
  color: #0b3d91;
  font-size: 2rem;
  margin-bottom: 40px;
}

.hackathon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
}

.hackathon-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hackathon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.hackathon-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.hackathon-content {
  padding: 20px;
  text-align: le
}

/* Carousel dans carte hackathon */
.carousel-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/*présentation*/
.presentation {
  padding: 40px 20px;
  background-color: #f9f9f9;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}
.presentation h2 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #0b3d91;
}
.presentation p {
  margin-bottom: 12px;
}

/* Header repensé */
header {
  background: radial-gradient(1200px 480px at 10% -40%, #1a56d6 0%, #0b3d91 40%, #08306b 100%);
  color: white;
  padding: 48px 20px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
}

.identity {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 18px;
}

.identity-text h1 {
  margin: 0 0 6px 0;
  font-size: 2rem;
}

.identity-text p {
  margin: 0 0 14px 0;
  opacity: 0.95;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  background: #ffffff;
  color: #0b3d91;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  display: inline-block;
}

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

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Carte de contact dans le header */
.contact-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 10px;
  transition: background .2s ease, transform .15s ease;
}

.contact-row:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }

.contact-ico { font-size: 18px; width: 22px; text-align: center; }

.socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: #0b3d91;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.socials a:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.16); }
.socials svg { display: block; }

/* Accessibilité : cacher visuellement le titre Contact */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Responsive */
@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr; }
  .identity { grid-template-columns: 100px 1fr; }
  .identity-text h1 { font-size: 1.6rem; }
}

/* (optionnel) Harmonise le nav sur fond clair */
nav {
  background: #ffffff;
  border-bottom: 1px solid #e9eef7;
}

/* Petites retouches existantes */
.profile-pic { border: 4px solid rgba(255,255,255,.95); }

/* Carte de contact dans le header — fond mis en avant */
.contact-card {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  color: #0b3d91;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 34px rgba(0,0,0,.15);
  border: 2px solid #e3e8f5;
}

/* Lignes de contact */
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef2fa;
  border: 1px solid #d1dbf0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #0b3d91;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 10px;
  transition: background .2s ease, transform .15s ease;
}
.contact-row:hover {
  background: #dbe4f9;
  transform: translateY(-2px);
}

/* Icônes contact */
.contact-ico {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* Réseaux sociaux */
.socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b3d91;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.socials a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  background: #062b66;
}

/* ===========================
   Header responsive (mobile-first)
   =========================== */

/* Base : petits écrans */
.header-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.identity {
  grid-template-columns: 80px 1fr;
  gap: 14px;
}

.profile-pic {
  width: 80px;
  height: 80px;
}

.identity-text h1 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.identity-text p {
  font-size: 0.95rem;
}

.header-actions {
  gap: 8px;
}

.header-actions .btn {
  width: 100%;            /* boutons plein largeur sur mobile */
  text-align: center;
}

/* La carte contact en PREMIER sur mobile */
.contact-card {
  order: -1;
}

/* Touch targets confortables */
.contact-row,
.socials a {
  min-height: 44px;
}

/* Moyens écrans */
@media (min-width: 680px) {
  .identity {
    grid-template-columns: 100px 1fr;
  }
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  .header-actions .btn {
    width: auto;          /* redevient auto dès qu’on a la place */
  }
}

/* Tablettes paysage / petits laptops */
@media (min-width: 900px) {
  .header-inner {
    grid-template-columns: 1.4fr 1fr; /* texte à gauche, contact à droite */
    gap: 24px;
  }
  .contact-card {
    order: 0; /* revient à droite */
  }
  .identity-text h1 {
    font-size: 2rem;
  }
}

/* Larges écrans */
@media (min-width: 1200px) {
  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    gap: 28px;
  }
  .identity {
    grid-template-columns: 140px 1fr;
    gap: 18px;
  }
  .profile-pic {
    width: 140px;
    height: 140px;
  }
}

/* Préférences d’accessibilité : réduit les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .contact-row,
  .socials a {
    transition: none !important;
  }
}

:target {
  scroll-margin-top: 80px; /* ajuste si ton header est plus haut */
}

.hackathon-content { text-align: left; }

nav {
  background: #ffffff; /* tu l'avais déjà sur la version optionnelle */
  padding: 10px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000; /* ✅ toujours au-dessus des autres éléments */
  border-bottom: 1px solid #e9eef7; /* pour la séparation visuelle */
}
/* Section Permis de conduire */
.permis-section {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.permis-section h2 {
  color: #0b3d91;
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.permis-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #ffffff;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid #e3e8f5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.permis-icone {
  font-size: 1.8rem;
}

.permis-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* Section Informations personnelles */
.infos-section {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  background: #ffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.infos-section h2 {
  color: #0b3d91;
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.infos-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.infos-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e3e8f5;
  font-size: 1rem;
}

.infos-list li:last-child {
  border-bottom: none;
}
