/* =====================================================================
   Galerie d'Elisabeth Gaimard
   Les couleurs (--c1 à --c5, --fond, --encre…) sont calculées à partir
   des toiles elles-mêmes : voir inc/couleurs.php. Valeurs de secours ici.
   ===================================================================== */
:root {
  --fond: #f6f3f9; --fond-2: #ece6f2; --encre: #2a1f33; --doux: #625a69; --ligne: #ddd4e4;
  --c1: #c2185b; --c2: #f2a516; --c3: #1f8a70; --c4: #2f5aa8; --c5: #7b4fa0;
  --c1-fonce: #a3144d; --c2-fonce: #8a5a00; --c3-fonce: #1a7560; --c2-texte: #2a1f33;
  --affiche: "Fraunces", Georgia, serif;
  --texte: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --papier: #ffffff;
  --ombre: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.07);
  /* anciens noms, utilisés par l'espace artiste */
  --creme: var(--fond); --corail: var(--c1-fonce); --safran: var(--c2); --turquoise: var(--c3-fonce);
  --titre: var(--affiche);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--fond);
  color: var(--encre);
  font: 17px/1.6 var(--texte);
}
/* trame de toile vierge : fils horizontaux et verticaux très légers, sur la couleur de fond */
body.public {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='h' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .8' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 -.9 .55'/%3E%3C/filter%3E%3Cfilter id='v' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8 .012' numOctaves='2' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 -.9 .55'/%3E%3C/filter%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='1' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)' opacity='.55'/%3E%3Crect width='100%25' height='100%25' filter='url(%23v)' opacity='.55'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
a { color: var(--c1-fonce); }
img { max-width: 100%; display: block; }
h1, h2 { margin: 0; font-weight: 400; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--c3-fonce); outline-offset: 3px; }

