/* ================================
   VARIABLES
   clamp(min, valeur-fluide, max)
   → s'adapte à toute les tailles d'écran
================================ */
:root {
  --vert-clair: #86a788;
  --vert-fonce: #455f47;
  --creme:      #fffdec;
  --rose-clair: #ffe2e2;
  --rose-moyen: #ffcfcf;
  --rose-texte: #c47a7a;

  /* Espacement fluide */
  --padding-section: clamp(24px, 5vw, 110px);
  --padding-lateral: clamp(16px, 6vw, 140px);

  --fs-small:      clamp(0.618rem, 0.8vw,  0.618rem);
  --fs-body:       clamp(0.9rem,   1.1vw,  1rem);
  --fs-detail:     clamp(0.85rem,  1.1vw,  1.272rem);
  --fs-btn:        clamp(0.9rem,   1.2vw,  1.618rem);
  --fs-nav:        clamp(0.8rem,   1.2vw,  1.618rem);
  --fs-summary:    clamp(0.9rem,   1.2vw,  1.618rem);
  --fs-card-desc:  clamp(0.85rem,  1.1vw,  1.272rem);
  --fs-card-titre: clamp(1.1rem,   1.6vw,  2.058rem);
  --fs-large:      clamp(1rem,     1.8vw,  2.058rem);
  --fs-h3:         clamp(1.1rem,   2vw,    2.618rem);
  --fs-h2:         clamp(1.4rem,   2.6vw,  3.330rem);
  --fs-h1:         clamp(1.3rem,   3.3vw,  4.236rem);
  --fs-logo:       clamp(0.75rem,  2.5vw,  2.618rem);
}


/* ================================
   BASE en mobil first
================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  padding-top: 115px;
  margin: 0;
  background: var(--creme);
  font-family: 'Segoe UI', sans-serif;
  color: var(--vert-fonce);
  font-size: var(--fs-body);
}

p {
  font-size: var(--fs-body);
  line-height: 1.75;
}


/* ================================
   HEADER
================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--vert-clair);
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 4px;
}

.logo {
  width: 100%;
  margin: 0;
  font-size: var(--fs-logo);
  font-weight: bold;
  color: var(--rose-moyen);
  flex-shrink: 0;
}

nav {
  display: flex;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--creme);
  font-size: var(--fs-nav);
  font-weight: 600;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  padding: 0 4px;
}

nav a:hover { opacity: 0.8; }

.social-links {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  align-items: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.social-links a:first-child { margin-left: 0; }

.social-links img {
  width:  clamp(28px, 4vw, 72px);
  height: clamp(28px, 4vw, 72px);
  transition: transform 0.3s ease;
}

.social-links img:hover { transform: scale(1.1); }


/* ================================
   SECTION ACCUEIL
================================ */
.presentation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

.nom { display: contents; }

.nom h1 {
  font-size: var(--fs-h1);
  color: var(--vert-fonce);
  order: 1;
  margin: 0;
}

.photo {
  order: 2;
  flex-shrink: 0;
}

.photo img {
  width:  clamp(130px, 25vw, 420px);
  height: clamp(130px, 25vw, 420px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  background-color: var(--rose-clair);
}

.nom p {
  order: 3;
  font-size: var(--fs-large);
  color: var(--vert-fonce);
  margin: 0;
  line-height: 1.5;
}

.boutons {
  order: 4;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
  margin-top: 0;
  padding: 0 16px;
}

.btn {
  width: 100%;
  text-align: center;
  padding: clamp(10px, 1.5vw, 20px) clamp(16px, 3vw, 40px);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: var(--fs-btn);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.btn-primary   { background-color: var(--vert-clair); color: var(--creme); }
.btn-secondary { background-color: var(--vert-fonce); color: var(--creme); }

.btn-primary:hover   { background-color: #6d8a6f; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.btn-secondary:hover { background-color: #354a38; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }


/* ================================
   SECTION À PROPOS
================================ */
#about {
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

#about h2 {
  font-size: var(--fs-h2);
  color: var(--vert-fonce);
  margin-bottom: clamp(4px, 1vw, 10px);
}

#about h3 {
  font-size: var(--fs-h3);
  color: var(--vert-clair);
  margin-bottom: clamp(14px, 2vw, 24px);
}

#about p {
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--vert-fonce);
  background: white;
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 30px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-left: 4px solid var(--vert-clair);
  margin: 0;
}


