/* ==========================================================================
   paulmunoz.fr - feuille de style principale (maquette A « Mii Party »)
   Aucun Mii n'est dessiné ici : tous les Mii sont des fichiers à déposer
   dans assets/mii/ (PNG, GIF) - voir les commentaires « MII » dans les HTML.
   Pour une vidéo MP4, remplacer la balise <img class="mii"> par
   <video class="mii" autoplay loop muted playsinline src="..."></video>
   (la classe .mii s'applique aussi aux <video>).
   ========================================================================== */

:root {
  --ink: #1B2A41;
  --bg: #F4F7FF;
  --white: #FFFFFF;
  --blue: #2457E6;
  --sky: #CFE0FF;
  --yellow: #FFC93C;
  --cream: #FFE9A8;
  --pink: #FF7AA8;
  --mint: #6FD6B5;
  --orange: #FF9B54;
  --violet: #B79CFF;
  --font-title: "Fredoka", sans-serif;
  --font-body: "Nunito", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
}

a { color: var(--blue); }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-title); }
p { margin: 0; }

.container { max-width: 1184px; margin: 0 auto; padding: 0 48px; }

/* ---------- Mii (images ou vidéos fournies par Paul) ---------- */
.mii { height: auto; object-fit: contain; }
/* Ajouté par script/main.js tant que le fichier d'un Mii est introuvable */
.mii--missing {
  outline: 3px dashed var(--blue);
  outline-offset: -3px;
  background: rgba(36, 87, 230, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
}

/* ---------- En-tête ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 48px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-title); font-weight: 600; font-size: 26px;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); text-decoration: none; font-weight: 700;
}
.pill:hover { background: var(--cream); color: var(--ink); }
.pill--active, .pill--active:hover { background: var(--blue); color: var(--white); }
.pill--yellow { background: var(--yellow); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  border: 2px solid var(--ink); text-decoration: none; font-weight: 700;
  font-family: inherit; font-size: inherit; cursor: pointer;
}
.btn--primary { background: var(--blue); color: var(--white); box-shadow: 4px 4px 0 var(--ink); }
.btn--primary:hover { color: var(--white); background: #1B44B8; }
.btn--light { background: var(--white); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { color: var(--white); background: #0E1827; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Accueil : hero ---------- */
.hero { padding-top: 32px; padding-bottom: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 460px; display: flex; flex-direction: column; gap: 24px; }
.chip {
  align-self: flex-start; background: var(--yellow); border: 2px solid var(--ink);
  border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: 15px;
}
.hero h1 { font-weight: 700; font-size: clamp(44px, 7vw, 78px); line-height: 1.02; }
.hero h1 span { color: var(--blue); }
.lead { font-size: 21px; max-width: 520px; }

.hero__art { flex: 1 1 380px; position: relative; width: 100%; max-width: 440px; height: 480px; margin: 0 auto; }
.hero__blob {
  position: absolute; inset: 20px 0 0 0; background: var(--sky); border: 3px solid var(--ink);
  border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%;
}
.hero__mii { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); width: 260px; }
.hero__friend { position: absolute; bottom: 0; width: 84px; }
.hero__friend--right { right: 4px; }
.hero__friend--left { left: 4px; }
.bubble {
  position: absolute; top: 0; left: 0; max-width: 210px; background: var(--white);
  border: 3px solid var(--ink); border-radius: 24px; padding: 12px 16px;
  font-family: var(--font-title); font-weight: 500; font-size: 18px; line-height: 1.25;
}
.float-tag {
  position: absolute; border: 3px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 700;
}
.float-tag--java { top: 40px; right: 0; background: var(--yellow); }
.float-tag--python { top: 150px; right: -8px; background: var(--mint); }
.float-tag--c { bottom: 150px; left: -8px; background: var(--pink); }

/* ---------- Titres de section ---------- */
.section-title { font-weight: 600; font-size: 40px; }
.section-intro { margin-top: 8px; }

