/* ============================================================
   Mise en page responsive et habillage commun
   ============================================================ */

html {
  overflow-x: hidden;
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img,
video,
iframe {
  max-width: 100%;
}

.container {
  width: min(100%, var(--max-width));
  padding-inline: clamp(16px, 4vw, 32px);
}

.hero {
  height: min(100svh, 900px);
  min-height: 560px;
}

.hero-text {
  width: min(900px, calc(100% - 32px));
}

.hero-text h1,
.hero-text h2 {
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.hero-text p {
  max-width: 100%;
  width: auto;
  white-space: normal;
  overflow: visible;
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
}

.section.white-section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.reflow,
.portfolio .section-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.portfolio .section-row {
  display: grid;
  align-items: stretch;
}

.portfolio .section-row > *,
.reflow > * {
  min-width: 0;
}

.portfolio .image-block {
  display: flex;
  min-height: 280px;
}

.portfolio .image-block img,
.portfolio .image-block video {
  width: 100%;
  min-height: 280px;
  object-fit: cover;
}

.portfolio .section-row.reverse .image-block {
  order: 2;
}

.portfolio .section-row.reverse .text-block {
  order: 1;
}

.text-block,
.portfolio .text-block {
  overflow-wrap: anywhere;
}

.featured-grid {
  justify-content: flex-start;
}

.featured .item,
.youtube-card {
  width: min(550px, calc(100vw - 3rem));
}

.featured .item {
  flex-basis: min(550px, calc(100vw - 3rem));
}

.site-footer {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Fond cinématographique de la page « Qui suis-je ? » et des blocs associés. */
.photo-carousel-section,
.about-page .section.white-section.portfolio {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 0%, rgba(202, 167, 106, 0.22), transparent 48%),
    linear-gradient(135deg, rgba(8, 8, 8, 0.96), rgba(36, 28, 18, 0.94)),
    url("img_ressources/film-grain-texture.webp") center / cover fixed;
}

.photo-carousel-section::before,
.about-page .section.white-section.portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
  pointer-events: none;
  z-index: -1;
}

.photo-carousel-section > *,
.about-page .section.white-section.portfolio > * {
  position: relative;
  z-index: 1;
}

.photo-carousel-section {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.photo-carousel-section h2 {
  color: #f5e4b1;
}

.photo-carousel-section .carousel {
  padding: clamp(8px, 1.5vw, 16px);
  border: 1px solid rgba(202, 167, 106, 0.48);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4), 0 0 45px rgba(202, 167, 106, 0.12);
}

.photo-carousel-section .carousel-track img {
  display: block;
  height: clamp(260px, 52vw, 500px);
  border-radius: 14px;
}

.photo-carousel-section .carousel-btn {
  width: clamp(40px, 6vw, 56px);
  height: clamp(40px, 6vw, 56px);
  padding: 0;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(245, 228, 177, 0.5);
  line-height: 1;
}

/* Livre d’or : rendu plus lisible et réellement fluide sur petit écran. */
.guestbook-section {
  position: relative;
  min-height: auto;
  padding: calc(72px + clamp(3rem, 8vw, 7rem)) clamp(16px, 4vw, 32px) clamp(5rem, 10vw, 9rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(202, 167, 106, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(8, 8, 8, 0.96), rgba(45, 34, 21, 0.96)),
    url("img_ressources/film-grain-texture.webp") center / cover fixed;
}

.book {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(100%, 1120px);
  min-height: 0;
  transform: none;
  border: 1px solid rgba(202, 167, 106, 0.38);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42), 0 0 55px rgba(202, 167, 106, 0.12);
}

.page {
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
}

.page h1,

.page h2 {
  color: #b9935a;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 73, 39, 0.25);
  font-size: 1rem;
}

.guestbook-form textarea {
  min-height: 150px;
  resize: vertical;
}

.guestbook-form button {
  align-self: flex-start;
  padding: 13px 24px;
  background: linear-gradient(135deg, #c8a96b, #f5e4b1, #b58a44);
  color: #17120c;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.message {
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.78);
  border-left-color: #b58a44;
}

.message strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #3f2d1b;
}

.message p {
  white-space: pre-line;
}