/* ================================
   SECTION COMPÉTENCES
================================ */
#compétences {
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

#compétences h2 {
  font-size: var(--fs-h2);
  color: var(--vert-fonce);
  margin-bottom: clamp(10px, 2vw, 16px);
}

.carte-competences {
  background: white;
  border-radius: 20px;
  padding: clamp(24px, 5vw, 80px) clamp(16px, 4vw, 60px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  position: relative;
}

.carte-competences::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--vert-clair), var(--vert-fonce));
  border-radius: 20px 20px 0 0;
}

.legende {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  margin-bottom: clamp(16px, 3vw, 60px);
  font-size: clamp(0.8rem, 1vw, 1.4rem);
  font-weight: 600;
  flex-wrap: wrap;
}

.legende span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pastille {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.pastille-fait    { background: var(--vert-fonce); }
.pastille-encours { background: var(--rose-moyen); }
.pastille-avenir  { background: #ccc; }

.chemin-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  padding-top: clamp(20px, 4vw, 60px);
  padding-bottom: clamp(20px, 4vw, 50px);
  position: relative;
}

.barre-fond {
  height: clamp(140px, 18vw, 250px);
  background: white;
  border-radius: 10px;
  min-width: 900px;
  position: relative;
}

.barre-progression {
  height: clamp(8px, 1vw, 14px);
  background: linear-gradient(90deg, var(--vert-fonce), var(--vert-clair));
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease;
  position: absolute;
  bottom: 0;
  left: 0;
}

.chibi {
  position: absolute;
  bottom: clamp(12px, 2vw, 30px);
  left: 0;
  transition: left 1.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chibi img {
  width: clamp(80px, 12vw, 200px);
  animation: saut 0.4s ease-in-out infinite alternate;
  filter: drop-shadow(1px 3px 4px rgba(0,0,0,0.3));
}

@keyframes saut {
  from { transform: translateY(0); }
  to   { transform: translateY(-7px); }
}

.bulle {
  background: var(--rose-moyen);
  color: var(--rose-texte);
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  order: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bulle.visible { opacity: 1; }

.etapes {
  display: flex;
  justify-content: space-between;
  min-width: 900px;
  margin-top: clamp(30px, 4vw, 45px);
}

.etape {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2vw, 25px);
  flex: 1;
  cursor: default;
}

.rond {
  width:  clamp(44px, 6vw, 90px);
  height: clamp(44px, 6vw, 90px);
  border-radius: 50%;
  border: 3px solid #ccc;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2vw, 2.2rem);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-top: clamp(-22px, -3vw, -40px);
  position: relative;
  transition: transform 0.2s ease;
}

.etape:hover .rond { transform: scale(1.15); }

.etape.fait .rond {
  background: var(--vert-fonce);
  border-color: var(--vert-fonce);
  color: white;
}

.etape.encours .rond {
  background: var(--rose-clair);
  border-color: var(--rose-moyen);
  animation: pulsation 1.5s ease-in-out infinite;
}

@keyframes pulsation {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,207,207,0.7); }
  50%       { box-shadow: 0 0 0 8px rgba(255,207,207,0); }
}

.etape.avenir .rond {
  background: #f5f5f5;
  opacity: 0.5;
}

.nom-etape {
  font-size: clamp(0.6rem, 0.9vw, 1.2rem);
  font-weight: 700;
  text-align: center;
  color: var(--vert-fonce);
  max-width: clamp(50px, 7vw, 85px);
  line-height: 1.2;
  transform: rotate(45deg);
}

