/* ==========================================================================
   murad.website — préversion statique
   Palette : crème #F5EFDF, fusain #25251F, terre cuite #C6532D,
             olive #666B4D, ocre #D99D36
   ========================================================================== */

:root {
  --creme: #F5EFDF;
  --creme-fonce: #EBE3CD;
  --fusain: #25251F;
  --terre: #C6532D;          /* couleur de marque : grands titres, décor */
  --terre-texte: #B04A26;    /* nuance assombrie : petits textes et boutons (contraste AA) */
  --terre-sombre: #93391A;   /* survol / actif */
  --olive: #666B4D;
  --olive-texte: #585C42;
  --ocre: #D99D36;

  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4rem, 9vw, 8rem);
  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 72px;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--creme);
  color: var(--fusain);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }
h2 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); }
h3 { font-size: clamp(1.45rem, 1.3rem + 0.5vw, 1.75rem); margin-bottom: 0.5rem; }

p { margin: 0 0 1rem; }

a { color: inherit; }

ul { margin: 0; padding: 0; list-style: none; }

figure { margin: 0; }

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

:focus-visible {
  outline: 3px solid var(--fusain);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-space); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terre-texte);
  margin-bottom: 1.25rem;
}

/* ---------- Accessibilité ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--fusain);
  color: var(--creme);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

main:focus { outline: none; }

/* ---------- Bandeau préversion ---------- */

.preview-banner {
  background: var(--fusain);
  color: var(--creme);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.45rem var(--gutter);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--terre-texte);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary { background: var(--terre-texte); color: var(--creme); }
.btn-primary:hover { background: var(--terre-sombre); border-color: var(--terre-sombre); }

.btn-secondary { background: transparent; color: var(--terre-texte); }
.btn-secondary:hover { background: var(--terre-texte); color: var(--creme); }

.btn-arrow { font-size: 0.9em; }

.btn-disabled,
.btn-disabled:hover {
  background: #d9cfb8;
  border-color: #d9cfb8;
  color: #4a4a40;
  cursor: not-allowed;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 223, 0.96);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header.is-scrolled { border-bottom-color: rgba(37, 37, 31, 0.12); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex: 1;
  justify-content: space-between;
  margin-left: 4rem;
}

.nav-list { display: flex; gap: 2.5rem; margin-inline: auto; }

.nav-list a {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 0.95rem;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .2s ease;
}
.nav-list a:hover { background-size: 100% 2px; }

/* Sur grand écran, le bouton « Parlons de votre projet » fait office de lien Contact. */
.nav-contact-text { display: none; }

.nav-cta { min-height: 44px; padding-block: 0.55rem; font-size: 0.9rem; }

.menu-toggle { display: none; }

/* ---------- Héros ---------- */

.hero { padding-top: clamp(3rem, 6vw, 5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 484px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.lead { max-width: 36em; }

/* Illustration crayonnée carrée : affichée entière (pas de rognage), sans fond ni cadre ajoutés.
   Le papier de l'image (#F9F2E2) est très proche du fond de page ; l'arrondi adoucit sa bordure. */
.hero-visual {
  width: 100%;
  max-width: 484px;
  justify-self: end;
}
.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* ---------- Showreel ---------- */

.showreel-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--fusain);
  aspect-ratio: 16 / 9;
  container-type: inline-size; /* l'habillage se dimensionne sur la largeur du lecteur (unités cqi) */
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; background: var(--fusain); }

/* Habillage de la miniature : bouton plein cadre, texte à droite dans la zone brun sombre du fond.
   Le portrait crayonné occupe la moitié gauche et reste dégagé. */
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.75rem, 4.5cqi, 2.25rem);
  width: 100%;
  border: 0;
  padding: 0 7cqi 3cqi 55cqi;
  /* Léger voile fusain à droite pour la lisibilité ; la gauche (portrait) reste intacte. */
  background: linear-gradient(to right, rgba(37, 37, 31, 0) 42%, rgba(37, 37, 31, 0.38) 70%, rgba(37, 37, 31, 0.5) 100%);
  color: var(--creme);
  font-family: var(--font-serif);
  text-align: left;
  text-shadow: 0 1px 12px rgba(20, 16, 10, 0.55);
  cursor: pointer;
}
.video-play[hidden] { display: none; }
.video-play:focus-visible { outline: 4px solid var(--ocre); outline-offset: -8px; border-radius: var(--radius); }

.poster-titling { display: flex; flex-direction: column; }

.poster-name {
  font-size: max(0.7rem, 2.1cqi);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.2;
}
/* Seul ornement : un filet ocre court entre le nom et le titre. */
.poster-name::after {
  content: "";
  display: block;
  width: 2.2em;
  height: 1px;
  margin: 0.9em 0 0.7em;
  background: var(--ocre);
}

.poster-title {
  font-size: max(1.6rem, 8cqi);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}

.poster-cta {
  display: inline-flex;
  align-items: center;
  gap: max(0.6rem, 1.8cqi);
  font-family: var(--font-sans);
  font-size: max(0.8rem, 2.3cqi);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* Icône play claire : cercle ivoire fin, triangle ivoire. */
.video-play-icon {
  position: relative;
  flex: none;
  width: max(40px, 7.5cqi);
  aspect-ratio: 1;
  border: 1.5px solid var(--creme);
  border-radius: 50%;
  transition: background-color .2s ease;
}
.video-play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: max(7px, 1.3cqi) 0 max(7px, 1.3cqi) max(11px, 2.1cqi);
  border-color: transparent transparent transparent var(--creme);
  transition: border-color .2s ease;
}
.video-play:hover .video-play-icon,
.video-play:focus-visible .video-play-icon { background: var(--creme); }
.video-play:hover .video-play-icon::after,
.video-play:focus-visible .video-play-icon::after { border-left-color: var(--fusain); }
.video-play-label {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition: text-decoration-color .2s ease;
}
.video-play:hover .video-play-label { text-decoration-color: var(--ocre); }
.poster-name,
.nowrap { white-space: nowrap; }

