/* =========================================================================
   Romain Perrollaz — Private Chef
   Feuille de style principale
   ========================================================================= */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Aleo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/aleo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Aleo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/aleo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ tokens */
:root {
  /* Identité ---------------------------------------------------------- */
  --red:        #9f2e2a;
  --red-deep:   #8a2724;
  --ink:        #000000;
  --paper:      #ffffff;

  /* Familles ---------------------------------------------------------- */
  /* ⚠️  NOM / PRÉNOM : la spec demande Aleo 500 ; la maquette fournie est,
     elle, composée en Montserrat 200 (mesuré au pixel sur maquetteSite.jpg).
     La famille est isolée ici pour basculer en une seule ligne.
       • Aleo (livré)      : --font-name: 'Aleo', 'Times New Roman', serif;
                             + .masthead__name { font-size:.97em; line-height:1.216 }
       • Montserrat 200    : --font-name: var(--font-ui);
                             + .masthead__name { font-weight:200; font-size:1em;
                                                 line-height:1.18; letter-spacing:-.01em }
     Voir apercu-typographie.html pour le comparatif visuel. */
  --font-ui:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-name:  'Aleo', 'Times New Roman', Georgia, serif;

  /* Rythme horizontal — ratios relevés sur la maquette (base 2656 px) */
  --pad-logo:   1.883vw;   /*  50 / 2656 */
  --pad-band:   3.840vw;   /* 102 / 2656 */
  --gap-logo:   2.673vw;   /*  71 / 2656 */
  --gap-tiles:  1.506vw;   /*  40 / 2656 */

  /* Rythme vertical — ratios relevés sur la maquette (base 1493 px) */
  --h-masthead: 16.14dvh;
  --h-band:     16.95dvh;
  --gap-band:    2.41dvh;

  /* Typographie */
  --fs-title:   clamp(1.375rem, 2.276vw, 4.1rem);   /* 60.5 / 2656 */
  --fs-band:    clamp(0.875rem, 1.318vw, 2.4rem);   /*   35 / 2656 */

  --ease:       cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* hauteur ferme : la galerie absorbe l'espace restant et la page tient
     exactement dans l'écran, comme la maquette 16/9. */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 500;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

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

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.u-caps  { text-transform: uppercase; }
.u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* =================================================================== HEADER */
.masthead {
  flex: 0 0 auto;
  min-height: var(--h-masthead);
  display: flex;
  align-items: center;
  gap: var(--gap-logo);
  padding: 1.6dvh var(--pad-band) 1.6dvh var(--pad-logo);
}

.masthead__logo {
  flex: 0 0 auto;
  width: 10.504vw;          /* 279 / 2656 */
  min-width: 104px;
  max-width: 300px;
  height: auto;
}

.masthead__title {
  margin: 0;
  font-size: var(--fs-title);
  line-height: 1.18;        /* 72 / 61 */
  display: flex;
  flex-direction: column;
}

.masthead__name {
  font-family: var(--font-name);
  font-weight: 500;
  font-size: .97em;         /* aligne la hauteur d'œil d'Aleo sur Montserrat */
  line-height: 1.216;       /* interligne identique à la ligne « private chef » */
  letter-spacing: 0;
  color: var(--ink);
}

.masthead__role {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -.02em;   /* approche resserrée, relevée sur la maquette */
  color: var(--red);
}

/* ================================================================== GALERIE */
.gallery {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-tiles);
  margin-bottom: var(--gap-band);
}

.tile--dessert  { --tile-bg: #a58d74; --delay: 120ms; }
.tile--portrait { --tile-bg: #b1b1b1; --delay: 200ms; }
.tile--agneau   { --tile-bg: #9d896b; --delay: 280ms; }
.contact        { --delay: 380ms; }

.tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--tile-bg, #e8e4e0);
  min-height: 0;
}

.tile picture {
  display: block;
  width: 100%;
  height: 100%;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.001);
  transition: transform 1.1s var(--ease);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.045); }
}