.etape.avenir .nom-etape  { color: #aaa; }
.etape.encours .nom-etape { color: var(--rose-texte); }

.pied-carte {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(14px, 2vw, 20px);
  gap: 8px;
  font-size: clamp(0.8rem, 1vw, 1.1rem);
  color: #888;
}

.badge-encours {
  background: var(--rose-clair);
  border: 2px solid var(--rose-moyen);
  color: var(--vert-fonce);
  font-weight: 800;
  font-size: clamp(0.75rem, 0.9vw, 1rem);
  padding: clamp(4px, 0.5vw, 7px) clamp(10px, 1.5vw, 18px);
  border-radius: 20px;
}


/* ================================
   SECTION PARCOURS
================================ */
#parcours {
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

#parcours h2 {
  font-size: var(--fs-h2);
  color: var(--vert-fonce);
  margin-bottom: clamp(16px, 3vw, 40px);
}

.parcours {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 30px);
  flex-wrap: wrap;
}

.experiences,
.diplomes {
  flex: 1 1 100%;
}

.experiences h3,
.diplomes h3,
#projets h3 {
  font-size: clamp(1rem, 1.3vw, 1.5rem);
  color: var(--vert-clair);
  margin-bottom: clamp(12px, 2vw, 22px);
  padding-bottom: 12px;
}

details {
  background: white;
  border-radius: 14px;
  margin-bottom: clamp(10px, 1.5vw, 18px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.09);
  overflow: hidden;
  border-left: 6px solid var(--vert-clair);
}

details[open] { border-left-color: var(--rose-moyen); }

summary {
  padding: clamp(12px, 1.8vw, 24px) clamp(14px, 2vw, 26px);
  font-weight: 600;
  font-size: var(--fs-summary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: background 0.2s ease;
}

summary:hover { background: var(--creme); }

details[open] summary {
  background: var(--rose-clair);
  color: var(--vert-fonce);
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--vert-clair);
  flex-shrink: 0;
  line-height: 1;
}

details[open] summary::after {
  content: '−';
  color: var(--rose-texte);
}

.detail-contenu {
  padding: clamp(12px, 2vw, 24px) clamp(14px, 2vw, 26px);
  font-size: var(--fs-detail);
  line-height: 1.9;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-contenu p {
  margin: 0;
  font-size: var(--fs-detail);
}

.detail-contenu strong { color: var(--vert-fonce); }


/* ================================
   SECTION PROJETS
================================ */
#projets {
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

#projets h2 {
  font-size: var(--fs-h2);
  color: var(--vert-fonce);
  margin-bottom: clamp(6px, 1vw, 10px);
}

#projets h3 {
  font-size: clamp(0.95rem, 1.3vw, 1.5rem);
  margin-bottom: clamp(16px, 3vw, 40px);
}

#projets > p {
  color: var(--vert-clair);
  font-size: clamp(1rem, 1.5vw, 2rem);
  margin-bottom: clamp(20px, 3vw, 40px);
}

.grille-projets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: clamp(16px, 3vw, 30px);
}

.card-projet {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 4px solid var(--vert-clair);
}

.card-projet:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.card-image {
  width: 100%;
  height: clamp(150px, 20vw, 240px);
  object-fit: cover;
  display: block;
  background: var(--creme);
}

