:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #333333;
  --line: #e5e5e5;
  /* Proche A24 : NB International → Inter ; NB International Mono → IBM Plex Mono */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Échelle ~+1/3 vs version précédente */
  --shell-width: min(80%, 1680px);
  --header-h: clamp(3.3rem, 6vh, 5.7rem);
  --hero-top: clamp(1.5rem, 4vh, 3.5rem);
  --hero-text-pad: 0;
  --body-gap: clamp(1.1rem, 2.4vh, 2.25rem);
  --brand-size: clamp(1.4rem, 0.97vw + 1vh, 2.15rem);
  --nav-size: clamp(0.87rem, 0.47vw + 0.6vh, 1.35rem);
  --nav-gap: clamp(1.15rem, 2.3vw, 3rem);
  --h1-size: clamp(2.6rem, 4.35vw, 5.4rem);
  --body-size: clamp(1.22rem, 1.05vw, 1.55rem);
  --h2-size: clamp(1.85rem, 1.2vw + 1.2vh, 2.5rem);
  --hero-img-max-h: calc(100svh - var(--header-h) - var(--hero-top) - 1.5rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Conteneur ~80% viewport, plafonné pour très grands écrans */
.shell {
  width: var(--shell-width);
  max-width: 100%;
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: clamp(1.4rem, 1.85vh, 2.1rem);
  height: auto;
}

.brand span {
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--brand-size);
  letter-spacing: -0.02em;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

nav > a,
.nav-drop-toggle {
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--nav-size);
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.25s ease;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

nav > a:hover,
.nav-drop-toggle:hover {
  opacity: 0.45;
}

.nav-drop {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 11.5rem;
  padding: 0.65rem 0.9rem;
  background: #fff;
  z-index: 40;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

/* Pont invisible : la souris peut aller du bouton au sous-menu sans le fermer */
.nav-drop-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.65rem;
  height: 0.65rem;
}

.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu {
  display: flex;
}

.nav-drop-menu a {
  display: block;
  white-space: nowrap;
  font-size: calc(var(--nav-size) * 0.92);
}

/*
  GRILLE : 49% image | 11% gouttière | 40% texte
  Header + hero = 1er écran → « Appels à projets » pile en bas du viewport
*/
.hero {
  display: grid;
  grid-template-columns: 49fr 11fr 40fr;
  align-items: start;
  align-content: start;
  width: 100%;
  margin-top: 0;
  padding-top: var(--hero-top);
  padding-bottom: 1.25rem;
  min-height: calc(100svh - var(--header-h));
  box-sizing: border-box;
}

.hero-image {
  /* Ratio de base ~carré ; largeur plafonnée pour tenir dans la hauteur d’écran */
  aspect-ratio: 1 / 0.95;
  max-height: var(--hero-img-max-h);
  width: min(100%, calc(var(--hero-img-max-h) * 1 / 0.95));
  overflow: hidden;
  background: #f0f0f0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  border-radius: 0;
  transform: scale(1.1);
  transform-origin: center center;
}

.hero-gutter {
  min-width: 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  padding-top: var(--hero-text-pad);
  text-align: left;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.hero-text h1,
.hero-phrase {
  margin: 0;
  padding: 0;
  line-height: 0;
  width: 100%;
  overflow: visible;
}

.hero-phrase-svg {
  display: block;
  /* <<< TAILLE PHRASE : change UNIQUEMENT cette ligne (ex. 100% / 80% / 420px) >>> */
  width: 100%;
  max-width: none;
  height: auto;
  overflow: visible;
}

.hero-phrase-svg text {
  fill: #111;
  font-family: var(--font);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-copy {
  margin-top: auto;
}

.hero-text .sub {
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2vw + 1vh, 2.75rem);
  line-height: 1.3;
  margin-top: clamp(1.25rem, 2.8vh, 2.5rem);
  color: var(--text);
  min-height: 1.2em;
}

.hero-text .body {
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--body-size);
  line-height: 1.55;
  color: #333;
  max-width: none;
  width: 100%;
  margin-top: 0;
}

.hero-text .body-secondary {
  margin-top: 1.15em;
}

.projects,
.contact {
  width: 100%;
  max-width: none;
  padding-top: 0;
  border-top: none;
}

.section-rule {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 28px;
  margin: 2.75rem 0 2.25rem;
  object-fit: contain;
  object-position: center;
  opacity: 0.35;
}

.appels-home {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.appels-home-intro h2 {
  margin-bottom: 0.5rem;
}

.appels-home-intro .appels-deadline {
  margin-bottom: 0;
  font-style: normal;
}

.appels-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2.5rem;
  align-items: stretch;
}

.appels-home-item {
  display: flex;
  flex-direction: column;
}

.appels-home-item .appels-deadline {
  font-style: italic;
}

.appels-home-item .appels-cta {
  margin-top: auto;
  align-self: flex-start;
}

.appels-page .section-rule {
  margin-top: 0.25rem;
}

.appels-home-item h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(1.2rem, 0.7vw + 0.85vh, 1.55rem);
  margin: 0 0 0.75rem;
  color: var(--text);
}

.puce {
  height: 0.9em;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.projects {
  margin: 0 0 3.5rem;
  /* Démarre au bas du 1er écran (après header + hero = 100svh) */
}

.contact {
  margin: 0 0 3.5rem;
}

h2 {
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--h2-size);
  margin-bottom: 1.25rem;
  color: var(--text);
}

