/* Yves Bartlett — repris de la version WordPress (Elementor, thème Hello) */

@font-face { font-family: "Footic"; src: url("assets/fonts/footic.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Cooper Hewitt"; src: url("assets/fonts/cooperhewitt-medium.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cooper Hewitt"; src: url("assets/fonts/cooperhewitt-mediumitalic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cooper Hewitt"; src: url("assets/fonts/cooperhewitt-semibold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cooper Hewitt"; src: url("assets/fonts/cooperhewitt-semibolditalic.woff") format("woff"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --rouge: #ff4c4c;
  --rouge-lien: #f85252;
  --brun: #453c3c;
  --marron: #4b2200;
  --gris: #ccc;
  --gris-clair: #e6e2e2;
  --trait: 5px dashed;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--rouge);
  color: var(--brun);
  font-family: "Cooper Hewitt", sans-serif;
  font-size: 16px;
  line-height: 18px;
}

a { color: var(--rouge-lien); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 10px; }
h2, h3 { font-size: 16px; line-height: 18px; margin: 0 0 10px; }
img { max-width: 100%; }

summary { cursor: pointer; list-style: none; padding: 5px 0; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "↓ "; }
details[open] > summary::before { content: "↑ "; }
details { margin-bottom: 5px; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ─────────────  ACCUEIL : onglets  ───────────── */

.onglets {
  display: grid;
  grid-template-columns: minmax(320px, 36%) 1fr;
  grid-template-rows: repeat(9, minmax(min-content, 1fr));
  height: 100vh;
  height: 100dvh;
}

.onglet {
  grid-column: 1;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 0 0 4px;
  min-height: 0;
  overflow: hidden;
  background: var(--gris-clair);
  color: var(--marron);
  border: var(--trait) var(--rouge);
  border-right: 0;
  font: 700 70px/0.93 "Footic", sans-serif;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.onglet + .onglet, .panneau + .onglet { border-top-width: 0; }
.onglet:hover { text-decoration: none; background: var(--gris); }
.onglet[aria-expanded="true"] {
  background: var(--gris);
  color: var(--brun);
  border-color: var(--brun);
}

.panneau {
  grid-column: 2;
  grid-row: 1 / -1;
  contain: size; /* le contenu défile dans le panneau sans agrandir la grille */
  overflow: auto;
  background: var(--rouge);
  border: var(--trait) var(--brun);
}
.panneau[hidden] { display: none; }

/* Textes centrés verticalement (bio, cv, agenda, contact, poèmes) */
.panneau-texte {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
.panneau-texte > * { width: 100%; }
.panneau-texte details { margin: 0; }
.panneau-texte details[open] { background: var(--gris); padding: 0 5px 5px; }
.panneau-texte details[open] > summary { border-bottom: 1px solid var(--brun); margin-bottom: 10px; }

/* Diaporama d'ouverture : les dessins défilent vers le bas sans fin */
.defile {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.defile-piste {
  position: absolute;
  inset: 0 0 auto 0;
  animation: defile-bas 25s linear infinite;
}
.defile-piste img {
  display: block;
  width: 100%;
  height: calc(100vh - 10px);
  height: calc(100dvh - 10px);
  object-fit: cover;
}
@keyframes defile-bas {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .defile-piste { animation: none; }
}

/* Listes de projets (research, performance, art coordination) */
.cartes { display: flex; flex-direction: column; gap: 5px; padding: 5px; }
.carte {
  position: relative;
  display: block;
  height: min(630px, 75vh);
  background: var(--gris) no-repeat 50% 100% / 100% auto;
  border: 5px solid transparent;
}
.carte:hover { border-color: var(--gris); text-decoration: none; }
.carte span {
  position: absolute;
  top: 0; left: 0;
  padding: 5px;
  background: var(--gris);
  color: var(--brun);
  text-transform: lowercase;
}

/* Agenda */
.agenda { background: #fff; padding: 10px; }
.agenda h3 { margin: 10px 0 5px; text-transform: lowercase; }
.agenda dl { margin: 0 0 15px; display: grid; grid-template-columns: 11em 1fr; gap: 5px 15px; }
.agenda dt { font-weight: 700; }
.agenda dd { margin: 0; }
.agenda .lieu { display: block; font-style: italic; }

/* Formulaires */
.formulaire { display: flex; flex-direction: column; gap: 10px; }
.formulaire input, .formulaire textarea {
  width: 100%;
  padding: 8px;
  border: 0;
  background: var(--gris);
  color: var(--brun);
  font: inherit;
}
.formulaire textarea { min-height: 8em; resize: vertical; }
.formulaire button, .bouton {
  align-self: flex-start;
  display: inline-block;
  padding: 8px 20px;
  border: 0;
  background: var(--gris);
  color: var(--brun);
  font: inherit;
  cursor: pointer;
}
.formulaire button:hover, .bouton:hover { background: var(--gris-clair); text-decoration: none; }
.boutons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.piege { display: none !important; }
.message { background: var(--gris); padding: 8px; }

/* ─────────────  PAGES PROJET : trois colonnes  ───────────── */

.projet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  height: 100vh;
  height: 100dvh;
  padding: 5px;
}
.colonne {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--gris);
}
.colonne-tete {
  flex: none;
  position: relative;
  padding: 5px;
  background: var(--gris);
  border-bottom: 3px dashed var(--brun);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.colonne-images .colonne-tete { overflow: visible; z-index: 5; }
.colonne-tete h1 { display: inline; font: inherit; margin: 0; }
.colonne-corps {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.colonne-corps > .centre { margin: auto 0; }

/* Menu déroulant */
.menu { position: relative; display: inline-block; white-space: normal; }
.menu > summary { padding: 0; text-transform: none; }
.menu > summary::before, .menu[open] > summary::before { content: ""; }
.menu > ul {
  position: absolute;
  top: calc(100% + 5px);
  left: -5px;
  z-index: 10;
  width: max-content;
  max-width: 90vw;
  max-height: calc(100vh - 60px);
  overflow: auto;
  margin: 0;
  padding: 10px 15px;
  list-style: none;
  background: var(--gris-clair);
  border: 3px dashed var(--brun);
  text-transform: none;
}
.menu ul ul { list-style: none; padding: 0 0 5px 15px; margin: 0; }
.menu li { padding: 2px 0; }
.menu a { color: var(--brun); }
.menu a[aria-current="page"] { color: var(--rouge-lien); }
.tete-lien { margin-left: 15px; text-transform: none; color: var(--brun); }

/* Diaporama en fondu */
.diaporama { position: relative; flex: 1; min-height: 0; background: var(--gris); }
.diaporama img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--fondu, 0ms) linear;
}
.diaporama img.visible { opacity: 1; }

/* ─────────────  PAGES SIMPLES (cv, musique, guide…)  ───────────── */

.simple { min-height: 100vh; padding: 5px; }
.simple-tete {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px;
  background: var(--gris);
  border: 3px dashed var(--brun);
}
.simple-tete a { color: var(--brun); }
.simple-corps {
  max-width: 900px;
  margin: 5px auto 0;
  padding: 20px;
  background: var(--gris);
}
.simple-corps iframe { width: 100%; border: 0; display: block; margin-bottom: 10px; }
.simple-corps h2 { font-family: "Footic", sans-serif; font-size: 32px; line-height: 1; font-weight: 400; }
.simple-corps pre { font: inherit; white-space: pre-wrap; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 5px; margin: 20px 0; }
.galerie img { display: block; width: 100%; height: 200px; object-fit: cover; }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.sites iframe { height: 400px; background: #fff; }

/* ─────────────  GUIDE  ───────────── */

.simple-corps.guide { max-width: 1400px; }
.simple-tete .menu > ul { left: auto; right: -5px; }
.guide section { margin-bottom: 40px; }
.guide-intro, .guide-astuces, .guide-proposer > p { max-width: 75ch; }
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.filtres input, .filtres select {
  padding: 8px; border: 0; background: var(--gris-clair); color: var(--brun); font: inherit;
}
.filtres input { flex: 1 1 240px; }
.compte { font-style: italic; }
.tableau-defile { overflow-x: auto; }
.tableau-guide, .tableau-admin { width: 100%; border-collapse: collapse; background: var(--gris-clair); }
.tableau-guide th, .tableau-admin th {
  position: sticky; top: 0;
  background: var(--brun); color: var(--gris-clair);
  text-align: left; font-weight: 700; padding: 8px;
}
.tableau-guide td, .tableau-admin td { padding: 8px; vertical-align: top; border-top: 2px dashed var(--gris); }
.tableau-guide td:nth-child(n+3):nth-child(-n+5) { min-width: 16em; }
.tableau-guide a { color: var(--rouge-lien); }
.tableau-guide tr[hidden] { display: none; }

.formulaire-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.formulaire-grille .large { grid-column: 1 / -1; }
.formulaire label { display: flex; flex-direction: column; gap: 4px; }
.formulaire label.case { flex-direction: row; align-items: center; gap: 8px; }
.formulaire label.case input { width: auto; }
.formulaire-grille input, .formulaire-grille textarea { background: var(--gris-clair); }
.message.erreur { background: var(--rouge); color: #fff; }

@media (max-width: 767px) {
  .tableau-guide thead { display: none; }
  .tableau-guide, .tableau-guide tbody, .tableau-guide tr, .tableau-guide td { display: block; width: 100%; }
  .tableau-guide tr { border-top: 5px dashed var(--rouge); padding: 5px 0; }
  .tableau-guide td { border: 0; padding: 3px 8px; min-width: 0 !important; }
  .tableau-guide td:empty { display: none; }
  .tableau-guide td::before { content: attr(data-titre) " — "; font-style: italic; }
  .tableau-guide td:first-child::before { content: none; }
}

/* ─────────────  ADMINISTRATION  ───────────── */

body.admin { background: var(--gris-clair); }
.connexion { max-width: 380px; margin: 10vh auto; padding: 30px; background: var(--gris); border: 5px dashed var(--rouge); }
.connexion h1 { font: 700 40px/0.95 "Footic", sans-serif; margin: 0 0 20px; }
.connexion h1 small { font-size: 24px; }
.connexion .formulaire input { background: #fff; }
.admin-tete {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
  padding: 10px 15px; background: var(--gris); border-bottom: 5px dashed var(--rouge);
}
.admin-tete a { color: var(--brun); }
.admin-tete nav { display: flex; flex-wrap: wrap; gap: 5px 15px; flex: 1; }
.admin-tete nav a[aria-current="page"] { color: var(--rouge-lien); font-weight: 700; }
.admin-qui { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.admin-qui button { background: none; border: 0; padding: 0; font: inherit; color: var(--brun); text-decoration: underline; cursor: pointer; }
.pastille { display: inline-block; min-width: 1.4em; padding: 0 4px; border-radius: 1em; background: var(--rouge); color: #fff; text-align: center; font-size: 13px; }
.admin-corps { max-width: 1100px; margin: 0 auto; padding: 20px 15px 60px; }
.admin-corps h1 { font: 700 40px/1 "Footic", sans-serif; margin: 10px 0 20px; }
.admin-corps h1 small { font-size: 20px; }
.admin-corps h2 { margin-top: 30px; }
.admin-corps .formulaire { margin-bottom: 20px; }
.admin-corps .formulaire input, .admin-corps .formulaire textarea { background: #fff; border: 1px solid #b9b3b3; }
.formulaire-ligne { flex-direction: row; flex-wrap: wrap; }
.formulaire-ligne input { flex: 1 1 240px; width: auto; }
.en-ligne { display: inline; }
.en-ligne button, .tableau-admin .bouton { padding: 4px 10px; border: 0; background: var(--gris); color: var(--brun); font: inherit; font-size: 14px; cursor: pointer; }
.en-ligne button:hover { background: var(--rouge); color: #fff; }
.tableau-admin tr.masquee { opacity: 0.5; }
.nowrap { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tuiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tuiles a { display: block; padding: 20px; background: var(--gris); color: var(--brun); height: 100%; }
.tuiles strong { display: block; font: 700 40px/1 "Footic", sans-serif; margin-bottom: 5px; }
.carte-admin { background: #fff; padding: 15px; margin-bottom: 10px; border-left: 5px solid var(--rouge); }
.carte-admin.lu { border-left-color: var(--gris); }
.carte-admin .meta { font-size: 14px; color: #6b6060; }
.carte-admin blockquote { margin: 10px 0; white-space: pre-wrap; }
.agenda .description { margin-top: 5px; font-size: 14px; }

/* ─────────────  MOBILE  ───────────── */

@media (max-width: 767px) {
  .onglets { display: block; height: auto; }
  .onglet {
    width: 100%;
    min-height: 64px;
    padding: 8px 4px;
    font-size: 48px;
    border-right: var(--trait) var(--rouge);
  }
  .onglet[aria-expanded="true"] { border-right-color: var(--brun); }
  .panneau { border-top-width: 0; contain: none; }
  .panneau-texte { padding: 15px; }
  .defile { height: 70vh; }
  .defile-piste img { height: 70vh; }
  .carte { height: 90vw; }
  .agenda dl { grid-template-columns: 1fr; gap: 0; }
  .agenda dd { margin-bottom: 10px; }

  .projet { display: block; height: auto; }
  .colonne { margin-bottom: 5px; }
  .colonne-corps { overflow: visible; }
  .diaporama { flex: none; height: 75vh; }
  .colonne-images .colonne-tete { position: sticky; top: 0; z-index: 5; }
}