.messages-empty {
  padding: 1rem;
  color: #6d6254;
  font-style: italic;
}

.form-status {
  min-height: 1.5em;
  margin-top: 1rem;
  color: #6d6254;
}

.form-status.success {
  color: #5f7d52;
}

.form-status.error {
  color: #9a4e3d;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .main-nav {
    width: min(88vw, 380px);
  }

  .has-dropdown .dropdown {
    position: static;
    width: min(100%, 300px);
    min-width: 0;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  .reflow,
  .portfolio .section-row,
  .portfolio .section-row.reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio .section-row.reverse .image-block,
  .portfolio .section-row.reverse .text-block {
    order: initial;
  }

  .portfolio .text-block,
  .section.white-section.portfolio .text-block {
    padding: clamp(1.4rem, 5vw, 2.5rem);
  }

  .portfolio .image-block,
  .portfolio .image-block img,
  .portfolio .image-block video {
    min-height: clamp(240px, 58vw, 420px);
  }

  .book {
    grid-template-columns: minmax(0, 1fr);
  }

  .book::before {
    display: none;
  }

  .left-page {
    border-right: none;
    border-bottom: 1px solid rgba(99, 73, 39, 0.2);
  }

  .site-footer {
    position: static;
    margin-top: 2rem;
  }

  body,
  body.portrait-page {
    padding-bottom: 0;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 500px;
  }

  .hero-text h1,
  .hero-text h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-text p {
    letter-spacing: 1px;
    line-height: 1.5;
  }

  .featured {
    padding-block: 5rem;
  }

  .featured .item,
  .youtube-card {
    width: calc(100vw - 2.5rem);
  }

  .featured .item {
    flex-basis: calc(100vw - 2.5rem);
  }

  .photo-carousel-section .carousel-btn {
    font-size: 1.45rem;
  }

  .guestbook-section {
    padding-inline: 12px;
  }

  .page {
    padding: 22px 18px;
  }

  .guestbook-form button {
    width: 100%;
  }
}

/* Finition commune : navigation plus lisible et plus discrète. */
.site-header {
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.94), rgba(6, 6, 6, 0.78));
  border-bottom: 1px solid rgba(202, 167, 106, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3));
}

.nav-list {
  gap: clamp(12px, 1.8vw, 24px);
}

.nav-list a,
.nav-list button,
.nav-list .drop-toggle {
  font-family: 'Playfair Display', serif;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.2;
  padding: 8px 0 9px;
  color: var(--gold-soft);
  background: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.dropdown a {
  font-family: 'Playfair Display', serif;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.nav-list a:not(.cta)::after,
.nav-list button::after {
  bottom: 1px;
  height: 1px;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-list a:not(.cta):hover::after,
.nav-list button:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-list a.cta {
  border-radius: 999px;
  padding: 10px 16px;
  color: #080705;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(202, 167, 106, 0.2);
  -webkit-text-fill-color: #080705;
}

.nav-list a.cta::after {
  display: none;
}

.nav-list a.cta:hover {
  color: #080705;
  background: var(--gold-soft);
  box-shadow: 0 10px 26px rgba(202, 167, 106, 0.32);
}

.home-page #about.section.white-section {
  padding-block: clamp(5rem, 9vw, 9rem);
  margin-bottom: 0;
}

.home-page #about .container.two-col.align-center.reflow {
  width: min(100% - 32px, 1100px);
  padding: clamp(1.25rem, 4vw, 3.25rem);
  border-left-width: 3px;
  box-shadow: 0 18px 50px rgba(48, 35, 18, 0.12);
}

.home-page .section.white-section.portfolio {
  padding-block: clamp(5rem, 9vw, 8rem);
}

.home-page .section.white-section.portfolio .section-row {
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.home-page .section.white-section.portfolio .text-block:hover,
.home-page .section.white-section.portfolio .image-block:hover {
  box-shadow: 0 14px 36px rgba(70, 48, 18, 0.16);
  transform: translateY(-3px);
}

/* Accueil : grille vidéo centrée et hiérarchie visuelle plus professionnelle. */
.home-page .hero {
  height: min(100svh, 860px);
  min-height: 600px;
  background: #090909;
  isolation: isolate;
}

.home-page .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.68)),
    radial-gradient(circle at 50% 45%, transparent 0 24%, rgba(0, 0, 0, 0.38) 100%);
}