.card-corps {
  padding: clamp(14px, 2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-titre {
  font-size: var(--fs-card-titre);
  font-weight: 700;
  color: var(--vert-fonce);
  margin: 0;
}

.card-description {
  font-size: var(--fs-card-desc);
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.card-technos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.techno {
  background: var(--creme);
  border: 1px solid var(--vert-clair);
  color: var(--vert-fonce);
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.card-boutons {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.card-boutons a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: clamp(0.8rem, 1vw, 1.2rem);
  font-weight: 600;
  padding: clamp(8px, 1.2vw, 16px) clamp(12px, 2vw, 30px);
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.card-boutons a:hover { opacity: 0.85; }

.btn-github {
  background: var(--rose-clair);
  color: var(--vert-fonce);
  border: 2px solid var(--rose-moyen);
}


/* ================================
   SECTION CONTACT 
================================ */
#contact {
  padding: var(--padding-section) var(--padding-lateral);
  max-width: 1600px;
  margin: 0 auto;
}

#contact h2 {
  font-size: var(--fs-h2);
  color: var(--vert-fonce);
  margin-bottom: clamp(16px, 3vw, 40px);
}

.carte-construction {
  background: white;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  padding: clamp(24px, 5vw, 80px) clamp(16px, 6vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(20px, 4vw, 50px);
  position: relative;
  overflow: hidden;
}

.carte-construction::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    #f9c74f,
    #f9c74f 10px,
    var(--rose-moyen) 10px,
    var(--rose-moyen) 20px
  );
}

.construction-image {
  width: clamp(100px, 20vw, 400px);
  flex-shrink: 0;
  filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.15));
}

.construction-texte {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 16px);
}

.construction-texte h3 {
  font-size: clamp(1.1rem, 2vw, 2rem);
  color: var(--vert-fonce);
  margin: 0;
}

.badge-construction {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff8e1;
  border: 2px solid #f9c74f;
  color: #b08600;
  font-weight: 700;
  font-size: clamp(0.8rem, 0.9vw, 1rem);
  padding: 6px 16px;
  border-radius: 20px;
  width: fit-content;
  margin: 0 auto;
}

.construction-texte p {
  font-size: clamp(0.9rem, 1.5vw, 2rem);
  color: #777;
  line-height: 1.7;
  margin: 0;
}

.bientot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.bientot span {
  font-size: clamp(0.9rem, 1.5vw, 2rem);
  color: var(--vert-fonce);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bientot span::before {
  content: '→';
  color: var(--vert-clair);
  font-weight: 700;
}


/* ================================
   FOOTER
================================ */
footer {
  text-align: center;
  padding: clamp(14px, 2vw, 24px);
  color: var(--vert-fonce);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
}


/* ================================================
   DESKTOP — min-width: 900px
================================================ */
@media (min-width: 900px) {

  /* --- BASE --- */
  body {
    padding-top: clamp(90px, 8vw, 110px);
  }

  /* --- HEADER --- */
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: clamp(16px, 2vw, 32px) clamp(32px, 5vw, 100px);
    gap: clamp(16px, 2vw, 40px);
    flex-wrap: nowrap;
  }

  .logo { width: auto; }

  nav {
    width: auto;
    flex-wrap: nowrap;
    gap: clamp(8px, 1.5vw, 30px);
    margin: 0;
    justify-content: center;
    flex: 1;
  }

  .social-links {
    width: auto;
    padding-right: clamp(0px, 3vw, 60px);
  }

  .social-links a:first-child {
    margin-left: clamp(0px, 1vw, 20px);
  }

  /* --- SECTION ACCUEIL --- */
  .presentation {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: clamp(20px, 4vw, 60px);
  }

  .nom {
    display: block;
    flex: 1;
  }

  .nom h1    { order: unset; margin: 0 0 clamp(10px, 2vw, 20px) 0; }
  .nom p     { order: unset; margin: 0 0 clamp(12px, 2vw, 25px) 0; }
  .photo     { order: unset; }

  .boutons {
    order: unset;
    flex-direction: row;
    width: auto;
    gap: clamp(10px, 2vw, 20px);
    margin-top: clamp(12px, 2vw, 25px);
    padding: 0;
  }

  .btn { width: auto; }

  /* --- SECTION PARCOURS --- */
  .parcours { flex-direction: row; }

  .experiences,
  .diplomes  { flex: 1 1 45%; }

  /* --- SECTION CONTACT --- */
  .carte-construction {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .badge-construction { margin: 0; }

  .bientot span { justify-content: flex-start; }

}
