/* Import de la police */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Variables de couleur */
:root {
  --background-color: #F9FAFB;
  --text-color: #2C3E50;
  --accent-color: #4F46E5;
  --section-bg: #ffffff;
  --card-bg: #F3F4F6;
  --hover-color: #6366F1;
}

/* Mode sombre */
.dark-mode {
  --background-color: #1E1E2E;
  --text-color: #E5E7EB;
  --accent-color: #A78BFA;
  --section-bg: #2C2C3A;
  --card-bg: #3B3B4F;
  --hover-color: #C4B5FD;
}

/* Écart cohérent sous tous les titres de section */
section h2 {
  margin-bottom: 20px; /* Ajustez selon vos besoins */
}

/* Liens blancs dans "À propos de moi" */
.about-section a {
  color: #fff;
  text-decoration: underline;
}
.about-section a:hover {
  color: #ddd;
}

.about-section p {
  text-align: justify;
  text-justify: inter-word;
}

/* Empêcher la section "À propos" de se soulever au survol */
.about-section:hover {
  transform: none;
  box-shadow: none;
}

/* Carte "À propos" */
.experience-card.about-card {
  position: relative;
  /* Pour laisser de la place aux boutons en bas à droite */
  min-height: 300px; 
  padding-bottom: 80px; /* Ajustez pour laisser assez d'espace aux boutons */
}

/* Boutons en bas à droite */
.cv-buttons {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

/* Fond en dégradé et couleurs */
body {
  background: linear-gradient(135deg, var(--background-color), var(--background-color));
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Conteneur pour les émojis de fond */
#emoji-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}
.emoji-item {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.2;
  transition: transform 0.2s ease;
}

/* Réinitialisation */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Boutons et liens */
button,
a {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  outline: none;
}
/* Suppression des effets de focus pour conserver les couleurs d'origine */
button:focus,
a:focus {
  outline: none;
}

/* Header fixe */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  z-index: 1101;
  padding: 10px 20px;
}

/* Bouton Burger */
#burger-menu {
  position: relative;
  width: 35px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-top: 10px;
}
#burger-menu span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}
#burger-menu span:nth-child(1) {
  top: 0;
}
#burger-menu span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
#burger-menu span:nth-child(3) {
  bottom: 0;
}
#burger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
#burger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}
#burger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Switch jour/nuit inversé */
.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
  margin-top: 10px;
}
.theme-switch input {
  display: none;
}
.theme-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #666;
  border-radius: 30px;
  transition: background-color 0.4s ease;
}
.theme-switch label::before {
  content: "🌙";
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366F1;
  color: #fff;
  font-size: 1rem;
  transition: 0.4s ease;
}
.theme-switch input:checked + label {
  background: #dad8d8;
}
.theme-switch input:checked + label::before {
  content: "☀";
  left: 3px;
  right: auto;
  background: #4F46E5;
}