/* ---------- Haut de page : nom + dernière toile ---------- */
.haut { max-width: 1280px; margin: 0 auto; padding: 20px 24px 8px; }
.menu { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 22px; font-weight: 600; font-size: 16px; }
.menu a { color: var(--encre); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.menu a:hover { border-bottom-color: var(--c2); }
.menu a.menu-connexion { padding: 5px 14px; border: 2px solid var(--encre); border-radius: 99px; }
.menu a.menu-connexion:hover { background: var(--encre); color: var(--fond); }

.heros {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  min-height: min(76vh, 760px); padding: 32px 0 24px;
}
.heros.sans-vedette { grid-template-columns: 1fr; min-height: 50vh; }
.heros-texte { container-type: inline-size; min-width: 0; }
.nom {
  font-family: var(--affiche); font-weight: 400; font-style: italic;
  /* la taille suit la largeur de la colonne et la longueur du mot le plus long (--lettres) :
     le nom tient toujours sur sa colonne, sans couper les mots ni toucher la toile */
  font-size: clamp(44px, calc(100cqi / (var(--lettres, 9) * .5)), 156px);
  line-height: .98; letter-spacing: -.01em; padding-right: .08em;
  color: var(--encre);
}
.nom span { display: block; }
.accroche { margin: 28px 0 0; font-size: clamp(19px, 2vw, 24px); color: var(--doux); max-width: 28ch; line-height: 1.4; }
.compte { margin: 14px 0 0; font-weight: 600; color: var(--c1-fonce); }

.vedette {
  justify-self: center; position: relative;
  border: 0; padding: 0; background: none; cursor: zoom-in; text-align: left;
}
.vedette img {
  width: auto; max-height: min(66vh, 640px);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 14px 18px 30px -6px var(--tc);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 14px 18px 30px -6px color-mix(in srgb, var(--tc) 75%, transparent), 30px 40px 70px -10px color-mix(in srgb, var(--tc) 45%, transparent);
  transform: rotate(1.2deg);
  transition: transform .25s ease, box-shadow .25s ease;
}
.vedette:hover img { transform: rotate(0deg) translate(-4px, -4px); box-shadow: 0 1px 3px rgba(0,0,0,.10), 18px 24px 36px -6px var(--tc);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 18px 24px 36px -6px color-mix(in srgb, var(--tc) 75%, transparent), 38px 50px 84px -10px color-mix(in srgb, var(--tc) 45%, transparent); }
.vedette-legende { display: block; margin-top: 30px; font-size: 15px; color: var(--doux); }

/* ---------- Le nuancier : une touche de peinture par toile ---------- */
.nuancier { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 12px 0 8px; }
.touche {
  width: 60px; height: 42px; border: 0; padding: 0; cursor: pointer;
  background: var(--tc);
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%;
  transform: rotate(-6deg);
  animation: touche .5s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(.35s + var(--i) * 70ms);
  transition: transform .15s;
}
.touche:nth-child(3n+2) { border-radius: 40% 60% 46% 54% / 62% 38% 62% 38%; transform: rotate(5deg); width: 52px; }
.touche:nth-child(3n)   { border-radius: 55% 45% 38% 62% / 42% 55% 45% 58%; transform: rotate(-2deg); width: 68px; height: 38px; }
.touche:hover { transform: scale(1.18) rotate(0deg); }
@keyframes touche { from { opacity: 0; transform: scale(.2) rotate(-30deg); } }
.nuancier-note { font-size: 14px; color: var(--doux); margin-left: 6px; }

/* ---------- Le mur de toiles ---------- */
.galerie { max-width: 1280px; margin: 0 auto; padding: 72px 24px 40px; }
.titre-section { font-family: var(--affiche); font-weight: 400; font-style: italic; letter-spacing: -.01em; font-size: clamp(36px, 4.6vw, 54px); line-height: 1; margin-bottom: 44px; }
.vide { font-size: 20px; color: var(--doux); padding: 40px 0 80px; }
.mur { columns: 3 300px; column-gap: 52px; }
.toile { break-inside: avoid; margin: 0 0 60px; }
.cadre {
  position: relative; display: block; width: calc(100% - 12px);
  border: 0; padding: 0; background: none; cursor: zoom-in;
}
.cadre img {
  width: 100%; height: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 10px 14px 22px -6px var(--tc);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 10px 14px 22px -6px color-mix(in srgb, var(--tc) 75%, transparent), 22px 30px 52px -10px color-mix(in srgb, var(--tc) 45%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cadre:hover img { transform: translate(-3px, -3px); box-shadow: 0 1px 3px rgba(0,0,0,.10), 14px 18px 28px -6px var(--tc);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 14px 18px 28px -6px color-mix(in srgb, var(--tc) 75%, transparent), 28px 38px 64px -10px color-mix(in srgb, var(--tc) 45%, transparent); }
.toile figcaption { padding: 24px 0 0; }
.toile figcaption strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; }
.toile figcaption > span { display: block; color: var(--doux); font-size: 15px; margin-top: 2px; }
/* la pastille rouge des galeries : toile vendue */
.point-rouge { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; vertical-align: 2px; font-size: 13px; font-weight: 400; color: var(--doux); }
.point-rouge::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #d7191c; box-shadow: 0 0 0 2px var(--fond); }
.toile.masquee .cadre img { opacity: .4; }
.etiquette-cachee {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 99px;
  background: var(--encre); color: #fff; font-size: 13px; font-weight: 600;
}

/* ---------- L'artiste ---------- */
.artiste {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 64px; align-items: center;
  margin: 40px 0 0; padding: 80px max(24px, calc((100% - 1100px) / 2));
  background: var(--encre); color: var(--fond);
}
.artiste:not(:has(.portrait)) { grid-template-columns: 1fr; }
.artiste h2 { font-family: var(--affiche); font-weight: 400; font-style: italic; letter-spacing: -.01em; font-size: clamp(36px, 4.5vw, 52px); margin-bottom: 18px; color: var(--c2); }
.artiste .texte { font-size: 19px; line-height: 1.7; max-width: 60ch; }
.portrait {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,.10), -14px 18px 30px -6px var(--c3);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), -14px 18px 30px -6px color-mix(in srgb, var(--c3) 75%, transparent), -30px 40px 70px -10px color-mix(in srgb, var(--c3) 45%, transparent);
}

/* ---------- Contact ---------- */
.contact {
  padding: 88px max(24px, calc((100% - 1100px) / 2));
  background: var(--c2); color: var(--c2-texte);
}
.contact h2 { font-family: var(--affiche); font-weight: 400; font-style: italic; letter-spacing: -.01em; font-size: clamp(38px, 6.4vw, 86px); line-height: .98; max-width: 13ch; }
.contact p { font-size: 20px; margin: 22px 0 30px; max-width: 44ch; }
.bouton-contact {
  display: inline-block; text-decoration: none; word-break: break-all;
  background: var(--encre); color: #fff; font-weight: 600; font-size: 19px;
  padding: 14px 28px; border-radius: 99px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s;
}
.bouton-contact:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(0,0,0,.22); }

