/* Full Palette as CSS Variables */
:root {
  --TataBlue: #0074A2;
  --JuniperBlue: #0982DB;
  --JuniperGray: #4D4D4F;
  --JuniperLightGray: #88898B;
  --JuniperTangerine: #FFB71B;
  --JuniperGreen: #84B135;
  --JuniperDarkGreen: #2D6A00;
  --JuniperTeal: #0095A9;
  --JuniperLime: #CCDB2A;
  --JuniperJade: #009877;
  --JuniperOrange: #E87200;
  --JuniperPurple: #6638B6;
  --ChanelOffWhite: #F9F6F0;
  --ChanelBurgundy: #9A2A2A;
  --ChanelCharcoal: #1B1B1B;
  --ChanelWarmGray: #9F9A95;
  --ChanelLightNeutral: #EDE9E2;
  --ChanelGold: #C9B18E;
  --ChanelNavy: #0A2342;
  --ChanelTeal: #2B7F7E;
  --ChanelEmerald: #2A5F45;
  --ChanelCoral: #D27B5C;
  --ChanelLavender: #A290C0;
  --ChanelMediumGray: #757575;
  --ChanelOchre: #D3A762;
  --ChanelMarron: #7D4C3B;
  --ChanelTaupe: #BDB6B0;
  --ChanelSand: #D6C4A0;
  --ChanelCream: #F7F2EC;
  --ChanelDeepPlum: #5C2A4A;
  --ChanelCoolGray: #D8D9DD;
  --BlushPink: #F4C2C2;
  --DustyRose: #E8A5A5;
  --MauveRose: #D4909B;
  --AntiqueRose: #C67B86;
  --FadedRose: #B8697A;
  --VintageRose: #A85968;
  --MutedBurgundy: #8B4A5C;
  --OffWhite: #F8F5F3;
  --RoseBeige: #E6DDD6;
  --SageGreen: #4A5C3A;
  --ForestGreen: #2D3B24;
  --WeatheredWhite: #F2EAE6;
  --PowderedBeige: #E6D5CE;
  --ClayRose: #D9C4BB;
  --SmokyTaupe: #CDB5A8;
  --FadedOchre: #C1A695;
  --WashedBrick: #B89485;
  --PaleTerracotta: #A67F6E;
  --MutedRuste: #94685A;
  --LimeWash: #F7F3F0;
  --OldPlaster: #EBE2DB;
  --WeatheredMortar: #DDD0C5;
  --PaleSage: #DCE2D8;
}

/* Fonts */
 @font-face {
              font-family: 'Zapfino Linotype Three';
              src: url('../fonts/LinotypeZapfinoThree.woff2') format('woff2');
            }
            /*text { font-family: 'Zapfino Linotype Three', cursive; }*/


/* --- Fond et couleurs de base --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow: auto;
}

body.index {
  background-color: var(--ChanelOffWhite);
  color: black;
}

body.index .svg-container {
  width: 100vw;
  height: 80vh;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.index .svg-container svg {
  display: block;
  width: auto;
  max-width: 90vw;
  max-height: 80vh;
  margin: auto;
}

.slide-1 {
  background-color: var(--ChanelLightNeutral);
  color: var(--ChanelCharcoal);
}

#currentSlide .zapfino-56 {
	font-family: 'Zapfino Linotype Three', cursive;
	font-size: 56px;
	color: var(--ChanelBurgundy)
}

.slide-2 {
  background-color: var(--ChanelSand);
  color: var(--ChanelMarron);
}

/* Override for slide-2 only */
.override-slide-2 .media-cell {
  grid-column: 3 / 5;
  grid-row: 2 / 5;
}

.slide-3 {
  background-color: var(--ChanelOffWhite);
  color: var(--ChanelLavender);
}

.slide-4 {
  background-color: var(--ChanelCharcoal);
  color: var(--ChanelWarmGray);
}

.slide-5 {
  background-color: var(--ChanelOffWhite);
  color: var(--ChanelOchre);
}

.slide-6 {
  background-color: var(--ChanelLightNeutral);
  color: var(--ChanelCharcoal);
}


/* --- Conteneur principal des slides --- */
#currentSlide {
  transition: opacity 0.2s ease-in-out;
  will-change: opacity;
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-items: center;
  text-align: center;
}

