/* style/style.css
   Fichier CSS séparé pour améliorer la maintenance.
   Ne pas modifier la structure HTML dans index.html sans vérifier
   que les sélecteurs CSS sont toujours bien alignés.
*/

/* ---------- Styles principaux ----------
   Organisation:
   - Reset & base
   - Body / typographie
   - Liens / header / navigation
   - Hero (accueil)
   - About / cartes
   - Grid / cards / certifications
   - Contact / footer
*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header - barre de navigation sticky en haut */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: #ffffffea;
  border-bottom: 1px solid #e5e7eb;
}

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

.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.2rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #2563eb;
  transition: width 0.2s ease-out;
}

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

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.2rem 1.5rem 4rem;
}

section {
  margin-bottom: 4.5rem;
}

/* Hero (Accueil) - titre, sous-texte, tags et photo */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.3rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-name {
  background: #2563eb;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: #334155;
  font-size: 1rem;
  max-width: 32rem;
  margin-bottom: 1.5rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #2563eb;
  font-size: 0.75rem;
  color: #0f172a;
  background: #e8efff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #2563eb;
  color: #2563eb;
}

.btn-secondary:hover {
  background: #e8efff;
}

.hero-photo-wrapper {
  justify-self: center;
}

.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 32px;
  background: #ffffff;
  border: 1px solid #2563eb;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 24px;
}

.hero-photo-text {
  text-align: center;
  font-size: 0.9rem;
  max-width: 13rem;
  line-height: 1.4;
}

.hero-badge {
  position: absolute;
  bottom: 1.2rem;
  right: 1.1rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 1.75rem;
}

/* À propos - texte descriptif et cartes de résumé */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
}

.about-text {
  font-size: 0.95rem;
  color: #1f2937;
  line-height: 1.7;
}

.about-list {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.bullet {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.language-name {
  min-width: 70px;
  font-weight: 500;
}

.language-level {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin-left: 0.25rem;
}

.level-bar {
  width: 18px;
  height: 8px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.2);
  transition: background 0.2s ease;
}

.level-bar.filled {
  background: #2563eb;
}

/* Cartes récapitulatives dans la section À propos */
.about-cards {
  display: grid;
  gap: 0.75rem;
}

.about-card {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.about-card-label {
  color: #475569;
}

.about-card-value {
  font-weight: 500;
  color: #0f172a;
}

/* Grilles réutilisables pour projets et autres listes */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out,
    border-color 0.14s ease-out;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.card-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #2563eb;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  background: #e8efff;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.card-text {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.8rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #475569;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.tech-pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e8efff;
  border: 1px solid #2563eb;
  color: #0f172a;
}

/* Certifications - carousel horizontal */
.certification-container {
  position: relative;
  width: 100%;
}

.certification-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.5rem 0;
}

.certification-grid::-webkit-scrollbar {
  display: none;
}

.certification-card {
  flex: 0 0 auto;
  width: 100%;
  max-width: 500px;
  min-width: 400px;
}

.certification-card {
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out,
    border-color 0.14s ease-out;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  align-items: flex-start;
  width: 100%;
}

.certification-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  border: 2px solid #2563eb;
  color: #2563eb;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.certification-nav-btn:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.certification-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.certification-nav-btn.prev {
  left: -24px;
}

.certification-nav-btn.next {
  right: -24px;
}

.certification-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.certification-nav-btn:disabled:hover {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.certification-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.certification-image {
  width: 200px;
  min-width: 200px;
  height: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.certification-image:hover {
  transform: scale(1.02);
}

.certification-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.certification-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 0;
}

.certification-org {
  font-size: 0.85rem;
  color: #64748b;
}

.certification-date {
  font-size: 0.8rem;
  color: #94a3b8;
}

.certification-description {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 0.25rem;
}

.certification-link {
  font-size: 0.8rem;
  color: #2563eb;
  text-decoration: none;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
}

.certification-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Contact - formulaire et informations de contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: start;
}

form {
  display: grid;
  gap: 0.9rem;
}

label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.2rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #d5dce5;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.contact-info {
  font-size: 0.9rem;
  color: #1f2937;
}

.contact-list {
  list-style: none;
  margin-top: 1.25rem;
  display: grid;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.contact-label {
  color: #475569;
}

/* Footer - bas de page avec liens et copyright */
footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.4rem 1.5rem 1.8rem;
  color: #475569;
  font-size: 0.8rem;
  background: #ffffff;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: #2563eb;
}

.social-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column; /* Aligne les comptes les uns sous les autres */
  gap: 15px; /* Espace entre chaque ligne */
}