.soon {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2vw + 1vh, 2.15rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  padding: 2.5rem 0;
  text-align: center;
  border: 1px solid var(--line);
}

.appels-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: #111;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  transition: opacity 0.25s ease;
}

.appels-cta:hover {
  opacity: 0.8;
}

.appels-page {
  padding-top: 2rem;
  padding-bottom: 4rem;
  border-top: none;
}

.appels-title {
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--h2-size);
  margin-bottom: 0.75rem;
  color: var(--text);
}

.appels-deadline {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.appels-closed {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.appels-page .appels-deadline {
  margin-bottom: 1.75rem;
  font-style: normal;
}

.appels-form .choice-list + .choice-list {
  margin-top: 0.9rem;
}

.appels-form {
  max-width: 42rem;
  gap: 2.5rem;
}

.appels-notice {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.appels-split {
  border: none;
  border-top: 1px solid #111;
  width: 100%;
  margin: 0;
}

.appels-form #analyse-wrap,
.appels-form #identity-wrap,
.appels-form #projet-fields {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.appels-form #identity-split {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.appels-form .choice legend,
.appels-form > label,
.appels-form .form-row > label,
.appels-form .ref-block > label,
.appels-form #projet-fields > label,
.appels-form #analyse-wrap > label,
.appels-form #identity-wrap > label {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text);
  line-height: 1.35;
}

.appels-form.is-tried input:invalid,
.appels-form.is-tried textarea:invalid {
  border-bottom-color: #c0392b;
}

.appels-form.is-tried label:not(.check):has(:invalid) {
  color: #c0392b;
}

.appels-form.is-tried label:not(.check):has(:invalid)::after,
.appels-form.is-tried .choice:has(input:invalid) legend::after {
  content: " *";
  color: #c0392b;
  font-weight: 600;
}

.appels-form.is-tried .choice:has(input:invalid) legend {
  color: #c0392b;
}

.choice {
  border: none;
  padding: 0;
  margin: 0;
}

.choice legend {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.6rem;
}

.appels-form .choice legend {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 0.7rem;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.choice-list.choice-stack {
  flex-direction: column;
  gap: 0.55rem;
}

.choice-list label.check,
label.check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.appels-form .choice-list {
  gap: 0.9rem 1.75rem;
}

.appels-form .choice-list.choice-stack {
  gap: 0.75rem;
}

.appels-form .choice-list label.check {
  font-size: 1.05rem;
}

.field-hint {
  font-size: 0.85rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
  font-weight: 400;
}

.appels-form .field-hint {
  font-size: 0.95rem;
}

.choice .field-hint {
  margin: 0 0 0.7rem;
}

.char-count {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #888;
  align-self: flex-end;
}

.appels-form .form-row,
.appels-form .ref-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.75rem;
}

@media (max-width: 600px) {
  .appels-form .form-row,
  .appels-form .ref-block {
    grid-template-columns: 1fr;
  }
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.g-recaptcha {
  margin-top: 0.25rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
}

input,
textarea {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  outline: none;
  transition: border-color 0.25s ease;
  text-transform: none;
  letter-spacing: normal;
}

input:focus,
textarea:focus {
  border-color: #111;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.appels-form textarea[name="directing_experience"],
.appels-form textarea[name="formation"] {
  min-height: 5rem;
}

.appels-form input[type="file"] {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.55rem 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.appels-form.is-tried input[type="file"]:invalid {
  border-bottom-color: #c0392b;
}

button {
  align-self: flex-start;
  margin-top: 0.5rem;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: #111;
  border: none;
  padding: 0.85rem 1.75rem;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

button:hover {
  opacity: 0.8;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button:disabled:hover {
  opacity: 0.4;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 3.5rem 1.5rem;
  background: #000;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo {
  width: 56px;
  height: auto;
  margin-bottom: 0.5rem;
  filter: invert(1);
}

.site-footer a {
  font-family: var(--font);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.25s ease;
}

.site-footer a:hover {
  opacity: 0.6;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.footer-login {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45) !important;
}

.footer-login:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1.5rem;
}

.site-modal[hidden] {
  display: none;
}

.site-modal-card {
  background: var(--bg);
  padding: 2rem 2.25rem;
  min-width: min(100%, 280px);
  text-align: center;
}

.site-modal-card p {
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--h2-size);
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.site-modal-card .site-modal-hint {
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.site-modal-card .site-modal-hint[hidden] {
  display: none;
}

.site-modal-card button {
  align-self: center;
  margin: 0 auto;
}

/* (ancienne règle container herotext retirée — le titre est un SVG) */

@media (max-width: 1000px) {
  :root {
    --shell-width: 90%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 3.5rem;
  }

  .hero-gutter {
    display: none;
  }

  .hero-image {
    width: 100%;
    max-width: min(520px, 100%);
    max-height: none;
    aspect-ratio: 1 / 0.95;
  }

  .hero-text {
    padding-top: 2.5rem;
    align-self: auto;
    min-height: 0;
  }

  .hero-copy {
    margin-top: 2.5rem;
  }

  .hero-text .body {
    margin-top: 0;
  }

  .appels-home-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-drop-menu {
    right: auto;
    left: 0;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .site-header {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .logo {
    width: 32px;
  }
}
