:root {
  --noir: #0d1217;
  --noir-2: #141b22;
  --os: #efece6;
  --gris: #a3abb2;
  --vert: #7f9a92;
  --trait: rgba(239, 236, 230, .16);
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --marge: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--noir);
  color: var(--os);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--vert); outline-offset: 4px; border-radius: 3px; }

/* =====================================================
   Éléments communs à toutes les pages : photo de fond, en-tête, menu
   ===================================================== */
.fond { position: absolute; inset: 0; background: var(--noir-2); }
.fond img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; display: block; }

.tete, .hero-titre { position: relative; z-index: 2; text-shadow: 0 1px 14px rgba(13, 18, 23, .6); }

.menu { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.menu a { text-decoration: none; transition: opacity .2s; }
.menu a:hover { text-decoration: underline; text-underline-offset: 6px; }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menu--hero {
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem clamp(1.25rem, 3.5vw, 2.5rem);
  margin-top: clamp(1.5rem, 4svh, 2.5rem);
}
.menu--hero a { font-size: clamp(1rem, 1.3vw, 1.125rem); font-weight: 500; padding-block: .25rem; }

/* =====================================================
   Accueil : un seul écran
   ===================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(2.5rem, 8svh, 5.5rem) var(--marge) 3rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(13, 18, 23, .92) 0%, rgba(13, 18, 23, .78) 22%, rgba(13, 18, 23, .4) 40%, rgba(13, 18, 23, 0) 56%),
    linear-gradient(to top, rgba(13, 18, 23, .7) 0%, rgba(13, 18, 23, 0) 22%);
}
.hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1;
  letter-spacing: -.03em;
}
.role { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.pied-hero { position: absolute; z-index: 2; left: 0; right: 0; bottom: 1.25rem; margin: 0; text-align: center; font-size: .85rem; }

/* =====================================================
   Pages intérieures : même photo en fond, même en-tête, contenu dans un cadre
   ===================================================== */
.fond--fixe { position: fixed; z-index: -1; }
.fond--fixe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 18, 23, .86) 0%, rgba(13, 18, 23, .72) 100%);
}

.scene {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 8svh, 5.5rem) var(--marge) 1.5rem;
}
.tete { text-align: center; }
.marque {
  display: block;
  margin-bottom: .5rem;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1;
  letter-spacing: -.03em;
  text-decoration: none;
}