.social-item {
  display: flex;
  align-items: center; /* Aligne verticalement l'icône et le texte */
  text-decoration: none;
  color: #333;
  font-family: Arial, sans-serif;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.social-item i {
  font-size: 24px; /* Taille de l'icône */
  margin-right: 12px; /* Espace entre l'icône et ton nom */
  width: 30px; /* Largeur fixe pour que le texte soit aligné */
  text-align: center;
}

/* Couleurs spécifiques au survol */
.social-item:hover {
  transform: translateX(10px); /* Petit effet de mouvement */
  color: #1877F2; /* Bleu Facebook par défaut au survol */
}

.social-item:hover i {
  color: #1877F2;
}

/* Style de base (Ordinateur) */
.navbar {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  background: #333;
  color: white;
}

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

.nav-links li { margin-left: 20px; }

.menu-toggle {
  display: none; /* CACHÉ SUR ORDINATEUR */
  font-size: 24px;
  cursor: pointer;
}

/* --- VERSION MOBILE (moins de 768px) --- */
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block; /* ON MONTRE LES 3 BARRES */
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 50%;
    position: absolute;
    top: 60px;
    left: 50%;
    background: #1877F2;
    text-align: center;
    font-family: cambria;
  }

  /* Quand on ajoute la classe "active" via JS */
  .nav-links.active {
    display: flex;
  }

  .nav-links li { padding: 15px 0; margin: 0; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
    gap: 2rem;
  }

  .hero-photo-wrapper {
    order: -1;
  }

  .hero-photo {
    width: 230px;
    height: 230px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .nav {
    padding-inline: 1.1rem;
  }

  main {
    padding-inline: 1.1rem;
    padding-top: 2.6rem;
  }

  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-photo {
    width: 210px;
    height: 210px;
  }

  .certification-card {
    flex-direction: column;
    min-width: 300px;
    max-width: 100%;
  }

  .certification-image {
    width: 100%;
    min-width: unset;
  }

  .certification-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .certification-nav-btn.prev {
    left: -20px;
  }

  .certification-nav-btn.next {
    right: -20px;
  }
}

@media (max-width: 480px) {
  main {
    padding-inline: 1rem;
  }

  section {
    margin-bottom: 3.2rem;
  }

  .certification-container {
    padding: 0 2rem;
  }

  .certification-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .certification-nav-btn.prev {
    left: 0;
  }

  .certification-nav-btn.next {
    right: 0;
  }

  .certification-card {
    min-width: 280px;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .card,
  .about-card {
    padding: 0.95rem 0.95rem 0.9rem;
  }

  .hero-photo {
    width: 190px;
    height: 190px;
  }
}

/* Animations: apparitions et micro-interactions
   - Variables:
     --accent : couleur principale utilisée pour les accents visuels
   - Classes utilitaires:
     .fade-up  : élément apparaissant avec translation verticale
     .fade-in  : élément n'apparaissant qu'en opacité
   - Animation float: micro-mouvement appliqué à la photo hero
   - Respecter `prefers-reduced-motion` pour accessibilité
*/
/* Couleur d'accent utilisée dans plusieurs composants */
:root { --accent: #2563eb; }

/* Apparition en glissement vers le haut + fondu
   - ajouter la classe `animated` déclenche la transition
   - utile pour staggered entrance (apparition échelonnée)
*/
.fade-up { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.fade-up.animated { opacity: 1; transform: translateY(0); }

/* Simple fondu (opacité) pour éléments qui n'ont pas besoin de translation */
.fade-in { opacity: 0; transition: opacity 0.8s ease; }
.fade-in.animated { opacity: 1; }

/* Légère oscillation verticale pour donner de la vie à la photo */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Photo hero: couvre son conteneur et a un zoom au survol
   - transition sur `img` pour rendre le hover fluide
   - la classe `animated` déclenche l'animation continue `float`
   - `will-change` aide la performance pour les transformations fréquentes
*/
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; will-change: transform; }
.hero-photo.animated { animation: float 4s ease-in-out infinite; }
.hero-photo:hover img { transform: scale(1.04); }

/* Animations de texte: slide-in gauche/droite pour mettre en valeur les titres */
.slide-left { opacity: 0; transform: translateX(-18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.slide-left.animated { opacity: 1; transform: translateX(0); }

.slide-right { opacity: 0; transform: translateX(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.slide-right.animated { opacity: 1; transform: translateX(0); }

/* Tags dans le hero: apparition échelonnée et léger levé */
.hero-tags .tag { opacity: 0; transform: translateY(8px) scale(0.99); transition: opacity 0.45s ease, transform 0.45s ease; }
.hero-tags .tag.animated { opacity: 1; transform: translateY(0) scale(1); }

/* Micro-interaction sur les images de certification : léger soulèvement + ombre */
.certification-image { transition: transform 0.28s ease, box-shadow 0.28s ease; }
.certification-image:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 18px 40px rgba(15,23,42,0.12); }

/* Respecter la préférence de l'utilisateur pour réduire les animations */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-in, .hero-photo.animated, .certification-image { transition: none !important; animation: none !important; }
}
