/* Site d'Elisabeth Caravella — reprise fidèle de l'ancien site, rendu responsive */

:root {
  color-scheme: only light; /* empêche le mode sombre automatique des téléphones */
  --texte: #000;
  --fond: #fff;
  --lien-actif: #0000ee;
  --gris: #6b6b6b;
  --filet: #ddd;
  --police: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: only light; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}
a { color: var(--texte); text-decoration: none; }
a:hover, a:focus-visible { color: var(--lien-actif); }
a[aria-current="page"] { color: var(--lien-actif); text-decoration: underline; }
img { max-width: 100%; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lien-actif); outline-offset: 2px; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.evitement { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px; z-index: 10; }
.evitement:focus { left: 8px; }

/* ---------- Mise en page ordinateur ---------- */
.barre-mobile { display: none; }

.site {
  display: flex;
  gap: 72px;
  padding: 118px 32px 64px 86px;
  max-width: 1280px;
}
.menu {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
}
.menu-groupe { display: flex; flex-direction: column; line-height: 27px; }
.menu-titre { font-weight: 700; text-decoration: underline; }
.menu-langues { color: var(--gris); }
.menu-langues a { text-decoration: underline; }
.menu-langues [aria-current] { color: var(--texte); font-weight: 700; }

.contenu { flex: 1; min-width: 0; max-width: 730px; }

/* ---------- Accueil ---------- */
/* Le fantôme occupe tout l'écran et suit la taille de la fenêtre */
.page-accueil .fantome {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  object-fit: contain;
  image-rendering: pixelated;
  z-index: 0;
}
.page-accueil .site { position: relative; z-index: 1; max-width: none; }
.actus {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-45%, -50%);
  width: min(690px, calc(100vw - 380px));
  background: #000;
  color: #fff;
  padding: 20px 20px 30px;
  z-index: 1;
}
.actus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; line-height: 17px; }
.actus a { color: #fff; text-decoration: underline; }
.actus a:hover { color: #fff200; }
.page-accueil .etoile { position: absolute; right: -32px; top: -24px; width: 87px; height: auto; }

/* ---------- Page œuvre ---------- */
.diapo { margin: 0; }
.js .diapo[data-cache], .js .cartel[data-cache] { display: none; }
.diapo img { display: block; width: 100%; height: auto; }
.diaporama-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.diaporama-nav button { min-width: 32px; height: 28px; }
.compteur { display: none; margin-right: auto; color: var(--gris); font-size: 13px; }
/* sans JavaScript : toutes les images sont affichées les unes sous les autres */
html:not(.js) .diapo + .diapo { margin-top: 16px; }
html:not(.js) .diaporama-nav { display: none; }

.cartel { line-height: 19px; margin-top: 4px; }
.cartel p { margin: 0; }
.diaporama-nav + .cartel { margin-top: 0; }
html:not(.js) .cartel[data-legende] { margin-bottom: 8px; }

.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Rubriques dépliables [ + ] */
.sections { margin-top: 36px; padding-left: 8px; display: flex; flex-direction: column; gap: 10px; }
details > summary {
  list-style: none;
  cursor: pointer;
  width: fit-content;
  display: block;
  padding: 4px 0;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "[ + ]\00a0"; white-space: pre; }
details[open] > summary::before { content: "[ – ]\00a0"; }
details > summary:hover, details[open] > summary { color: var(--lien-actif); }
.texte { max-width: 640px; padding: 6px 0 12px 8px; }
.texte img { display: block; margin: 8px 0; }
.texte a { text-decoration: underline; }
.texte hr { border: 0; border-top: 1px dashed #999; margin: 12px 0; }
.texte .video { margin-top: 4px; }

/* ---------- À propos / Textes ---------- */
.grand-titre {
  margin: -40px 0 56px;
  text-align: center;
  font-size: 72px;
  line-height: 1;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 5px;
  text-underline-offset: 10px;
}
.vitae { padding: 16px 0 0 8px; line-height: 19px; }
.vitae-nom { font-weight: 700; margin: 0 0 6px; }
.vitae-intro { color: #777; }
.vitae-intro p { margin: 0 0 6px; }
.vitae h2 { font-size: 13px; font-weight: 700; margin: 32px 0 16px; }
.vitae ul { list-style: none; margin: 0; padding: 0; }
.vitae li { margin-bottom: 2px; }
.articles { font-size: 13px; }
.articles .texte { text-align: justify; }
.article-titre { font-weight: 700; }
.articles details[open] .article-titre { color: var(--lien-actif); text-decoration: underline; }

/* Formulaire de contact (comme l'ancien site) */
.formulaire { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 360px; padding: 6px 0 16px 18px; }
.formulaire label { margin-top: 8px; }
.formulaire input, .formulaire textarea {
  font: inherit; color: var(--texte); background: var(--fond);
  border: 1px solid var(--texte); border-radius: 0; padding: 6px 8px; min-height: 32px; width: 100%;
}
.formulaire textarea { resize: vertical; }
.formulaire button {
  align-self: flex-end; margin-top: 12px; min-height: 34px; padding: 0 16px;
  border: 1px solid var(--texte); background: var(--fond);
}
.formulaire button:hover { background: var(--texte); color: var(--fond); }
.formulaire button[disabled] { opacity: .5; cursor: wait; }
.formulaire .piege { position: absolute; left: -9999px; }
.formulaire-etat:empty { display: none; }
.formulaire-etat { margin: 8px 0 0; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 900px) {
  body { font-size: 15px; }

  .barre-mobile {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 5;
    height: 56px;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    background: var(--fond);
    border-bottom: 1px solid var(--texte);
  }
  /* nom masqué à l'écran (reste lisible par les lecteurs d'écran) */
  .barre-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .barre-mobile { justify-content: flex-end; }
  .bouton-menu { min-width: 88px; min-height: 44px; text-align: right; }

  .site { display: block; padding: 0; }
  .menu {
    display: none;
    width: auto;
    padding: 20px 16px 28px;
    border-bottom: 1px solid var(--texte);
    gap: 24px;
  }
  .menu-ouvert .menu { display: flex; }
  .menu-groupe { line-height: 36px; }
  .menu-langues { line-height: 36px; }

  .contenu { padding: 20px 16px 48px; max-width: none; }

  /* Accueil */
  .page-accueil .menu { background: var(--fond); }
  .page-accueil .fantome { object-fit: cover; }
  .page-accueil .contenu { padding-top: 42vh; padding-top: 42dvh; }
  .actus { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 18px 16px 22px; }
  .actus ul { gap: 14px; line-height: 20px; }
  .page-accueil .etoile { right: -10px; top: -20px; width: 64px; }

  /* Œuvre */
  .compteur { display: inline; }
  .diaporama-nav button { min-width: 44px; height: 44px; font-size: 16px; }
  .cartel { line-height: 21px; }
  .sections { margin-top: 24px; padding-left: 0; gap: 0; }
  details > summary { width: 100%; padding: 11px 0; }
  .texte { padding: 4px 0 16px; }
  .articles .texte { text-align: left; }
  .formulaire { padding-left: 0; max-width: none; }
  .formulaire input, .formulaire textarea { min-height: 44px; font-size: 16px; }
  .formulaire button { min-height: 44px; }

  .grand-titre { margin: 12px 0 32px; font-size: 48px; text-decoration-thickness: 4px; text-underline-offset: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-accueil .fantome, .page-accueil .etoile { image-rendering: auto; }
}
.texte > :last-child { margin-bottom: 0; }
/* Traduction française sous le texte anglais, en gris comme sur l'ancien site */
.traduction { color: #8a8a8a; padding-top: 0; }