/* ---------- Cartes projets ---------- */
.projects { padding-top: 24px; padding-bottom: 72px; }
.projects .section-title { margin-bottom: 56px; }
.cards { display: flex; flex-wrap: wrap; gap: 72px 32px; }
.card {
  flex: 1 1 300px; position: relative; background: var(--white);
  border: 3px solid var(--ink); border-radius: 28px; padding: 36px 24px 24px;
  box-shadow: 6px 6px 0 var(--ink);
}
.card[hidden] { display: none; }
.card__mii { position: absolute; top: -52px; right: 20px; width: 72px; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
.badge--yellow { background: var(--yellow); }
.badge--mint { background: var(--mint); }
.badge--orange { background: var(--orange); }
.badge--violet { background: var(--violet); }
.card h2, .card h3 { font-weight: 600; font-size: 28px; margin: 12px 0 8px; }
.card p { margin-bottom: 16px; }
.card a { font-weight: 700; }

/* ---------- Filtres (page Projets) ---------- */
.page-head { padding-top: 32px; padding-bottom: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head__text { flex: 1 1 420px; }
.page-head h1 { font-weight: 700; font-size: clamp(44px, 7vw, 72px); line-height: 1.02; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 10px 20px; border-radius: 999px; background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); font-family: inherit; font-size: inherit; font-weight: 700; cursor: pointer;
}
.filter:hover { background: var(--cream); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.page-head + .projects { padding-top: 56px; }

/* ---------- Bandeau crème (outils / petits projets) ---------- */
.band {
  background: var(--cream); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  padding: 64px 48px 56px;
}
.band__inner { max-width: 1088px; margin: 0 auto; }
.tools { display: flex; flex-wrap: wrap; gap: 32px 40px; justify-content: space-between; margin-top: 40px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tool img, .tool video { width: 90px; }
.tool span {
  background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
  padding: 4px 16px; font-weight: 700;
}
.band--compact { padding: 48px; }
.band__row { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.band__row > .mii { width: 96px; flex: none; }
.band__row .band__text { flex: 1 1 380px; }
.band__row h2 { font-weight: 600; font-size: 32px; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 16px; font-weight: 700;
}

/* ---------- Bloc contact ---------- */
.contact { padding-top: 72px; padding-bottom: 40px; }
.contact--tight { padding-top: 0; }
.contact__box {
  background: var(--blue); color: var(--white); border: 3px solid var(--ink); border-radius: 40px;
  padding: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px; box-shadow: 8px 8px 0 var(--ink);
}
.contact__box > .mii { width: 120px; flex: none; }
.contact__text { flex: 1 1 320px; }
.contact__text h2 { font-weight: 600; font-size: 40px; margin-bottom: 8px; }
.contact .btn { background: var(--white); color: var(--ink); }
.contact .btn--yellow { background: var(--yellow); }

/* ---------- Page À propos ---------- */
.about { padding-top: 32px; padding-bottom: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.about__art { flex: 0 1 320px; position: relative; width: 100%; max-width: 320px; height: 360px; margin: 0 auto; }
.about__blob {
  position: absolute; inset: 0; background: var(--cream); border: 3px solid var(--ink);
  border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%;
}
.about__mii { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); width: 200px; }
.about__text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 16px; }
.about__text h1 { font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.about__text p { font-size: 20px; }

.block { padding-bottom: 56px; }
.block .section-title { margin-bottom: 32px; }
.block .section-intro { margin: 8px 0 24px; }
.timeline { display: flex; flex-wrap: wrap; gap: 24px; }
.step {
  flex: 1 1 320px; background: var(--white); border: 3px solid var(--ink); border-radius: 28px;
  padding: 24px; box-shadow: 6px 6px 0 var(--ink); display: flex; gap: 16px;
}
.step > .mii { width: 56px; flex: none; align-self: flex-start; }
.step h3 { font-weight: 600; font-size: 24px; margin-bottom: 4px; }
.sites { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Pied de page ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  max-width: 1184px; margin: 0 auto; padding: 24px 48px 40px; font-size: 15px;
}
.site-footer__miis { display: flex; gap: 6px; align-items: flex-end; }
.site-footer__miis .mii { width: 40px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .container, .site-footer { padding-left: 20px; padding-right: 20px; }
  .site-header { padding: 16px 20px; }
  .band, .band--compact { padding-left: 20px; padding-right: 20px; }
  .contact__box { padding: 28px 20px; }
  .tools { justify-content: center; }
}