/* ============================================================ BANDEAU CONTACT */
.contact {
  position: relative;
  flex: 0 0 auto;
  min-height: var(--h-band);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.0dvh;                              /* interstice minimal */
  padding: 1.9dvh var(--pad-band) 3.9dvh;   /* 28 / 58 sur 1493 */
  background: var(--red);
  color: #fff;
  font-size: var(--fs-band);
  line-height: 1.171;                       /* 41 / 35 */
}

.contact__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;          /* Instagram cale sur la ligne de l'e-mail */
  justify-content: space-between;
  column-gap: 2em;
  row-gap: .85em;
}

.contact__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
  letter-spacing: 0;
}

.contact__foot {
  display: flex;
  flex-wrap: wrap;              /* l'Instagram passe dessous s'il manque de place */
  align-items: baseline;
  justify-content: space-between;
  column-gap: 2em;
  row-gap: .85em;
}

.contact__place {
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;          /* la ligne de lieu ne se coupe jamais */
  margin: 0;
}

/* Lien : soulignement qui se déploie */
.link {
  position: relative;
  display: inline-block;
}
.link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -.05em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.link:hover::after,
.link:focus-visible::after { transform: scaleX(1); }

.contact__insta {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-weight: 200;
  letter-spacing: 0;
  white-space: nowrap;
}
.contact__insta svg {
  width: .95em;
  height: .95em;
  flex: 0 0 auto;
  transform: translateY(.02em);
}

/* ------------------------------------------------- mentions légales */
.contact__legal {
  font-size: clamp(10px, .62vw, 15px);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  opacity: .55;
  transition: opacity .3s var(--ease);
}
.contact__legal:hover,
.contact__legal:focus-visible { opacity: 1; }

/* ================================================================ ANIMATION
   Apparition en fondu montant, pilotée uniquement par CSS : si l'animation
   n'est pas jouée (vieux navigateur, moteur d'indexation, impression),
   le contenu reste visible par défaut. Aucun risque de page blanche. */
@keyframes rp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes rp-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rp-rise .9s var(--ease) both;
    animation-delay: var(--delay, 0ms);
  }
  /* Le bandeau est collé au bas de l'écran : un décalage vertical y ferait
     apparaître une barre de défilement le temps de l'animation. Fondu seul. */
  .contact.reveal { animation-name: rp-fade; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img, .link::after { transition: none; }
}

/* ============================================================== RESPONSIVE
   Une seule et même composition à toutes les tailles : logo + titre sur une
   ligne, trois colonnes pleine largeur, bandeau contact. Seules les
   proportions changent. La page tient dans un écran, sans défilement.
   ========================================================================= */

/* --- Écrans intermédiaires --- */
@media (max-width: 1180px) {
  :root {
    --fs-title: clamp(1.25rem, 2.6vw, 2.4rem);
    --fs-band:  clamp(0.8rem, 1.6vw, 1.35rem);
    --pad-logo: 2.6vw;
    --pad-band: 4.2vw;
  }
  .masthead__logo { width: 12vw; min-width: 92px; }
}

/* --- Tablettes et mobiles : la composition est conservée, réduite --- */
@media (max-width: 860px) {
  :root {
    --pad-logo:   4.5vw;
    --pad-band:   4.5vw;
    --gap-logo:   3.2vw;
    --gap-tiles:  1.5vw;
    --fs-title:   clamp(1rem, 5.6vw, 2rem);
    --fs-band:    clamp(0.72rem, 3.6vw, 1.25rem);
    --h-masthead: 11dvh;
    --h-band:     15dvh;
    --gap-band:    2.2dvh;
  }

  .masthead {
    padding: 1.4dvh var(--pad-band) 1.4dvh var(--pad-logo);
  }
  .masthead__logo {
    width: 15vw;
    min-width: 0;
    max-width: 90px;
  }

  .contact { padding: 2.4dvh var(--pad-band) 3.2dvh; }

  /* La ligne e-mail + Instagram ne tient plus côte à côte : on empile. */
  .contact__top {
    flex-direction: column;
    align-items: flex-start;
    gap: .85em;
  }
}

