/* Variables globales (thème clair par défaut) */
:root {
  --bg-base: #FFF7F7;
  --bg-reverse:#201314;

  --text-base: #641723;
  --text-base-2 : #CE2C31;

  --bg_link_btn : #FFCDCE;

  --card-bg: #FEEBEC;
  
  --skill-bg: #FFDBDC;

  --shadow-color: #FDBDBE;
  --border-color: #F4A9AA;
  --skill-border: #EB8E90;

  --font-title:'Iceberg';
  --font-title-body:'Iceberg';
}
/* Thème sombre, selon préférence système */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #201314;
    --bg-reverse:#FFF7F7;


    --text-base: #FFD1D9;
    --text-base-2 : #FF9592;

    --bg_link_btn : #611623;

    --card-bg: #3B1219;
    --skill-bg: #500F1C;

    --shadow-color: #72232D;
    --border-color: #8C333A;
    --skill-border: #B54548;
  }
}
/* Styles appliquant les variables */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }


body {
  font-family:  var(--font-title-body),system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  color: var(--text-base);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 36px;
}

.container { max-width: 1200px; margin: 0 auto; }
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 38px 24px;
}
h1 { font-size: clamp(40px, 8vw, 60px); letter-spacing: -0.03em; font-family: var(--font-title-name); }
/* Boutons sociaux */
.links { display: flex; gap: 18px; }
.link-btn {
  color:  var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--bg_link_btn);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(4px);
  transition: transform 200ms ease, box-shadow 200ms ease;
  overflow: hidden;
}
.link-btn:focus { outline: 4px solid var(--text-base); }
.link-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-color);
}
/* Icônes en rotation */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.link-btn:hover .icon { transform: rotate(360deg); }
/* Sections */
section {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  margin-top: 28px;
  box-shadow: 0 8px 28px var(--shadow-color);
}
.section-title { font-weight: 600; margin-bottom: 18px; }
/* Compétences */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.skill {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--skill-bg);
  font-size: 16px;
  border: 1px solid var(--skill-border);
}
/* Projets */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--skill-border);
  margin: 0;
  height: 100%; /* Prend toute la hauteur disponible */
}
.project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #e6eef7;
  font-size: 0;
  line-height: 0;
}
.project-body {
  padding: 12px 18px 12px; /* Padding réduit en bas */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-body h3,
.project-body p {
  margin: 0;
  padding: 0;
}
.project-desc {
  font-size: 17px;
  color: var(--text-base);
  margin: 0;
}
.project-tech {
  font-size: 14px;
  color: var(--text-base);
  margin: 0;
  margin-top: auto; /* Aligne le texte en bas si nécessaire */
}
/* Réactivité */
@media (max-width: 900px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  header { align-items: flex-start; }
  .links { order: 2; }
  .projects { grid-template-columns: 1fr; }
  .project img { height: 240px; }
}
/* Réduire les animations si préférence */
@media (prefers-reduced-motion: reduce) {
  .icon, .link-btn { transition: none; }
}

/* Style de base de l'élément */
article.project {
  /* Ajoute une transition douce pour l'effet de grossissement */
  transition: transform 0.1s ease-in-out; 
}

/* Style appliqué lorsque la souris est sur l'élément */
article.project:hover {
  /* Fait grossir l'élément de 10% */
  transform: scale(1.08); 
  /* Vous pouvez aussi ajouter d'autres effets, comme une ombre */
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
a.project-link {
  color: inherit; /* Fait en sorte que le texte hérite de la couleur de son parent */
  text-decoration: none; /* Supprime le soulignement du lien */
}
/* Pop-up de contact */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 28px var(--shadow-color);
  position: relative;
}

.popup-content h2 {
  margin-top: 0;
  color: var(--text-base);
}

.close-popup {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-base);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--skill-bg);
  color: var(--text-base);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  padding: 12px;
  background: var(--bg_link_btn);
  color: var(--text-base);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.contact-form button:hover {
  opacity: 0.9;
}

/* Animation pour le message de succès */
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Overlay pour le message de succès */
.global-success-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.global-success-message {
  background-color: var(--bg-reverse);
  color: green;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 28px var(--shadow-color);
  animation: slideIn 0.3s ease-out forwards;
  text-align: center;
  font-weight: 600;
  max-width: 80%;
}



/* Boutons de langue */
.language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 12px;
  border-radius: 50%;
  padding: 5px;
  
}


.language-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: transform 0.4s ease;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.language-btn:hover {
  transform: rotate(360deg);
}

.flag-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-icon svg {
  width: 100%;
  height: 100%;
}

/* Experience */
.experience {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  margin-top: 20px;
  box-shadow: 0 8px 28px var(--shadow-color);
}

.experience-body {
  flex: 1;
  min-width: 0;
}

.experience-body h3 {
  font-size: 30px;
  margin-bottom: 15px;
  color: var(--text-base-2);
}

.experience-body .project-desc {
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.experience-body .project-tech {
  font-size: 16px;
  font-weight: 600;
}

.experience-image {
  flex-shrink: 0;
  width: 20%;
  max-width: 400px;
}

.experience-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Réactivité */
@media (max-width: 768px) {
  .experience {
    flex-direction: column;
  }
  .experience-image {
    width: 100%;
    margin-top: 20px;
  }
}
