*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor:crosshair
}

:root {
  --noir:            #111110;
  --gris-fonce:      #2c2c2a;
  --gris-mid:        #5f5e5a;
  --gris-clair:      #d3d1c7;
  --blanc:           #f5f4f0;
  --accent:          #00d46a;
  --panneau-largeur: 50vw;
  --transition:      0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--blanc);
}

@font-face {
    font-family: 'escabeau';
    src: url('./fonts/Escabeau.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'raleway-regular';
    src: url('./fonts/Raleway-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'raleway-extralight';
    src: url('./fonts/Raleway-ExtraLight.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'raleway-italic';
    src: url('./fonts/Raleway-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
#viewer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#zones-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.zone {
  pointer-events: all;
  cursor: crosshair;
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.zone:hover,
.zone.active {
  fill: rgba(255, 0, 0, 0);
  stroke: #ffffff00;
}

.tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  max-width: 220px;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 10px 14px;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip span {
  font-family: 'raleway-extralight';
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: black;
  margin-bottom: 4px;
}

.tooltip p {
  font-family: 'raleway-regular';
  font-size: 12px;
  color: black;
}

.panneau {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panneau-largeur);
  height: 100%;
  z-index: 30;
  background: #000000;
  padding: 24px 36px 48px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.panneau.ouvert {
  transform: translateX(0);
}

#panneau-fermer {
  position:absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: crosshair;
  color: #1d1d1d;
  padding: 4px;
  line-height: 1;
  transition: none;
}

#panneau-fermer:hover {
  color: #ffffff;
}

#panneau-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  padding-top: 0;
}

#panneau-fleches {
  display: flex;
  gap: 12px;
}

#panneau-fermer,
#zone-prev,
#zone-next {
  background: none;
  border: none;
  cursor: crosshair;
  color: #222222;
  padding: 4px;
  line-height: 1;
  transition: none;
}

#panneau-fermer:hover,
#zone-prev:hover,
#zone-next:hover {
  color: #ffffff;
}

#panneau-fermer svg,
#zone-prev svg,
#zone-next svg {
  display: block;
}

#panneau-contenu h2 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 20px;
}

#panneau-contenu h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 24px;
}

#panneau-contenu p {
  font-size: 14px;
  line-height: 1.75;
  color: #ffffff;
  margin-bottom: 16px;
}

/* ─── Typographie articles ──────────────────────────────── */

.art-titre {
  font-family: 'escabeau';
  font-size: 40px !important;
  font-weight: 500;
  line-height: 1 !important;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: -15px !important;
}
.zone-cat-glitch .art-titre {
text-shadow: -3px -4px 0 rgb(59, 166, 241) !important; 
}

.zone-cat-recit .art-titre {
text-shadow: -3px -4px 0 rgb(167, 195, 101) !important; 
}
.art-sous-titre {
  font-family: 'raleway-extralight';
  font-size: 20px !important;
  font-weight: 400;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.art-intertitre {
  font-family: 'raleway-extralight';
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0 !important;
}

.art-corps {
  font-family: 'raleway-regular';
  font-size: 14px;
  line-height: 1.75;
  color: #ffffff;
  margin-bottom: 14px;
}

.art-citation {
  font-family: 'raleway-italic';
  font-size: 13px;
  line-height: 1.7;
  color: #ffffff;
  text-align:justify;
  padding-left: 3vw;
  margin: 20px 0;
}

.art-citation-large {
  font-family: 'raleway-regular';
  font-size: 13px;
  line-height: 1.8;
  color: #ffffff;
  text-align: center;
  padding: 20px 0;
  margin: 20px 0;
  border-top: 0.5px solid #ffffff;
  border-bottom: 0.5px solid #ffffff;
}

.art-biblio {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 0.2px solid #949494;
}

.art-biblio p {
  font-size: 10px ! important;
  line-height: 1.6;
  color: #9f9f9f ! important;
  margin-bottom: 6px;
}
/* ─── sommaire ──────────────────────────────── */
.sommaire {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panneau-largeur);
  height: 100%;
  z-index: 31;
  background: #000000;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform var(--transition);
  padding: 30px 30px 30px;
}

.sommaire.ouvert {
  transform: translateX(0);
}

#sommaire-grille {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 100%;
  gap: 0 12px;
}

.sommaire-item {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: visible;
  cursor: crosshair;
  padding-bottom: 4px;
}

.sommaire-item:hover .sommaire-titre.cat-glitch {
  color: rgb(59, 166, 241);
  text-shadow: none;
}
.sommaire-item:hover .sommaire-titre.cat-recit {
  color: rgb(167, 195, 101);
  text-shadow: none;
}
.sommaire-item:hover .sommaire-titre.cat-article {
  color: rgb(150, 150, 150);
  text-shadow: none;
}
.sommaire-item:hover .sommaire-titre.cat-glitch {
  color: rgb(59, 166, 241);
  text-shadow: none;
}

.sommaire-titre {
  font-family: 'escabeau';
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 0.7em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 1;
}

.sommaire-titre.cat-glitch {
  text-shadow: -2px -3px 0 rgb(59, 166, 241);
}

.sommaire-titre.cat-recit {
  text-shadow: -2px -3px 0 rgb(167, 195, 101);
}
.sommaire-titre.cat-article {
  text-shadow: -2px -3px 0 rgb(150, 150, 150);
}
.sommaire-sous-titre {
  position: absolute;
  top: 100%;
  left: 0;
  font-family: 'raleway-extralight';
  font-size: 0.45em;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

 /* ─── barre de navigation ──────────────────────────────── */
 .Barrenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  height: 60px;
  background-color: transparent;
  display: flex;
  align-items:flex-start;
  justify-content:flex-start;
  padding: 0 0;
}
.barrenavtexte {
  font-family: 'escabeau';
  font-size: 1vw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #ffffff;
  margin-left: 20px;
  margin-top: 10px;

}
#bouffee-beton {
  font-size: 1.5vw !important;
}
#apropos {
  text-decoration: none;
}
#apropos:hover {
  text-decoration: underline;
}
#articles:hover{
  text-decoration: underline;
}

/* ─── Loading overlay ──────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading-text {
  font-family: 'escabeau';
  font-size: 6rem;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 0.7;
  animation: shadow-pulse 1.4s ease-in-out infinite;
}

@keyframes shadow-pulse {
  0%, 100% { text-shadow: none; }
  50%       { text-shadow: -5px -6px 0 rgb(59, 166, 241); }
}

 /* ─── Gérer les appareils ──────────────────────────────── */
#blocage-mobile,
#blocage-portrait {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000000;
  color: #ffffff;
  font-family: 'raleway-extralight';
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

/* Mobile — bloque toujours */
@media (max-width: 767px) {
  #blocage-mobile {
    display: flex;
  }
  #viewer, #zones-overlay, .tooltip, .panneau, .Barrenav {
    display: none;
  }
}

/* Tablette portrait — bloque uniquement en portrait */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: portrait) {
  #blocage-portrait {
    display: flex;
  }
  #viewer, #zones-overlay, .tooltip, .panneau, .Barrenav {
    display: none;
  }
}