/* --- Sous 640 px : lieu et Instagram passent l'un sous l'autre --- */
@media (max-width: 640px) {
  .contact__foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact__insta {
    white-space: normal;
    align-items: flex-start;        /* le pictogramme cale sur la 1re ligne */
  }
  .contact__insta svg { margin-top: .18em; }
  .contact__legal { font-size: 10px; }
}

/* --- Très petits écrans --- */
@media (max-width: 360px) {
  :root { --fs-title: 1rem; --fs-band: 0.72rem; --pad-band: 4vw; --pad-logo: 4vw; }
}

/* --- Écran court (mobile paysage, netbook) : en-tête et bandeau se calent
       sur leur contenu, la galerie prend ce qui reste. --- */
@media (max-height: 620px) {
  :root { --h-masthead: 0px; --h-band: 0px; }
  .masthead { padding-block: 1.8dvh; }
  .gallery  { min-height: 130px; }
  .contact  { padding-block: 2.2dvh 2.8dvh; }
}

/* ------------------------------------------------------------------ print */
@media print {
  body { min-height: 0; }
  .contact { background: #fff !important; color: #000 !important;
             border-top: 2px solid var(--red); -webkit-print-color-adjust: exact; }
  .masthead__role { color: var(--red) !important; }
}

/* =========================================================================
   PAGE MENTIONS LÉGALES
   Document lisible : on annule la mise en page « une seule fenêtre ».
   ========================================================================= */
body.legal {
  height: auto;
  min-height: 100dvh;
  display: block;
  font-size: 16px;
  line-height: 1.65;
}

.legal__wrap {
  max-width: 68ch;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 6vw, 48px) 0;
}

.legal__head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid #e6dedb;
}
.legal__logo { width: 76px; height: auto; flex: 0 0 auto; }
.legal__id { display: flex; flex-direction: column; line-height: 1.3 }
.legal__name { font-family: var(--font-name); font-weight: 500; font-size: 15px; }
.legal__role { font-weight: 700; font-size: 14px; letter-spacing: -.01em; color: var(--red); text-transform: uppercase; }

.legal h1 {
  font-family: var(--font-name);
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: clamp(28px, 5vw, 48px) 0 6px;
}
.legal__intro { margin: 0 0 clamp(28px, 4vw, 44px); color: #6e6360; font-size: 15px; }

.legal section { margin-bottom: clamp(26px, 4vw, 38px); }
.legal h2 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 10px;
}
.legal p { margin: 0 0 10px; }
.legal p:last-child { margin-bottom: 0; }
.legal ul { margin: 0 0 10px; padding-left: 18px; }
.legal li { margin-bottom: 4px; }
.legal a { color: var(--red); border-bottom: 1px solid transparent; }
.legal a:hover, .legal a:focus-visible { border-bottom-color: var(--red); }
.legal strong { font-weight: 600; }

.legal__date { color: #9b908c; font-size: 13.5px; }

.legal__foot {
  margin-top: clamp(40px, 7vw, 72px);
  background: var(--red);
  color: #fff;
}
.legal__foot-in {
  max-width: 68ch;
  margin: 0 auto;
  padding: 22px clamp(20px, 6vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: baseline;
  font-size: 14px;
}
.legal__foot a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.4); }
.legal__foot a:hover { border-bottom-color: #fff; }
.legal__foot-sep { opacity: .5; }

/* ------------------------------------------------------------ page 404 */
body.notfound {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 6vw;
}
.notfound__in { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 44ch; }
.notfound__logo { width: 96px; height: auto; margin-bottom: 10px; }
.notfound__code {
  margin: 0; font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--red);
}
body.notfound h1 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.2rem); }
.notfound__lede { margin: 0; color: #6e6360; }
.notfound__back { margin: 14px 0 0; }
.notfound__back a {
  display: inline-block; padding: 11px 26px;
  background: var(--red); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 2px; border: 0;
}
.notfound__back a:hover { background: var(--red-deep); border-bottom-color: transparent; }
