/* ============================================================
   PORTFOLIO — ADRIEN SOYEUR · Feuille de styles
   ------------------------------------------------------------
   SOMMAIRE
   1.  Variables & reset         
   2.  Fond animé (particles.js) 
   3.  Navbar                    
   4.  Hero / Accueil           
   5.  Titres de section        
   6.  À propos & compétences   
   7.  Biographie / timeline
   8.  Projets
   9.  Contact
   10. Footer
   11. Animations utilitaires
   12. Responsive
   ============================================================ */

/* ===== 1. VARIABLES & RESET ===== */
:root {
  --black-color: #000000;
  --white-color: #ffffff;
  --grey-color: #808080;
  --light-grey-color: #f5f5f5;
  --main-color: #27cafe;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;

  /* Rôles neutres — thème SOMBRE par défaut (dérivés de la charte) */
  --bg: color-mix(in srgb, var(--black-color) 94%, var(--main-color));
  --surface: color-mix(in srgb, var(--black-color) 88%, var(--main-color));
  --surface-2: color-mix(in srgb, var(--black-color) 86%, var(--main-color));
  --text: color-mix(in srgb, var(--white-color) 92%, var(--main-color));
}

/* ===== Thème CLAIR (classe .light sur <html>) ===== */
:root.light {
  --bg: var(--light-grey-color);
  --surface: var(--white-color);
  --surface-2: color-mix(in srgb, var(--light-grey-color) 92%, var(--black-color));
  --text: color-mix(in srgb, var(--black-color) 85%, var(--main-color));
}

/* Reset : enlève marges/paddings par défaut, box-sizing cohérent */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* html porte le fond sombre ; body est transparent pour laisser voir les particules.
   overflow-x:hidden empêche tout défilement horizontal indésirable. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;   /* les ancres s'arrêtent sous la navbar fixe */
  background: var(--bg);
  overflow-x: hidden;
}

body {
  font-family: 'Poppins',sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Les titres utilisent une 2e police pour le contraste */
h1, h2, h3 {
  font-family: 'Space Grotesk',sans-serif;
}

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

img {
  max-width: 100%;
}

/* Espacement vertical standard des sections. z-index:1 = au-dessus du fond. */
section {
  padding: 112px 0;
  position: relative;
  z-index: 1;
}

/* Conteneur centré, largeur max 1140px */
.container {
  width: 92%;
  max-width: 1140px;
  margin: 0 auto;
}

::selection {
  background: var(--main-color);
  color: var(--black-color);
}

/* ===== 2. FOND ANIMÉ (particles.js) ===== */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

/* Le <canvas> injecté par particles.js occupe tout le conteneur */
#particles-js canvas {
  display: block;
}

/* ===== 3. BARRE DE NAVIGATION (en haut, desktop) ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  padding: 12px max(4%, (100% - 1140px) / 2);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
}

/* Bouton hamburger : caché en desktop, affiché en tablette/mobile (voir section 12) */
.nav-toggle {
  display: none;
  border: none;
  background: none;
}

/* Voile du menu mobile : neutralisé en desktop */
.nav-overlay {
  display: none;
}

/* Logo à gauche */
.side-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--main-color);
  border-radius: 12px;
  padding: 4px;
  transition: transform .3s;
}

.side-logo:hover img {
  transform: scale(1.08);
}

/* Liens + bouton thème, en ligne, poussés à droite */
.side-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* Chaque lien / le bouton thème = icône + libellé en ligne */
.side-links a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--grey-color);
  font-size: .95rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  transition: color .3s, background .3s;
}

/* Liens = icône + libellé (le libellé vient de data-label via ::after) */
.side-links a::after {
  content: attr(data-label);
}
/* Bouton thème = icône seule (sans le mot « Thème ») sur desktop */
.theme-toggle::after {
  content: none;
}

.side-links a:hover,
.side-links a.active,
.theme-toggle:hover {
  color: var(--main-color);
  background: color-mix(in srgb, var(--main-color) 12%, transparent);
}