.fadeOut { opacity: 0; }
.fadeIn { opacity: 1; }

#pearlButton { cursor: pointer; }
#pearlButton:hover .arrow { fill: var(--ChanelBurgundy); }

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* --- Grille responsive 6x6 --- */
.grid {
  margin: 0 auto;
  display: grid;
  width: 100vw;
  height: 100vh;
  position: relative;
}

.grid-6x6 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  justify-content: center;
  align-content: center;
}

.grid-6x6-debug {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: calc(100% / 6) calc(100% / 6);
}

/* --- Placement du contenu textuel --- */
#currentSlide.grid-6x6 .text-above {
  grid-column: 2 / 6;
  grid-row: 1;
  text-align: center;
  padding: 1rem;
}
#currentSlide.grid-6x6 .text-below {
  grid-column: 2 / 6;
  grid-row: 5;
  text-align: center;
  padding: 1rem;
}
#currentSlide.grid-6x6 .text-left {
  grid-column: 1 / 2;
  grid-row: 2 / 5;
  text-align: left;
  padding: 1rem;
}
#currentSlide.grid-6x6 .text-right {
  grid-column: 6 / 7;
  grid-row: 2 / 5;
  text-align: right;
  padding: 1rem;
}

/* --- Year tag & navigation --- */
#currentSlide.grid-6x6 .year-tag {
  grid-column: 6;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  padding: 1rem;
  width: 80px;
}
#currentSlide.grid-6x6 .nav-buttons {
  grid-column: 6;
  grid-row: 6;
  display: flex;
  gap: 0.5rem;
  justify-self: end;
  align-self: end;
  padding: 0.5rem;
  z-index: 9999;
}
.nav-buttons img {
  width: 40px;
  height: auto;
  cursor: pointer;
}

/* --- Multi-media system unifié --- */
.media-cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 1rem;
  pointer-events: auto;
}

.media-cell img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* Only affect media-cell if you also add .media-fit or .media-fixed */

.media-cell.media-fit {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.media-cell.media-fit img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-cell.media-fixed img {
  max-height: none;
  object-fit: none;
}

/* Positionnement par défaut pour la cellule média principale */
#currentSlide.grid-6x6 .media-cell {
  grid-column: 2 / 6;
  grid-row: 2 / 5;
}

/* Si tu veux plusieurs cellules médias dans une grille : place-les via des classes */
.left-cell   { grid-column: 1 / 4; grid-row: 2 / 6; }
.right-cell  { grid-column: 4 / 7; grid-row: 2 / 6; }
.fullwidth-cell { grid-column: 1 / 7; grid-row: 2 / 6; }

/* --- Wrapper et item pour les médias --- */
.media-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row; /* ou column selon le layout voulu */
  gap: 1rem;
  pointer-events: auto;
}

.media-item {
  flex: 1 1 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.2rem;
  /* Effet masque radial dégradé */
  mask-image: radial-gradient(ellipse at center, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 70%, transparent 100%);
  transition: mask-image 0.3s ease, -webkit-mask-image 0.3s ease;
  pointer-events: auto;
}

.media-item img:hover,
.media-item video:hover {
  mask-image: radial-gradient(ellipse at center, black 80%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 80%, transparent 100%);
}


/* --- Optionnel : adaptation mobile/portrait --- */
@media (orientation: portrait) and (pointer: coarse) {
  #currentSlide.grid-6x6 .text-above,
  #currentSlide.grid-6x6 .text-left,
  #currentSlide.grid-6x6 .text-right,
  #currentSlide.grid-6x6 .text-below {
    grid-column: 1 / 7;
    text-align: center;
    padding: 0.5rem 0;
  }
  #currentSlide.grid-6x6 .media-cell {
    grid-column: 1 / 7;
    grid-row: 3 / 5;
  }
}

/* --- Divers utilitaires et améliorations --- */
.text-above, .text-below, .text-left, .text-right {
  padding: 1rem;
  font-weight: bold;
  font-size: 1rem;
}

.year-tag { width: 80px; }

#transitionAudio { display: none; }

@media (orientation: portrait) {
  .portrait-right { text-align: center; }
  .portrait-bottom { position: static; }
}

@media (orientation: landscape) and (max-width: 1024px) {
  .portrait-right { text-align: right; }
  .portrait-bottom { position: static; }
}

/* --- Fin du CSS unifié --- */