/* ---------- Pied de page ---------- */
.pied { max-width: 1280px; margin: 0 auto; padding: 40px 24px 48px; color: var(--doux); font-size: 14px; }
.pied p { margin: 14px 0 4px; }
.pied-touches { display: flex; gap: 8px; }
.pied-touches span { width: 26px; height: 16px; border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
.discret { color: var(--doux); opacity: .7; }

/* ---------- Visionneuse : la toile à gauche, ses informations et commentaires à droite ---------- */
.visionneuse {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(18, 14, 20, .95);
  background: color-mix(in srgb, var(--tc, #222) 18%, rgba(14, 11, 16, .96));
}
.visionneuse[hidden] { display: none; }
.v-contenu {
  height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 28px; padding: 24px 28px 24px 24px;
}
.v-image { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 56px; }
.v-image img { max-width: 100%; max-height: calc(100vh - 48px); width: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.v-panneau {
  align-self: center; max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--fond); color: var(--encre); border-radius: 16px; padding: 26px 26px 22px;
  border-top: 8px solid var(--tc, var(--c1));
}
.v-panneau h2 { font-family: var(--affiche); font-style: italic; font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0 40px 8px 0; }
.v-infos { margin: 0; color: var(--doux); font-size: 15px; }
.v-infos em { display: inline-block; font-style: normal; font-size: 13px; font-weight: 600; padding: 1px 10px; border-radius: 99px; color: #fff; background: var(--doux); }
.v-infos em:empty { display: none; }
.v-infos em.vendu { background: #d7191c; }
.v-infos em.dispo { background: var(--c3-fonce); }
#v-desc { margin: 12px 0 0; font-size: 16px; }
#v-desc:empty { display: none; }

.v-commentaires { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--ligne); }
.v-commentaires[hidden] { display: none; }
.v-commentaires h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
#v-liste { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
#v-liste li { background: var(--papier); border-radius: 12px; padding: 10px 14px; border-left: 4px solid var(--tc, var(--c1)); }
.c-tete { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.c-tete span { color: var(--doux); }
.c-message { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
#v-form { display: grid; gap: 10px; }
#v-form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; color: var(--doux); }
#v-form input, #v-form textarea {
  font: 16px var(--texte); color: var(--encre); width: 100%;
  padding: 9px 12px; border: 2px solid var(--ligne); border-radius: 10px; background: #fff;
}
#v-form input:focus, #v-form textarea:focus { outline: none; border-color: var(--tc, var(--c3-fonce)); }
#v-form textarea { resize: vertical; min-height: 84px; }
#v-form .bouton { justify-self: start; }
#v-form .bouton:disabled { opacity: .6; cursor: wait; }
.piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.v-note { margin: 0; font-size: 13px; color: var(--doux); }
#v-retour { margin: 0; font-weight: 600; font-size: 15px; }
#v-retour:empty { display: none; }
#v-retour.erreur { color: #b3261e; }
#v-retour.merci { color: var(--c3-fonce); }

.visionneuse > .v-fermer, .v-image button {
  position: absolute; border: 0; cursor: pointer; color: #fff; z-index: 2;
  background: rgba(255,255,255,.14); border-radius: 50%;
  width: 46px; height: 46px; font-size: 28px; line-height: 1;
}
.visionneuse > .v-fermer:hover, .v-image button:hover { background: var(--tc, var(--c1)); }
.visionneuse > .v-fermer { top: 34px; right: 40px; color: var(--encre); background: var(--fond-2); }
.v-prec { left: 0; top: 50%; transform: translateY(-50%); }
.v-suiv { right: 0; top: 50%; transform: translateY(-50%); }

/* lien « Laisser un commentaire » sous chaque toile */
.lien-commentaires {
  display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 15px var(--texte); color: var(--c1-fonce);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
  text-decoration-color: var(--tc, var(--c2));
}
.lien-commentaires:hover { color: var(--encre); }

/* ---------- Petits écrans ---------- */
@media (max-width: 820px) {
  .haut { padding: 14px 18px 0; }
  .menu { justify-content: flex-start; gap: 4px 16px; }
  .heros { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 28px; }
  .vedette { justify-self: start; }
  .vedette img { max-height: 60vh; box-shadow: 0 1px 3px rgba(0,0,0,.10), 10px 14px 22px -6px var(--tc);
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 10px 14px 22px -6px color-mix(in srgb, var(--tc) 75%, transparent), 22px 30px 52px -10px color-mix(in srgb, var(--tc) 45%, transparent); }
  .galerie { padding: 56px 18px 24px; }
  .mur { column-gap: 0; }
  .artiste { grid-template-columns: 1fr; gap: 36px; padding: 56px 18px; }
  .portrait { max-width: 300px; }
  .contact { padding: 56px 18px; }
  .pied { padding: 32px 18px 40px; }
  .v-contenu { display: block; height: 100%; overflow-y: auto; padding: 64px 12px 24px; }
  .v-image { padding: 0 0 56px; }
  .v-image img { max-height: 62vh; }
  .v-prec, .v-suiv { top: auto; bottom: 4px; transform: none; }
  .v-prec { left: calc(50% - 56px); }
  .v-suiv { right: calc(50% - 56px); }
  .v-panneau { max-height: none; overflow: visible; margin-top: 8px; padding: 20px 18px; }
  .visionneuse > .v-fermer { top: 12px; right: 12px; position: fixed; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =================== Boutons communs =================== */
.bouton {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--c1-fonce); color: #fff;
  font: 600 17px var(--texte); text-decoration: none;
  padding: 12px 26px; border-radius: 99px;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
  transition: transform .15s, box-shadow .15s;
}
.bouton:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.bouton:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.bouton.petit { font-size: 15px; padding: 8px 20px; }

/* petites touches décoratives sur l'écran de connexion */
.tache { position: absolute; pointer-events: none; }
.carte-porte .t1 { width: 120px; height: 84px; top: -30px; left: -34px; background: var(--c1); border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%; transform: rotate(-12deg); }
.carte-porte .t3 { width: 110px; height: 76px; bottom: -28px; right: -30px; background: var(--c2); border-radius: 40% 60% 46% 54% / 62% 38% 62% 38%; transform: rotate(8deg); }

/* =================== Espace artiste =================== */
.admin { background: var(--fond); }
.porte { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.carte-porte {
  position: relative; overflow: hidden;
  width: 100%; max-width: 400px; background: var(--papier);
  padding: 40px 28px; border-radius: 24px; box-shadow: var(--ombre); text-align: center;
}
.carte-porte > *:not(.tache) { position: relative; }
.carte-porte .t1 { width: 140px; height: 130px; top: -70px; left: -50px; }
.carte-porte .t3 { width: 120px; height: 110px; bottom: -60px; right: -40px; }
.carte-porte h1 { font-weight: 400; font-size: 36px; }
.carte-porte form { text-align: left; display: grid; gap: 14px; margin: 20px 0; }
.carte-porte .bouton { justify-self: center; }

label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: var(--doux); }
input, select, textarea {
  font: 16px var(--texte); color: var(--encre);
  padding: 10px 12px; border: 2px solid var(--ligne); border-radius: 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turquoise); }
textarea { resize: vertical; }
.erreur { color: #c0392b; font-weight: 700; margin: 0; }

.barre {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 10px 16px; background: var(--papier); border-bottom: 4px solid var(--safran);
}
.barre strong { font-family: var(--titre); font-weight: 400; font-size: 22px; }
.barre nav { display: flex; gap: 4px; flex-wrap: wrap; }
.barre nav a { text-decoration: none; color: var(--encre); font-weight: 700; font-size: 15px; padding: 6px 12px; border-radius: 99px; }
.barre nav a:hover { background: var(--creme); }
.barre nav a.actif { background: var(--turquoise); color: #fff; }

.contenu-admin { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.message { background: var(--fond-2); border-left: 6px solid var(--turquoise); padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.aide { color: var(--doux); }

.zone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 36px 16px; cursor: pointer;
  border: 3px dashed var(--safran); border-radius: 22px; background: var(--papier);
  color: var(--doux); font-weight: 400; font-size: 16px;
  transition: background .2s, border-color .2s;
}
.zone:hover, .zone.survol { background: var(--fond-2); border-color: var(--corail); }
.zone strong { font-size: 22px; color: var(--encre); font-family: var(--titre); font-weight: 600; }
.plus {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--corail); color: #fff; font-size: 36px; line-height: 1; margin-bottom: 6px;
}
#progression { margin-top: 14px; }
.jauge { height: 12px; background: var(--ligne); border-radius: 99px; overflow: hidden; }
#jauge { height: 100%; width: 0; background: linear-gradient(90deg, var(--corail), var(--safran), var(--turquoise)); transition: width .3s; }
#etat { font-weight: 700; margin: 8px 0 0; }

.liste { display: grid; gap: 18px; margin-top: 24px; }
.fiche {
  position: relative;
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  background: var(--papier); padding: 16px; border-radius: 16px; box-shadow: var(--ombre);
  scroll-margin-top: 80px;
}
.fiche.cachee { opacity: .6; }
.fiche.cachee::before {
  content: "Masquée"; position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--encre); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
}
.vignette img { width: 100%; border-radius: 6px; }
.fleches { display: flex; gap: 6px; margin-top: 8px; }
.fleches form { flex: 1; }
.fleches button {
  width: 100%; border: 2px solid var(--ligne); background: #fff; border-radius: 8px;
  padding: 4px; cursor: pointer; color: var(--doux);
}
.fleches button:hover { border-color: var(--turquoise); color: var(--turquoise); }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.champs .large { grid-column: 1 / -1; }
.actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.case { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--encre); cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--turquoise); }
.suppr { position: absolute; right: 16px; bottom: 16px; }
.fiche .actions { padding-right: 90px; }
.lien-rouge { border: 0; background: none; color: #c0392b; font: 700 14px var(--texte); cursor: pointer; text-decoration: underline; }

.panneau { background: var(--papier); padding: 24px; border-radius: 18px; box-shadow: var(--ombre); margin-bottom: 24px; }
.panneau h2 { font-weight: 400; font-size: 28px; }
.portrait-ligne { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.portrait-ligne img { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; }
.portrait-ligne > label:last-child { flex: 1; min-width: 240px; }

@media (max-width: 640px) {
  .fiche { grid-template-columns: 1fr; }
  .vignette img { max-height: 280px; width: auto; margin: 0 auto; }
  .champs { grid-template-columns: 1fr; }
  .fiche .actions { padding-right: 0; }
  .suppr { position: static; text-align: right; }
}

/* Boutons Modifier / Supprimer sous chaque toile (visibles seulement une fois connectée) */
.outils-admin { display: flex; gap: 8px; padding: 10px 4px 0; flex-wrap: wrap; }
.outils-admin form { margin: 0; }
.outil {
  display: inline-block; border: 2px solid var(--ligne); background: #fff; cursor: pointer;
  font: 700 14px var(--texte); text-decoration: none; color: var(--encre);
  padding: 6px 14px; border-radius: 99px;
}
.outil.modifier:hover { border-color: var(--turquoise); color: var(--turquoise); }
.outil.supprimer { color: #c0392b; }
.outil.supprimer:hover { border-color: #c0392b; background: var(--fond-2); }
.toile.masquee .ouvrir img { opacity: .45; }
.pastille.cache { background: var(--encre); color: #fff; top: auto; bottom: 20px; right: 20px; }
.titre-edition { font-weight: 400; font-size: 30px; }

/* Bandeau « Mode administratrice » en haut de toutes les pages */
.barre-admin {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 8px 16px; background: var(--encre); color: #fff; font-size: 15px;
}
.ba-qui { font-weight: 700; }
.barre-admin nav { display: flex; gap: 6px; flex-wrap: wrap; }
.ba-bouton {
  color: #fff; text-decoration: none; font-weight: 700;
  padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.12);
}
.ba-bouton:hover { background: rgba(255,255,255,.25); }
.ba-bouton.ba-actif { background: var(--safran); color: var(--encre); }
.ba-bouton.ba-sortir { background: var(--corail); }
.admin .barre { top: 52px; }
.bandeau-apercu {
  margin: 0; padding: 8px 16px; text-align: center; font-weight: 700;
  background: var(--fond-2); border-bottom: 2px solid var(--safran);
}
@media (max-width: 900px) { .admin .barre { position: static; } }

/* Recadrage */
.bouton-recadrer {
  width: 100%; margin-top: 8px; padding: 7px; cursor: pointer;
  border: 2px solid var(--ligne); background: #fff; border-radius: 8px;
  font: 700 14px var(--texte); color: var(--encre);
}
.bouton-recadrer:hover { border-color: var(--turquoise); color: var(--turquoise); }
.recadrage {
  position: fixed; inset: 0; z-index: 60; background: rgba(30, 26, 34, .8);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.recadrage[hidden] { display: none; }
.rc-boite {
  background: var(--papier); border-radius: 18px; width: 100%; max-width: 980px;
  max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
.rc-tete { padding: 14px 18px 4px; }
.rc-tete strong { display: block; font-family: var(--titre); font-weight: 400; font-size: 26px; }
.rc-tete span { color: var(--doux); font-size: 15px; }
.rc-outils { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 18px; }
.rc-outils button {
  border: 2px solid var(--ligne); background: #fff; border-radius: 99px; cursor: pointer;
  padding: 6px 14px; font: 700 14px var(--texte); color: var(--encre);
}
.rc-outils button:hover { border-color: var(--turquoise); color: var(--turquoise); }
.rc-scene {
  position: relative; align-self: center; margin: 4px 18px; line-height: 0;
  background: #2d2a32; min-height: 120px; min-width: 120px; overflow: hidden; padding: 14px;
  touch-action: none; user-select: none;
}
.rc-scene canvas { display: block; max-width: min(944px, calc(100vw - 68px)); max-height: calc(100vh - 290px); width: auto; height: auto; }
.rc-charge { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: #fff; line-height: 1.4; pointer-events: none; }
.rc-charge[hidden] { display: none; }
.rc-cadre {
  position: absolute; cursor: move; touch-action: none;
  outline: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(20, 16, 24, .6);
  background-image:
    linear-gradient(to right, rgba(255,255,255,.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}
.rc-cadre[hidden] { display: none; }
.rc-cadre span { position: absolute; width: 22px; height: 22px; background: var(--safran); border: 3px solid #fff; border-radius: 50%; }
.rc-cadre [data-p="nw"] { left: -11px; top: -11px; cursor: nwse-resize; }
.rc-cadre [data-p="ne"] { right: -11px; top: -11px; cursor: nesw-resize; }
.rc-cadre [data-p="sw"] { left: -11px; bottom: -11px; cursor: nesw-resize; }
.rc-cadre [data-p="se"] { right: -11px; bottom: -11px; cursor: nwse-resize; }
.rc-cadre [data-p="n"] { left: calc(50% - 11px); top: -11px; cursor: ns-resize; }
.rc-cadre [data-p="s"] { left: calc(50% - 11px); bottom: -11px; cursor: ns-resize; }
.rc-cadre [data-p="w"] { top: calc(50% - 11px); left: -11px; cursor: ew-resize; }
.rc-cadre [data-p="e"] { top: calc(50% - 11px); right: -11px; cursor: ew-resize; }
.rc-pied { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 12px 18px 16px; }
.lien-gris { border: 0; background: none; cursor: pointer; font: 700 15px var(--texte); color: var(--doux); text-decoration: underline; }

.rc-int { position: relative; }
.barre .qui { font-family: var(--texte); font-size: 14px; font-weight: 400; color: var(--doux); }
label small { font-weight: 400; }

/* choix de l'image du haut de page (Ma présentation) */
.choix-vedette { border: 2px solid var(--ligne); border-radius: 12px; padding: 12px 16px 16px; margin: 0; display: grid; gap: 12px; }
.choix-vedette legend { font-weight: 700; padding: 0 6px; }
.vignette-titre { border-radius: 8px !important; }

/* Commentaires dans l'espace artiste */
.pastille-nb { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #d7191c; color: #fff; font-size: 13px; }
.ba-bouton.ba-nouveaux { background: #d7191c; }
.reglage-moderation { margin: 0 0 18px; padding: 12px 16px; background: var(--fond); border-radius: 12px; }
.liste-commentaires { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.liste-commentaires li { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px; border-radius: 12px; background: var(--fond); }
.liste-commentaires li.attente { outline: 2px dashed var(--c2); }
.liste-commentaires img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.liste-commentaires .c-tete { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: flex-start; }
.etiquette-nouveau, .etiquette-attente { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; color: #fff; }
.etiquette-nouveau { background: #d7191c; }
.etiquette-attente { background: var(--c2-fonce); }
.c-actions { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.c-actions form { margin: 0; }
@media (max-width: 640px) { .liste-commentaires li { grid-template-columns: 1fr; } }