/* Focus clavier accessible */
.side-links a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

/* Animation du point « Disponible immédiatement » */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.6);
    opacity: .6;
  }
}

/* ===== 4. HERO / ACCUEIL ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 52px;
  align-items: center;
}

/* Badge "Disponible immédiatement" avec point vert clignotant */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--main-color) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  padding: 8px 16px;
  border-radius: 32px;
  font-size: .85rem;
  color: var(--main-color);
  backdrop-filter: blur(4px);
  margin-bottom: 24px;
}

.hero-badge .live {
  width: 8px;
  height: 8px;
  background: var(--success-color);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--success-color);
  animation: pulse 1.8s infinite;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 20px;
}

/* .grad = dégradé cyan animé sur le prénom */
.hero h1 .grad {
  background: linear-gradient(120deg,var(--main-color),color-mix(in srgb, var(--main-color) 60%, var(--white-color)),var(--main-color));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Ligne "machine à écrire" + curseur clignotant */
.hero .role {
  font-size: 1.3rem;
  color: var(--main-color);
  font-weight: 500;
  margin-bottom: 20px;
  min-height: 1.6em;
}

.hero .role .cursor {
  display: inline-block;
  width: 2px;
  background: var(--main-color);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero p.lead {
  color: var(--grey-color);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 32px;
}

/* Boutons : hover en scale (agrandissement) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 32px;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  border: none;
  transition: .3s;
  font-family: inherit;
}

.btn-primary {
  background: var(--main-color);
  color: var(--black-color);
  box-shadow: 0 0 20px -2px color-mix(in srgb, var(--main-color) 45%, transparent);
}

.btn-primary:hover {
  transform: scale(1.06);
  box-shadow: 0 0 32px 0px color-mix(in srgb, var(--main-color) 45%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid color-mix(in srgb, var(--main-color) 18%, transparent);
}

.btn-ghost:hover {
  border-color: var(--main-color);
  color: var(--main-color);
  transform: scale(1.06);
}

/* Réseaux sociaux ronds */
.hero-socials {
  display: flex;
  gap: 16px;
}

.hero-socials a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  color: var(--grey-color);
  font-size: 1.1rem;
  transition: .3s;
}

.hero-socials a:hover {
  color: var(--black-color);
  background: var(--main-color);
  transform: scale(1.06);
  box-shadow: 0 12px 20px -8px color-mix(in srgb, var(--main-color) 45%, transparent);
}

/* Carte avatar : photo dans un anneau lumineux qui tourne */
.hero-card {
  position: relative;
}

.avatar-ring {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,var(--main-color),transparent 40%,var(--main-color));
  animation: spin 6s linear infinite;
  filter: blur(2px);
  opacity: .8;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.avatar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(160deg,var(--surface-2),var(--bg));
  border: 4px solid var(--bg);
  z-index: 2;
  overflow: hidden;
}

/* La photo remplit tout le cercle */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 5. TITRES DE SECTION ===== */
.sec-head {
  text-align: center;
  margin-bottom: 60px;
}

.sec-tag {
  color: var(--main-color);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: .8rem;
  display: inline-block;
  margin-bottom: 12px;
}

.sec-head h2 {
  font-size: 2.8rem;
  font-weight: 700;
}

.sec-head p {
  color: var(--grey-color);
  max-width: 560px;
  margin: 16px auto 0;
}

/* ===== 6. À PROPOS & COMPÉTENCES ===== */
/* Bio à gauche, compétences à droite */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--grey-color);
  margin-bottom: 20px;
}

/* Fiche d'infos sur 2 colonnes, sous les paragraphes */
.info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .92rem;
}

.info-item i {
  color: var(--main-color);
  width: 20px;
  text-align: center;
}

.info-item b {
  color: var(--text);
  font-weight: 500;
}

.info-item span {
  color: var(--grey-color);
}

/* Bloc compétences : grille de cartes technos (logo + badge au survol) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Carte blanche contenant un logo, avec badge-nom au survol */
.skill-card {
  position: relative;
  background: var(--white-color);
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}