.home-page .hero-text {
  z-index: 2;
  width: min(900px, calc(100% - 32px));
  padding: clamp(24px, 5vw, 64px);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

.home-page .hero-text h1 {
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: clamp(0.04em, 1vw, 0.14em);
  opacity: 1;
  animation: homeHeroIn 1s ease-out both;
}

.home-page .hero-text p {
  max-width: 700px;
  margin: 1.4rem auto 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: clamp(0.12em, 0.5vw, 0.24em);
  opacity: 1;
  animation: homeHeroIn 1s 0.15s ease-out both;
}

@keyframes homeHeroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-page .featured {
  width: 100%;
  margin-left: 0;
  transform: none;
  padding-block: clamp(5rem, 9vw, 8rem);
  background:
    linear-gradient(135deg, rgba(7, 7, 7, 0.94), rgba(44, 32, 19, 0.96)),
    url("img_ressources/bgbandedemo.webp") center / cover;
  background-attachment: scroll;
}

.home-page .featured .container {
  width: min(100%, var(--max-width));
  max-width: var(--max-width);
  padding-inline: clamp(16px, 4vw, 32px);
}

.home-page .featured h2 {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: clamp(0.04em, 0.5vw, 0.1em);
}

.home-page .featured h2::after {
  position: static;
  display: block;
  width: 72px;
  height: 2px;
  margin: 1.25rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: none;
}

.home-page .featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: stretch;
  overflow: visible;
  padding: 0;
}

.home-page .featured .item,
.home-page .youtube-card {
  width: 100%;
  min-width: 0;
}

.home-page .featured .item {
  padding: 0;
  border-radius: 18px;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.home-page .featured .item:hover {
  transform: translateY(-6px);
  filter: brightness(1.08);
}

.home-page .youtube-card {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(202, 167, 106, 0.38);
  border-radius: 18px;
  background: #050505;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 28px rgba(202, 167, 106, 0.08);
}

.home-page .youtube-card iframe {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 1100px) {
  .home-page .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
    margin-inline: auto;
  }
}

@media (max-width: 700px) {
  .home-page .hero {
    min-height: 520px;
  }

  .home-page .featured-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 64px;
  }

  .logo img {
    height: 34px;
  }

  .main-nav {
    background: rgba(5, 5, 5, 0.98);
    border-left: 1px solid rgba(202, 167, 106, 0.2);
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
  }

  .nav-list {
    gap: 1.35rem;
  }

  .nav-list a,
  .nav-list button {
    font-size: 1rem;
    letter-spacing: 0.14em;
    padding: 5px 0 7px;
  }

  .nav-list a.cta {
    padding: 10px 18px;
  }
}

/* V4.1 : direction plus éditoriale, avec des effets plus mesurés. */
html {
  scroll-padding-top: 84px;
}

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 4px;
}

.site-header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-list a,
.nav-list button,
.nav-list .drop-toggle {
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.site-footer {
  background: linear-gradient(180deg, rgba(7, 7, 7, 0.86), rgba(2, 2, 2, 0.96));
  border-top: 1px solid rgba(202, 167, 106, 0.16);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.18);
}

.home-page .hero-text {
  text-shadow: 0 7px 28px rgba(0, 0, 0, 0.72);
}

.home-page .hero-text h1,
.home-page .hero-text p {
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.home-page #about .container.two-col.align-center.reflow:hover {
  transform: none;
  box-shadow: 0 18px 50px rgba(48, 35, 18, 0.14);
}

.home-page .featured .item {
  border-radius: 14px;
}

.home-page .featured .item:hover {
  transform: translateY(-4px);
  filter: none;
}

.home-page .youtube-card {
  border-radius: 14px;
  border-color: rgba(202, 167, 106, 0.32);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.home-page .section.white-section.portfolio .text-block:hover,
.home-page .section.white-section.portfolio .image-block:hover {
  box-shadow: 0 14px 36px rgba(70, 48, 18, 0.16);
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