/* Lecteur étroit (petits téléphones) : habillage resserré, portrait toujours visible à gauche. */
@container (max-width: 340px) {
  .video-play { gap: 0.55rem; padding: 0 4cqi 0 50cqi; }
  .poster-name { font-size: 0.62rem; letter-spacing: 0.16em; }
  .poster-name::after { margin: 0.6em 0 0.45em; }
  .poster-title { font-size: 1.4rem; }
  .poster-cta { gap: 0.45rem; font-size: 0.74rem; }
  .video-play-icon { width: 32px; }
  .video-play-icon::after { border-width: 6px 0 6px 10px; }
}

/* ---------- Prestations ---------- */

.services-title { max-width: 16em; }
.services-intro { max-width: 40em; margin-bottom: 3rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-bottom: 2.5rem;
}

.card {
  border: 1.5px solid var(--olive);
  border-radius: var(--radius-sm);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.98rem;
}
.card p:last-child { margin-bottom: 0; }

.card-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terre-texte);
  margin-bottom: 1.25rem;
}

.card-tagline {
  color: var(--terre-texte);
  font-weight: 600;
}

.services-note { color: var(--olive-texte); }
.services-quote { color: var(--terre-texte); font-weight: 700; margin: 0; }

/* ---------- Derrière l'atelier ---------- */

.about { background: var(--olive); color: var(--creme); }
.about .eyebrow { color: var(--creme); }

.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
/* Le portrait passe à gauche sur grand écran, mais reste après le texte dans le DOM. */
.about-portrait { grid-column: 1; grid-row: 1; }
.about-text { grid-column: 2; grid-row: 1; }

.about-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.about-text h2 { max-width: 13em; }
.about-text p { max-width: 38em; }

.about :focus-visible { outline-color: var(--creme); }

.verbs {
  margin-top: 1.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.contact-text p { max-width: 30em; }

.todo { margin-top: 1.5rem; color: var(--olive-texte); font-size: 0.95rem; }

.todo-tag {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  font-size: 0.8em;
  font-style: italic;
  white-space: nowrap;
}

.contact-form {
  border: 1.5px solid var(--ocre);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.form-notice {
  background: #fff7e3;
  border-left: 4px solid var(--ocre);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}
.form-notice strong { display: block; }

.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #7b7d67;
  border-radius: 10px;
  background: #fffbf0;
  color: var(--fusain);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 130px; }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--terre-texte);
  outline-offset: 1px;
  border-color: var(--terre-texte);
}

.form-status { margin: 1rem 0 0; font-size: 0.92rem; font-weight: 600; color: var(--terre-sombre); }
.form-status:empty { display: none; }

/* ---------- Pied de page ---------- */

.site-footer {
  background: var(--fusain);
  color: var(--creme);
  padding-block: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.footer-tagline { font-size: 0.92rem; margin: 0; opacity: 0.9; }

.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.9rem; }
.link-pending { display: inline-flex; align-items: center; gap: 0.4rem; }
.site-footer .todo-tag { opacity: 0.85; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero-grid,
  .showreel-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero-visual { justify-self: start; }

  .cards { grid-template-columns: 1fr; max-width: 640px; }

  /* Mobile : le portrait apparaît après le texte. */
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait,
  .about-text { grid-column: 1; grid-row: auto; }
  .about-portrait { max-width: 480px; }

  .verbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6rem;
    padding: 1.25rem 1.5rem;
    border: 1.5px solid rgba(245, 239, 223, 0.5);
    border-radius: var(--radius-sm);
  }
  .verbs li:not(:last-child)::after { content: " ·"; }
}

/* Menu mobile (actif uniquement si JavaScript est disponible) */
@media (max-width: 820px) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--fusain);
    border-radius: 999px;
    background: transparent;
    color: var(--fusain);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }

  .menu-toggle-icon,
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .menu-toggle-icon { position: relative; }
  .menu-toggle-icon::before,
  .menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-icon::before { top: -6px; }
  .menu-toggle-icon::after { top: 6px; }

  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

  .header-inner { flex-wrap: wrap; }

  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin: 0;
    padding-bottom: 1.25rem;
  }
  .js .site-nav:not(.is-open) { display: none; }

  .nav-list { flex-direction: column; gap: 0; margin: 0; }
  .nav-list li { border-top: 1px solid rgba(37, 37, 31, 0.15); }
  .nav-list a { display: block; padding: 0.9rem 0; font-size: 1.1rem; background-image: none; }
  .nav-contact-text { display: list-item; }

  .nav-cta { align-self: flex-start; }
}

/* Sans JavaScript : navigation simplement affichée sous le nom */
@media (max-width: 820px) {
  html:not(.js) .site-nav { display: flex; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .preview-banner { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .btn, .card, .contact-form { border: 2px solid CanvasText; }
  .video-play-icon { forced-color-adjust: none; }
}