.skill-card i {
  font-size: 3.8rem;
  /* Carte toujours blanche → logo sombre dans les deux thèmes */
  color: color-mix(in srgb, var(--black-color) 90%, var(--main-color));
  transition: transform .3s, color .3s;
}

/* Survol : la carte se soulève, le logo passe en cyan et grossit */
.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--main-color) 45%, transparent);
}

.skill-card:hover i {
  color: var(--main-color);
  transform: scale(1.12);
}

/* Badge affichant le nom (data-name) sous la carte, révélé au survol */
.skill-card::after {
  content: attr(data-name);
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--main-color);
  color: var(--black-color);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  padding: 4px 16px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

.skill-card:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 7. BIOGRAPHIE / TIMELINE ===== */
.timeline-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.tl-tab {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  color: var(--grey-color);
  padding: 12px 24px;
  border-radius: 32px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem;
  transition: .3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-tab.active, .tl-tab:hover {
  background: var(--main-color);
  color: var(--black-color);
  border-color: var(--main-color);
}

.tl-panel {
  display: none;
}

.tl-panel.active {
  display: block;
  animation: fadeUp .5s;
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--main-color),color-mix(in srgb, var(--main-color) 25%, transparent));
  transform: translateX(-50%);
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--main-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--main-color) 12%, transparent);
  transform: translateX(-50%);
}

.tl-item .date {
  color: var(--main-color);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: 1px;
}

.tl-item h4 {
  font-size: 1.2rem;
  margin: 4px 0 4px;
}

.tl-item .place {
  color: var(--grey-color);
  font-size: .9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-item p {
  color: var(--grey-color);
  font-size: .92rem;
}

.tl-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  border-radius: 16px;
  padding: 20px 24px;
  transition: .3s;
}

.tl-card:hover {
  transform: translateX(8px);
  border-color: var(--main-color);
}

/* ===== 8. PROJETS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(332px, 1fr));
  gap: 28px;
}

.project-card {
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  border-radius: 16px;
  overflow: hidden;
  transition: .3s;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--main-color);
  box-shadow: 0 24px 52px -20px color-mix(in srgb, var(--main-color) 45%, transparent);
}

.pc-banner {
  height: 300px;
  position: relative;
  overflow: hidden;
}

.pc-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: .3s;
}

.project-card:hover .pc-banner img {
  transform: scale(1.06);
}

.pc-tagimg {
  position: absolute;
  top: 16px;
  left: 16px;
  background: color-mix(in srgb, var(--black-color) 80%, transparent);
  color: var(--main-color);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: .74rem;
  font-weight: 600;
  z-index: 4;
}

.pc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 24px 24px;
  background: linear-gradient(to bottom,transparent,color-mix(in srgb, var(--black-color) 97%, transparent) 40%);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 3;
}

.project-card:hover .pc-overlay {
  transform: translateY(0);
}

.pc-overlay h3 {
  font-size: 1.2rem;
  color: var(--white-color);
  margin-bottom: 8px;
}

.pc-overlay p {
  color: color-mix(in srgb, var(--white-color) 72%, transparent);
  font-size: .88rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.pc-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pc-stack span {
  background: color-mix(in srgb, var(--white-color) 12%, transparent);
  color: color-mix(in srgb, var(--white-color) 80%, transparent);
  font-size: .74rem;
  padding: 4px 12px;
  border-radius: 16px;
}

.pc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--main-color);
  font-weight: 600;
  font-size: .92rem;
  transition: .3s;
}

.pc-link:hover {
  gap: 12px;
}

/* ===== 9. CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 48px;
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--grey-color);
  margin-bottom: 32px;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-line .ci {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  display: grid;
  place-items: center;
  color: var(--main-color);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: .3s;
}

.contact-line:hover .ci {
  background: var(--main-color);
  color: var(--black-color);
}

.contact-line .lbl {
  font-size: .78rem;
  color: var(--grey-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-line .val {
  font-weight: 500;
}

/* Formulaire */
form {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 20px 52px -20px color-mix(in srgb, var(--black-color) 70%, transparent);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: .3s;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--main-color) 12%, transparent);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* Le gap gère l'espacement dans .row-2 : pas de marge propre sur les champs
   (sinon, une fois empilés en mobile, gap + marge se cumulent). */
