/* ─── VARIABLES ─── */
:root {
  --bg: #080810;
  --accent1: #7B61FF;
  --accent2: #FF6B6B;
  --accent3: #FFD166;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.10);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --text: #F0EEF8;
  --muted: rgba(240,238,248,0.45);
  --green:   #06D6A0;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg); /* évite tout fond transparent derrière le body */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* ─── BACKGROUND BLOBS ─── */
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* overflow: hidden retiré — cause des flashs noirs sur Android Chrome
     car il crée un stencil GPU qui clignote quand les blobs approchent des bords */
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.20;
  will-change: transform, opacity;
  transition: background 1s, opacity 1s;
}

/* Chaque blob dérive dans sa propre direction — 100% GPU */
@keyframes drift1 {
  0%   { transform: translate(0px, 0px)    scale(1);    opacity: 0.18; }
  33%  { transform: translate(60px, -80px) scale(1.1);  opacity: 0.23; }
  66%  { transform: translate(-40px, 60px) scale(0.95); opacity: 0.16; }
  100% { transform: translate(0px, 0px)    scale(1);    opacity: 0.18; }
}
@keyframes drift2 {
  0%   { transform: translate(0px, 0px)     scale(1);    opacity: 0.18; }
  33%  { transform: translate(-70px, 50px)  scale(1.08); opacity: 0.22; }
  66%  { transform: translate(50px, -60px)  scale(0.93); opacity: 0.15; }
  100% { transform: translate(0px, 0px)     scale(1);    opacity: 0.18; }
}
@keyframes drift3 {
  0%   { transform: translate(0px, 0px)    scale(1);    opacity: 0.18; }
  50%  { transform: translate(-50px, -70px) scale(1.12); opacity: 0.24; }
  100% { transform: translate(0px, 0px)    scale(1);    opacity: 0.18; }
}

.blob1 { width: 600px; height: 600px; background: var(--accent1); top: -200px; left: -200px; animation: drift1 18s ease-in-out infinite; }
.blob2 { width: 500px; height: 500px; background: var(--accent2); bottom: -150px; right: -150px; animation: drift2 22s ease-in-out infinite; }
.blob3 { width: 400px; height: 400px; background: var(--accent3); top: 40%; left: 40%; animation: drift3 15s ease-in-out infinite; }

/* ─── MOBILE : tailles adaptées, animation plus lente ─── */
@media (max-width: 768px) {
  .blob {
    filter: blur(90px); /* réduit mais toujours flou et joli */
    opacity: 0.22;      /* légèrement plus visible pour compenser */
  }
  .blob1 { width: 380px; height: 380px; animation-duration: 26s; }
  .blob2 { width: 320px; height: 320px; animation-duration: 32s; }
  .blob3 { width: 280px; height: 280px; animation-duration: 22s; }
}

/* ─── Respect du paramètre "réduire les animations" du système ─── */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ─── MAIN CONTENT ─── */
#main {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: mainReveal 1s ease forwards 0.2s;
}

@keyframes mainReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.1);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  transition: all 0.3s;
  letter-spacing: 0.02em;
}
nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

/* ─── SECTIONS ─── */
section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 5vw;
  position: relative;
}

/* ─── HERO ─── */
#acceuil {
  flex-direction: column;
  text-align: center;
  gap: 24px;
}

.hero-title span { color: var(--accent1); font-style: italic; }

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent3);
  opacity: 0;
  animation: fadeUp2 0.8s ease forwards 0.5s;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -3px;
  opacity: 0;
  animation: fadeUp2 0.9s ease forwards 0.7s;
}

.hero-sub {
  max-width: 500px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp2 0.9s ease forwards 0.9s;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp2 0.9s ease forwards 1.1s;
}