.panneau {
  width: 100%;
  max-width: 62rem;
  margin-top: clamp(2rem, 5svh, 3rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgba(13, 18, 23, .6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(239, 236, 230, .22);
  border-radius: 14px;
}
.panneau--large { max-width: 76rem; }
.panneau--etroit { max-width: 40rem; }
.pied-page { margin: auto 0 0; padding-top: 2.5rem; text-align: center; font-size: .85rem; }
.pied-hero, .pied-page { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }
.pied-hero > *, .pied-page > * { opacity: .7; }
.pied-hero a, .pied-page a { text-decoration: none; }
.pied-hero a:hover, .pied-page a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mentions légales ---------- */
.legal h2 { margin: 2rem 0 .5rem; font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 600; letter-spacing: -.01em; }
.legal p { margin: 0 0 1rem; color: #d3dbe1; max-width: 70ch; }
.legal a { text-underline-offset: 3px; }

.panneau h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.05;
  letter-spacing: -.025em;
}
.intro { margin: 0 0 1.25rem; font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; max-width: 42ch; }
.panneau p { max-width: 58ch; }
.corps p { margin: 0 0 1.1rem; color: #d3dbe1; }
.corps .intro { color: var(--os); }
.corps .clients { color: var(--gris); font-size: .95rem; margin-top: 1.5rem; }

/* ---------- À propos ---------- */
.apropos { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .apropos { grid-template-columns: .8fr 1fr; gap: 3.5rem; align-items: center; }
  .apropos.sans-photo { grid-template-columns: 1fr; }
}

/* Carrousel */
.carrousel { position: relative; width: 100%; max-width: 380px; }
.piste {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 8px;
  background: var(--noir-2);
}
.piste::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; margin: 0; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prec, .suiv {
  position: absolute;
  top: calc(50% - 1.5rem);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(239, 236, 230, .5);
  background: rgba(13, 18, 23, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--os);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 .15rem;
  transition: background .2s, color .2s;
}
.prec { left: .75rem; }
.suiv { right: .75rem; }
.prec:hover, .suiv:hover { background: var(--os); color: var(--noir); }
.points { display: flex; justify-content: center; gap: .6rem; margin-top: .9rem; }
.points button {
  width: .7rem; height: .7rem; padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(239, 236, 230, .3);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.points button[aria-selected="true"] { background: var(--os); transform: scale(1.25); }
.carrousel.seule .prec, .carrousel.seule .suiv, .carrousel.seule .points { display: none; }

/* ---------- Boutons ---------- */
.boutons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  overflow-wrap: anywhere;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--os);
  color: var(--os);
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--os); color: var(--noir); }
.btn-plein { background: var(--os); color: var(--noir); }
.btn-plein:hover { background: var(--vert); border-color: var(--vert); }

/* ---------- Portfolio ---------- */
.portfolio-intro { margin: 0 0 clamp(1.5rem, 3.5vw, 2.25rem); color: #d3dbe1; max-width: 52ch; }
.grille { display: grid; gap: 1.75rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grille { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grille { grid-template-columns: repeat(3, 1fr); } }
.carte { display: block; text-decoration: none; }
.carte .media { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--noir-2); }
.carte .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.carte:hover .media img, .carte:focus-visible .media img { transform: scale(1.03); }
.carte h2 { margin: .8rem 0 0; font-size: 1.1rem; font-weight: 500; line-height: 1.35; }
.carte:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.carte .cat { margin: .1rem 0 0; color: var(--gris); font-size: .92rem; }
.etat { margin: 0; color: var(--gris); }
.plus-zone { margin-top: clamp(1.75rem, 4vw, 2.75rem); text-align: center; }
button.btn { font: inherit; font-weight: 600; background: transparent; cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: progress; }
.portfolio-suite { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
@media (prefers-reduced-motion: reduce) { .carte .media img { transition: none; } .carte:hover .media img { transform: none; } }

/* =====================================================
   Mobile
   ===================================================== */
@media (max-width: 720px) {
  /* Menu : simples liens centrés (comme sur ordinateur), avec une zone de toucher confortable */
  .menu--hero { gap: 0 1.5rem; max-width: 22rem; margin-inline: auto; margin-top: 1.25rem; }
  .menu--hero a { padding-block: .7rem; font-size: 1.05rem; }

  .panneau { padding: 1.25rem; border-radius: 12px; }
  .boutons .btn { flex: 1 1 100%; text-align: center; min-height: 48px; }
  .plus-zone .btn { width: 100%; min-height: 48px; }
}

/* =====================================================
   Menu hamburger (mobile) : le menu s'ouvre en plein écran.
   Sans JavaScript, le bouton n'existe pas et les liens restent affichés normalement.
   ===================================================== */
.burger, .menu-fermer { display: none; }

@media (max-width: 720px) {
  .js .burger {
    display: block;
    position: relative;
    width: 52px;
    height: 48px;
    margin: 1rem auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--os);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .burger span {
    position: absolute;
    left: 14px;
    right: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    box-shadow: 0 1px 8px rgba(13, 18, 23, .7);
    transition: transform .25s ease, opacity .2s ease, top .25s ease;
  }
  .burger span:nth-child(1) { top: 16px; }
  .burger span:nth-child(2) { top: 23px; }
  .burger span:nth-child(3) { top: 30px; }

  /* Croix de fermeture : en haut à droite du menu ouvert */
  .js .menu--hero .menu-fermer {
    display: block;
    position: absolute;
    top: .85rem;
    right: .85rem;
    width: 52px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--os);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-fermer span { position: absolute; left: 14px; right: 14px; top: 23px; height: 2px; border-radius: 2px; background: currentColor; }
  .menu-fermer span:nth-child(1) { transform: rotate(45deg); }
  .menu-fermer span:nth-child(2) { transform: rotate(-45deg); }

  .js .menu--hero {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 4rem 1.5rem;
    background: rgba(13, 18, 23, .95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
  }
  .menu-ouvert .menu--hero { opacity: 1; visibility: visible; transition: opacity .25s ease; }
  .js .menu--hero a {
    padding: .5rem 1rem;
    font-size: clamp(1.7rem, 8vw, 2.3rem);
    font-weight: 600;
    font-stretch: 85%;
    letter-spacing: -.02em;
    text-shadow: none;
  }
  body.menu-ouvert { overflow: hidden; }
  .menu-ouvert .hero-titre, .menu-ouvert .tete { z-index: 25; }   /* le menu passe au-dessus du pied de page */
}

@media (prefers-reduced-motion: reduce) {
  .burger span, .js .menu--hero { transition: none !important; }
}