.row-2 .field {
  margin-bottom: 0;
}

form .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* Message de confirmation (caché tant que le JS n'ajoute pas .show) */
.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: .88rem;
  color: var(--success-color);
  display: none;
}

.form-note.show {
  display: block;
}

.form-note.error {
  color: var(--danger-color);
}

/* ===== 10. FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  padding: 40px 0 32px;
  text-align: center;
}

footer .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

footer .logo span {
  color: var(--main-color);
}

footer .logo .logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  background: var(--main-color);
  border-radius: 12px;
  padding: 4px;
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.foot-links a {
  color: var(--grey-color);
  font-size: .92rem;
  transition: .3s;
}

.foot-links a:hover {
  color: var(--main-color);
}

footer .copy {
  color: var(--grey-color);
  font-size: .85rem;
}

footer .copy i {
  color: var(--danger-color);
}

.foot-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.foot-socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
  color: var(--grey-color);
  font-size: 1rem;
  transition: .3s;
}

.foot-socials a:hover {
  color: var(--black-color);
  background: var(--main-color);
  transform: scale(1.06);
  box-shadow: 0 0 16px -2px color-mix(in srgb, var(--main-color) 45%, transparent);
}

/* ===== 11. ANIMATIONS UTILITAIRES ===== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Bouton retour en haut (caché tant que le JS n'ajoute pas .show) */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--main-color);
  color: var(--black-color);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--main-color) 45%, transparent);
  z-index: 900;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-4px);
}

/* ===== 12. RESPONSIVE ===== */
/* Tablette : les grilles 2 colonnes repassent en 1 colonne */
@media (max-width: 992px) {
  .hero-grid, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero {
    padding-top: 112px;
  }
  .hero-card {
    order: -1;
  }
  /* photo au-dessus du texte */
  .avatar-ring {
    width: 300px;
    height: 300px;
  }
  .about-text {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .info-list {
    grid-template-columns: 1fr 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  /* Titres : paliers responsives */
  .hero h1 {
    font-size: 3.2rem;
  }
  .sec-head h2 {
    font-size: 2.4rem;
  }
  .nav-toggle {
    display: grid;
    place-items: center;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(12px);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
  }
  /* Panneau coulissant depuis la droite */
  .sidebar {
    top: 0;
    left: auto;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 80px 0 28px;
    background: var(--surface);
    border-bottom: none;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.16,1,.3,1);
    box-shadow: -12px 0 44px color-mix(in srgb, var(--black-color) 35%, transparent);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .side-logo {
    align-self: center;
  }
  .side-links {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    width: 100%;
    gap: 0;
  }
  .side-links a i {
    display: inline;
  }
  .side-links a,
  .theme-toggle {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 28px;
    border-radius: 0;
    font-size: 1.15rem;
    line-height: 1;
  }
  .side-links a::after,
  .theme-toggle::after {
    content: attr(data-label);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
  }
  /* Voile derrière le panneau ouvert */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--black-color) 50%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 999;
  }
  .nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }
  .hero-text {
    text-align: center;
  }
  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions,
  .hero-socials {
    justify-content: center;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .sec-head h2 {
    font-size: 2.2rem;
  }
  .row-2 {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .info-list {
    grid-template-columns: 1fr;
  }
  form {
    padding: 28px;
  }
}

/* Petit mobile : boutons en pleine largeur */
@media (max-width: 576px) {
  .avatar-ring {
    width: 232px;
    height: 232px;
  }
  .hero h1 {
    font-size: 2.4rem;
  }
  .sec-head h2 {
    font-size: 2rem;
  }
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .hero-socials {
    justify-content: center;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