/* Menu latéral */
.nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-color) 0%, #6B63FF 100%);
  box-shadow: 2px 0 15px rgba(0,0,0,0.2);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-menu.active {
  transform: translateX(0);
}
.nav-menu .nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.nav-menu .nav-header h2 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: 1px;
}
#close-nav {
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-menu ul {
  list-style: none;
  margin: 20px 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-menu ul li a {
  display: block;
  padding: 15px 20px;
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.nav-menu ul li a:hover,
.nav-menu ul li a:focus {
  background: rgba(255,255,255,0.1);
  color: #EDEDED;
}

/* Mise en page principale */
main {
  margin-top: 0;
  width: 100%;
}

/* Sections */
section {
  padding: 20px 20px;
  width: 85%;
  max-width: 1000px;
  background: var(--section-bg);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin: 20px auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
section:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
section p {
  margin-bottom: 15px;
}

/* Section Hero */
.hero {
  margin-top: 60px;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Boutons CV */
.cv-link {
  padding: 8px 16px;
  border-radius: 25px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cv-link-primary {
  background: linear-gradient(45deg, #2196F3, #1976D2);
}
.cv-link-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: linear-gradient(45deg, #1976D2, #2196F3);
}
.cv-link-secondary {
  background-color: #4CAF50;
}
.cv-link-secondary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background-color: #45A049;
}

/* Bouton Vidéo Présentation */
.video-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 25px;
  background: linear-gradient(45deg, #FF0000, #FF4500);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}
.video-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Cartes Expérience, Formation & Projets */
.experience-card,
.project-card {
  position: relative;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.experience-card ul,
.project-card ul {
  padding-left: 2rem;
}
.experience-card:hover,
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Conteneur des badges */
.badges {
  position: absolute;
  top: 10px;
  right: 10px;
}
.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 8px;
  margin-left: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
}
.badge-A {
  background-color: #E53935;
  color: #fff;
}
.badge-B {
  background-color: #FB8C00;
  color: #fff;
}
.badge-C {
  background-color: #4CAF50;
  color: #fff;
}
.badge-D {
  background-color: #1E88E5;
  color: #fff;
}
.badge-default {
  background-color: #9E9E9E;
  color: #fff;
}

/* Bouton de redirection (expériences, formations, projets) */
.card-link {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 8px 16px;
  border-radius: 25px;
  background: linear-gradient(45deg, var(--accent-color), var(--hover-color));
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-link:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Section Contact */
.contact-section {
  position: relative;
  min-height: 50px;
  padding-bottom: 50px;
}
.contact-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--hover-color);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Bouton "Voir mes informations" */
#open-contact-info {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 8px 16px;
  border-radius: 25px;
  background: linear-gradient(45deg, #2196F3, #1976D2);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}
#open-contact-info:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Ajustement pour le titre "Contact" */
#contact h2 {
  margin-top: 0;
  font-size: 1.3rem;
}
#contact {
  padding-top: 15px;
  padding-bottom: 30px;
}

/* Boutons généraux */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease, background 0.3s ease;
  font-size: 1rem;
}
.btn-primary {
  background: var(--accent-color);
  color: white;
}
.btn-primary:hover {
  background: var(--hover-color);
  transform: scale(1.03);
}
.btn-secondary {
  background: #4CAF50;
  color: white;
}
.btn-secondary:hover {
  background: #45A049;
  transform: scale(1.03);
}
.btn-danger {
  background: #D32F2F;
  color: white;
}
.btn-danger:hover {
  background: #B71C1C;
  transform: scale(1.03);
}
.btn-info {
  background: #2196F3;
  color: white;
}
.btn-info:hover {
  background: #1976D2;
  transform: scale(1.03);
}

/* Liseuse PDF (CV Viewer) */
#pdf-viewer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
#pdf-viewer {
  width: 90%;
  height: 90%;
  border: none;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
#close-cv {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  cursor: pointer;
  background: var(--accent-color);
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Bouton Retour en haut */
#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, var(--accent-color), var(--hover-color));
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, opacity 0.3s ease, bottom 0.3s ease;
  z-index: 1101;
}
#back-to-top:hover,
#back-to-top:focus {
  opacity: 1;
  transform: scale(1.15);
}

/* Footer */
footer {
  width: calc(100% + 20px);
  margin-left: -10px;
  margin-right: -10px;
  background: var(--accent-color);
  color: white;
  text-align: center;
  padding: 2px 0;
}
footer p {
  font-size: 0.8rem;
}

/* Modal de contact */
#contact-info-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 500px;
  background: var(--section-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 1101;
}
.modal-content {
  text-align: center;
}

/* Bouton email */
.email-button {
  background: none;
  border: none;
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: color 0.3s ease;
}
.email-button:hover,
.email-button:focus {
  color: var(--hover-color);
}

/* Profil */
.profile-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-bg);
  margin: 15px auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrollbar */
body.dark-mode::-webkit-scrollbar {
  width: 7px;
  background: #1E1E2E;
}
body.dark-mode::-webkit-scrollbar-thumb {
  background-color: #6366F1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
body:not(.dark-mode)::-webkit-scrollbar {
  width: 7px;
  background: #F9FAFB;
}
body:not(.dark-mode)::-webkit-scrollbar-thumb {
  background-color: #6366F1;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
body.dark-mode::-webkit-scrollbar-corner,
body:not(.dark-mode)::-webkit-scrollbar-corner {
  background: transparent;
}