@keyframes fadeUp2 {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn {
  padding: 14px 32px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary {
  background: #7b61ff8f;
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-primary:hover { background: rgba(123,97,255,0.6); transform: translateY(-3px); }

.btn-ghost {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); }

/* ─── GLASS CARD ─── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(48px) saturate(160%);
  -webkit-backdrop-filter: blur(48px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  z-index: 2;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* ─── ABOUT ─── */
#a_propos .about-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  max-width: 1100px;
  width: 100%;
  align-items: center;
}

.about-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
}

.about-blob {
  width: 100%;
  height: 100%;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(135deg, rgba(123,97,255,0.25), rgba(0,245,196,0.15));
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: morphBlob 8s ease-in-out infinite alternate;
  box-shadow: 0 0 80px rgba(123,97,255,0.2);
  overflow: hidden;
}

@keyframes morphBlob {
  0%   { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
  33%  { border-radius: 60% 40% 45% 55% / 45% 55% 45% 55%; }
  66%  { border-radius: 50% 50% 60% 40% / 60% 40% 50% 50%; }
  100% { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
}

.about-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-text h2 em { color: var(--accent1); font-style: italic; }

.about-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  cursor: default;
}

.tag svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tag:hover { transform: translateY(-2px); filter: brightness(1.2); }

/* Couleurs par stack */
.tag-html   { color: #E34F26; border-color: rgba(227,79,38,0.3);   background: rgba(227,79,38,0.08); }
.tag-css    { color: #1572B6; border-color: rgba(21,114,182,0.3);  background: rgba(21,114,182,0.08); }
.tag-js     { color: #F7DF1E; border-color: rgba(247,223,30,0.3);  background: rgba(247,223,30,0.08); }
.tag-node   { color: #539E43; border-color: rgba(83,158,67,0.3);   background: rgba(83,158,67,0.08); }
.tag-react  { color: #61DAFB; border-color: rgba(97,218,251,0.3);  background: rgba(97,218,251,0.08); }
.tag-next   { color: #e0e0e0; border-color: rgba(224,224,224,0.3); background: rgba(224,224,224,0.06); }
.tag-sql    { color: #4479A1; border-color: rgba(68,121,161,0.3);  background: rgba(68,121,161,0.08); }
.tag-express{ color: #c7b8ff; border-color: rgba(199,184,255,0.3); background: rgba(199,184,255,0.08); }

/* ─── SECTION HEADER ─── */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  width: 100%;
}

.section-header .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 12px;
  display: block;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
}

.section-header h2 em { color: var(--accent1); font-style: italic; }

/* ─── PORTFOLIO ─── */
#portfolio {
  flex-direction: column;
}

/*
  GRILLE :
  [ Projet 01 (col 1+2) ] | [ Projet 02 vertical (col 3) ]
  [ Proj 03  ] [ Proj 04 ] | [         suite col 3        ]
*/
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 340px;
  grid-template-rows: auto auto;
  gap: 24px;
  max-width: 1200px;
  width: 100%;
}

/* ─── PROJECT CARD BASE ─── */
.project-card {
  padding: 32px;
  cursor: pointer;
}

.project-card .project-num {
  font-size: 0.75rem;
  color: var(--accent1);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  font-weight: 500;
}

.project-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.3s;
}
.project-card:hover h3 { color: var(--accent3); }

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-card .siteweb-link {
  color: var(--accent3);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 0.72rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s, opacity 0.2s;
}
.discord-link svg { opacity: 0.5; transition: opacity 0.2s; }
.discord-link:hover { color: #5865F2; }
.discord-link:hover svg { opacity: 1; }

.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card .project-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 500;
  border: 1px solid;
  transition: all 0.3s;
}

.project-card .project-tag svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.project-tag-html    { color: #E34F26; border-color: rgba(227,79,38,0.3);   background: rgba(227,79,38,0.08); }
.project-tag-css     { color: #1572B6; border-color: rgba(21,114,182,0.3);  background: rgba(21,114,182,0.08); }
.project-tag-js      { color: #F7DF1E; border-color: rgba(247,223,30,0.3);  background: rgba(247,223,30,0.08); }
.project-tag-node    { color: #539E43; border-color: rgba(83,158,67,0.3);   background: rgba(83,158,67,0.08); }
.project-tag-react   { color: #61DAFB; border-color: rgba(97,218,251,0.3);  background: rgba(97,218,251,0.08); }
.project-tag-next    { color: #e0e0e0; border-color: rgba(224,224,224,0.3); background: rgba(224,224,224,0.06); }
.project-tag-uiux    { color: #FF6B6B; border-color: rgba(255,107,107,0.3); background: rgba(255,107,107,0.08); }
.project-tag-resp    { color: #FFD166; border-color: rgba(255,209,102,0.3); background: rgba(255,209,102,0.08); }
.project-tag-perf    { color: #06D6A0; border-color: rgba(6,214,160,0.3);   background: rgba(6,214,160,0.08); }

/* ─── PROJET 01 — Featured horizontal ─── */
.project-featured {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
}

.project-featured-bottom {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
}

/* Zone image proj 01 — position:relative indispensable pour .project-img en absolute */
.project-featured-visual {
  position: relative;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(135deg, rgba(123,97,255,0.25), rgba(255,107,107,0.12));
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
  min-height: 260px;
}

/* Overlay shimmer au-dessus de l'image */
.project-featured-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,97,255,0.10) 0%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

/* Contenu texte du projet 01 */
.project-featured-content {
  padding: 36px 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ─── PROJET 02 — Vertical (colonne 3, lignes 1+2) ─── */
.project-featured-vertical {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Zone image proj 02 — flex:1 pour occuper toute la hauteur disponible */
.project-vertical-visual {
  position: relative;
  flex: 1;
  min-height: 220px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(160deg, rgba(255,107,107,0.25), rgba(123,97,255,0.15));
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}

/* Overlay shimmer */
.project-vertical-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,107,107,0.10) 0%, transparent 60%);
  animation: shimmer 4s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

/* Contenu texte du projet 02 */
.project-vertical-content {
  padding: 28px;
  flex-shrink: 0;
}

@keyframes shimmer {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

/* ─── CONTACT ─── */
#contact {
  flex-direction: column;
}

.contact-inner {
  max-width: 680px;
  width: 100%;
  text-align: center;
}

.contact-card {
  padding: 56px 48px;
  margin-top: 40px;
}

.contact-card p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.contact-link:hover {
  color: var(--text);
  border-color: var(--accent1);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(123,97,255,0.2);
}

.contact-link svg { width: 18px; height: 18px; }

/* ─── MAIL GRADIENT ─── */
.mail-gradient {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent2), var(--accent1));
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding: 0.3em 0.8em;
  border-radius: 2em;
  text-decoration: none;
  transition: background-position 0.7s cubic-bezier(.4,1.6,.6,1), filter 0.5s cubic-bezier(.4,1.6,.6,1);
}

.mail-gradient:hover {
  background-position: 100% 0%;
  filter: brightness(1.18) saturate(1.2);
  text-decoration: underline;
}

/* ─── PROJECT CARD WITH TOP IMAGE ─── */
.project-card-with-img {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-card-top-visual {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: linear-gradient(135deg, rgba(123,97,255,0.25), rgba(255,107,107,0.12));
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.project-card-top-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,97,255,0.10) 0%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

.project-card-content {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ─── IMAGES PROJETS ─── */
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img {
  transform: scale(1.04);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  cursor: default;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.22, 0.68, 0, 1.2);
  position: relative;
  z-index: 1;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.25s, background 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  opacity: 1;
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.2);
}

.project-img {
  cursor: zoom-in;
}

/* ─── LOGO ABOUT ─── */
.about-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  display: block;
  margin: 0;
  transition: transform 0.3s;
  animation: morphBlob 8s ease-in-out infinite alternate;
}

/* ─── MAILTO POPUP ─── */
#mailto-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,8,16,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mailto-popup-box {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.2rem 2.8rem;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  width: clamp(280px, 88vw, 480px);
  text-align: center;
  animation: popupIn 0.28s cubic-bezier(.34,1.56,.64,1) both;
}

.mailto-popup-box p {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.mailto-popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.mailto-btn-continue,
.mailto-btn-cancel {
  padding: 7px 20px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.mailto-btn-continue {
  background: rgba(255,255,255,0.10);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}
.mailto-btn-continue:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.mailto-btn-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.mailto-btn-cancel:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* ─── MAILTO POPUP — bottom sheet mobile ─── */
@media (max-width: 600px) {
  #mailto-popup {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }
  .mailto-popup-box {
    width: 100%;
    transform: none;
    border-radius: 20px 20px 0 0;
    padding: 1.8rem 1.4rem calc(1.8rem + env(safe-area-inset-bottom));
    animation: slideUp 0.25s ease;
  }
  .mailto-popup-actions {
    flex-direction: column;
    gap: 10px;
  }
  .mailto-btn-continue,
  .mailto-btn-cancel {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.9rem;
    border-radius: 100px;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ─── FOOTER ─── */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

/* ─── REVEAL ON SCROLL ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .project-featured {
    grid-column: 1 / 3;
    grid-row: auto;
  }
  .project-featured-vertical {
    grid-column: 1 / 3;
    grid-row: auto;
    flex-direction: row; /* image à gauche, texte à droite */
    min-height: 280px;
  }
  .project-vertical-visual {
    border-radius: 22px 0 0 22px;
    border-bottom: none;
    border-right: 1px solid var(--glass-border);
    flex: 1;
    min-height: unset;
  }
  .project-vertical-content {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .project-card:not(.project-featured):not(.project-featured-vertical) {
    grid-row: auto;
  }
}

@media (max-width: 768px) {
  #a_propos .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-visual { max-width: 280px; margin: 0 auto; }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* Proj 01 : image en haut, texte en dessous */
  .project-featured {
    grid-column: 1 / 2;
    grid-template-columns: 1fr;
    grid-template-rows: 220px auto;
  }
  .project-featured-visual {
    border-radius: 22px 22px 0 0;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    min-height: unset;
  }
  .project-featured-content {
    padding: 24px;
  }

  /* Proj 02 : retour en colonne sur mobile */
  .project-featured-vertical {
    grid-column: 1 / 2;
    flex-direction: column;
    min-height: unset;
  }
  .project-vertical-visual {
    border-radius: 22px 22px 0 0;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    min-height: 220px;
    flex: unset;
    height: 220px;
  }
  .project-vertical-content {
    width: 100%;
  }

  .contact-card { padding: 32px 24px; }
  nav { gap: 2px; padding: 8px 12px; }
  nav a { padding: 6px 10px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: -1px; }
  .section-header h2 { font-size: 2rem; }
  .project-featured {
    grid-template-rows: 180px auto;
  }
}

/* ─── NAV RESPONSIVE ─── */

/* Empêche tout retour à la ligne */
nav {
  flex-wrap: nowrap;
  white-space: nowrap;
}

@media (max-width: 600px) {
  nav {
    gap: 0px;
    padding: 7px 10px;
  }

  nav a {
    padding: 5px 9px;
    font-size: 0.72rem;
    letter-spacing: 0;
  }
}

@media (max-width: 380px) {
  nav a {
    padding: 5px 7px;
    font-size: 0.65rem;
  }
}

/* ─── AVIS ────────────────────────────────────────────────── */
#avis {
  flex-direction: column;
  align-items: center;
}

.avis-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Bouton déclencheur ── */
.avis-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 56px;
}

/* ── Popup overlay ── */
#avis-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,8,16,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.avis-popup-box {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 44px 44px 40px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  animation: popupIn 0.28s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.avis-popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}

.avis-popup-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  transform: scale(1.08);
}

/* ── Formulaire (dans popup) ── */
.avis-form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.avis-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.avis-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.avis-field label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.avis-field input,
.avis-field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}

.avis-field input::placeholder,
.avis-field textarea::placeholder {
  color: rgba(240,238,248,0.25);
}

.avis-field input:focus,
.avis-field textarea:focus {
  border-color: rgba(123,97,255,0.5);
  box-shadow: 0 0 0 3px rgba(123,97,255,0.12);
}

.avis-field select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(240,238,248,0.4)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.avis-field select option {
  background: #1a1825;
  color: var(--text);
}

.avis-field select:focus {
  border-color: rgba(123,97,255,0.5);
  box-shadow: 0 0 0 3px rgba(123,97,255,0.12);
}

/* Badge projet dans les cards d'avis */
.avis-card-project {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.65);
  background: linear-gradient(135deg, rgba(123,97,255,0.12) 0%, rgba(123,97,255,0.04) 100%);
  border: 1px solid rgba(123,97,255,0.25);
  border-radius: 9px;
  padding: 5px 13px 5px 10px;
  margin-top: -2px;
}

.avis-card-project::before {
  content: '●';
  font-size: 0.45rem;
  color: rgba(123,97,255,0.9);
  flex-shrink: 0;
  line-height: 1;
}

.avis-card-project--empty {
  visibility: hidden;
  pointer-events: none;
}

/* Compteur de caractères */
.avis-charcount {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin-top: -4px;
}

/* ── Étoiles ── */
.star-rating {
  display: flex;
  gap: 6px;
  padding-top: 4px;
}

.star {
  font-size: 1.9rem;
  color: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
  line-height: 1;
}

.star:hover,
.star.active {
  color: var(--accent3);
  transform: scale(1.15);
}

.star.hover-active {
  color: var(--accent3);
}

/* ── Submit ── */
.avis-submit {
  margin-top: 24px;
  width: 100%;
  text-align: center;
}

/* ── Feedback messages ── */
.avis-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.avis-success {
  background: rgba(6,214,160,0.1);
  border: 1px solid rgba(6,214,160,0.25);
  color: #06D6A0;
}

.avis-error {
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.25);
  color: #FF6B6B;
}

/* ── Grille des avis ── */
.avis-grid {
  width: 100%;
  columns: 3;
  column-gap: 24px;
}

/* ── Carte avis ── */
.avis-card {
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.avis-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avis-card-author {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.avis-card-author--anon {
  color: rgba(240,238,248,0.5);
  font-style: italic;
}

.avis-client-badge {
display:inline-flex;align-items:center;gap:4px;font-size:0.68rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--green);background:rgba(6,214,160,.12);border:1px solid rgba(6,214,160,.3);border-radius:100px;padding:2px 8px;margin-left:6px
}

.avis-card-stars {
  display: flex;
  gap: 3px;
  color: var(--accent3);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.avis-card-stars .star-empty {
  color: rgba(255,255,255,0.15);
}

.avis-card-message {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
  flex: 1;
}

.avis-card-date {
  font-size: 0.72rem;
  color: rgba(240,238,248,0.25);
  letter-spacing: 0.04em;
}

/* ── Empty state ── */
.avis-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
  text-align: center;
}

/* ── Responsive avis ── */
@media (max-width: 900px) {
  .avis-grid { columns: 2; }
}

@media (max-width: 600px) {
  .avis-grid { columns: 1; }
  .avis-form-row { grid-template-columns: 1fr; }
  /* Popup en bottom-sheet sur mobile */
  #avis-popup { align-items: flex-end; padding: 0; }
  .avis-popup-box {
    border-radius: 24px 24px 0 0;
    max-height: 88vh;
    padding: 36px 24px calc(28px + env(safe-area-inset-bottom));
    animation: popupSlideUp 0.28s cubic-bezier(.34,1.26,.64,1) both;
  }
  @keyframes popupSlideUp {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}