/* planche.css - habillage de la planche. Neutre : Louis habille apres. */

:root {
  --papier: #f4f2ee;
  --encre: #2f2c28;
  --gris: #6e6a63;
  --filet: #d7d2c8;
  --alerte: #a8641e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--papier); color: var(--encre);
  font: 13px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.planche { display: flex; flex-direction: column; height: 100%; }

header {
  display: flex; align-items: baseline; gap: 14px;
  padding: 12px 18px 10px; border-bottom: 1px solid var(--filet);
}
header .titre { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
header .soustitre { font-size: 12px; color: var(--gris); }

.corps { display: flex; flex: 1; min-height: 0; }

.scene { position: relative; flex: 1; min-width: 0; }
#vue { position: absolute; inset: 0; }
#vue canvas { display: block; width: 100%; height: 100%; }

#etiquettes { position: absolute; inset: 0; pointer-events: none; }
.etiq {
  position: absolute; transform: translate(-50%, -50%);
  text-align: center; white-space: nowrap;
  text-shadow: 0 0 3px rgba(244, 242, 238, .95), 0 0 6px rgba(244, 242, 238, .8);
}
.etiq .e-nom { display: block; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.etiq .e-m2 { display: block; font-size: 10px; color: var(--gris); }

#reglet {
  position: absolute; left: 16px; bottom: 14px; pointer-events: none;
  font-size: 10px; color: var(--gris);
}
.r-barre { display: flex; height: 6px; border: 1px solid var(--encre); }
.r-bloc { flex: 1; background: var(--encre); }
.r-bloc.r-vide { background: transparent; }
.r-lab { display: flex; justify-content: space-between; margin-top: 2px; }
.r-note { margin-top: 3px; font-size: 9.5px; letter-spacing: .02em; }

aside {
  width: 268px; flex: 0 0 268px; padding: 14px 16px 12px;
  border-left: 1px solid var(--filet); overflow: auto;
}

#rose { width: 74px; height: 74px; margin: 0 0 10px auto; }

.c-top { display: flex; align-items: baseline; gap: 10px; }
.c-typo { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.c-lot { display: flex; flex-direction: column; }
.c-num { font-size: 14px; font-weight: 700; }
.c-niv { font-size: 11px; color: var(--gris); }

.c-alerte {
  margin: 8px 0 0; padding: 4px 7px; font-size: 11px;
  color: var(--alerte); border: 1px solid var(--alerte); border-radius: 2px;
}

.c-note {
  margin: 7px 0 0; padding: 3px 7px; font-size: 10.5px;
  color: var(--gris); background: #ece8e0; border-radius: 2px;
}

.c-surf { margin: 10px 0 8px; font-size: 13px; }
.c-surf b { font-size: 17px; }

.c-sep { height: 1px; background: var(--filet); margin: 10px 0 8px; }

.c-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.c-tab td { padding: 2px 0; vertical-align: baseline; }
.c-tab td:last-child { text-align: right; color: var(--gris); white-space: nowrap; }
.c-pieces td:first-child { padding-right: 8px; }
.c-total td { border-top: 1px solid var(--filet); padding-top: 4px; font-weight: 700; }
.c-total td:last-child { color: var(--encre); }

.c-pied { margin-top: 10px; font-size: 10px; color: var(--gris); }

#bandeau-source {
  margin-top: 10px; padding: 5px 7px; font-size: 10.5px; border-radius: 2px;
  background: #ece8e0; color: var(--gris);
}
#bandeau-source.essai { background: #f6ead9; color: var(--alerte); }

/* --- navigation libre -------------------------------------------------------
   Deux elements seulement, et les deux s'effacent devant le dessin : un bouton
   d'angle qui dit ou on va, un rappel de touches qui part de lui-meme. */

.bt-mode {
  position: absolute; right: 14px; top: 12px; z-index: 3;
  font: inherit; font-size: 11.5px; color: var(--encre);
  background: rgba(244, 242, 238, .92); border: 1px solid var(--filet);
  border-radius: 3px; padding: 5px 10px; cursor: pointer;
}
.bt-mode:hover { border-color: #b3ada1; }
.bt-mode b {
  display: inline-block; margin-left: 5px; padding: 0 4px;
  border: 1px solid var(--filet); border-radius: 2px;
  font-size: 10.5px; color: var(--gris);
}
.bt-mode--libre { background: #2f2c28; color: #f4f2ee; border-color: #2f2c28; }
.bt-mode--libre b { border-color: #6a655d; color: #cfc9be; }

/* En bas a gauche : la place du reglet, qui est justement masque en mode libre.
   Le haut de la scene est pris par le panneau de l'editeur 2D. */
.nav-aide {
  position: absolute; left: 16px; bottom: 14px; z-index: 3; pointer-events: none;
  background: rgba(47, 44, 40, .84); color: #f2efe9;
  border-radius: 3px; padding: 8px 11px 7px;
  font-size: 11px; line-height: 1.5;
  transition: opacity .6s ease;
}
.nav-aide.efface { opacity: 0; }
.nav-aide table { border-collapse: collapse; }
.nav-aide td { padding: 0 0 1px; }
.nav-aide .n-t { padding-right: 12px; font-weight: 700; white-space: nowrap; }
.nav-aide .n-ou { color: #a9a296; font-weight: 400; }
.nav-aide .n-vit { margin-top: 5px; padding-top: 5px; border-top: 1px solid #55504a; }

/* En mode libre la coupe n'existe plus : un reglet et des etiquettes calees sur
   une projection orthographique n'y voudraient plus rien dire. */
body.mode-libre #etiquettes,
body.mode-libre #reglet { display: none; }
body.mode-libre #vue canvas { cursor: crosshair; }

/* --- index ----------------------------------------------------------------- */
/* l'index scrolle avec la PAGE, pas dans la grille : une capture pleine page
   ramene ainsi les 4 planches d'un coup. */
.planche--index { height: auto; min-height: 100%; }
.grille { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 620px; gap: 1px;
  background: var(--filet); }
.case { position: relative; background: var(--papier); }
.case iframe { width: 100%; height: 100%; border: 0; display: block; }
.case .lien {
  position: absolute; right: 8px; top: 8px; font-size: 11px; z-index: 2;
  background: rgba(244, 242, 238, .9); padding: 2px 7px; border: 1px solid var(--filet);
  border-radius: 2px; color: var(--encre); text-decoration: none;
}
