html {
	margin:0px;
	padding:0px;
	overflow:hidden;
  }
  body {
	padding:0px;
	width:100%;
	height:100%;
	margin:0px;
	overflow:hidden;
	background:#595959;
}


#ChronoMagCont {
	background-size:auto;
	background-position:bottom center;
	width:100%;
	/*height:100%;*/
	position: relative;
	z-index: 1;
  }


  #ChronoMag {
	/*padding-top:20px;*/
  }
  
  .fullpage {
	width: calc(100% + 50px);
	height: auto;
	margin-left: -20px;
  }
  
  .framewrapper {
	width: 100%;
	height: 0;
	padding-bottom: 56.25%;
	position: relative;
  }
  
  .framewrapper iframe {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
  }
  
  .flip-book {
	display: none;
	background-size: cover;
	background-color:#595959;
  }
  
  .page {
	background-color: #fdfaf7;
	color: #785e3a;
	border: solid 1px rgba(0,0,0,0.5);
	overflow: hidden;
  
	backface-visibility: hidden;
  }
  
  .page .page-content {
	width: calc(100% - 50px);
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: stretch;
	padding-left:20px;
  }
  
  .page .page-content .page-header {
	height: 30px;
	font-size: 100%;
	text-transform: uppercase;
	text-align: center;
  }
  
  .page .page-content .page-text {
	height: 50%;
	flex-grow: 1;
	font-size: 80%;
	text-align: justify;
	margin-top: 10px;
	padding-top: 10px;
	box-sizing: border-box;
	border-top: solid 1px #666666;
  }
  
  .page .page-content .page-footer {
	height: 30px;
	border-top: 0px;
	font-size: 80%;
	color: #998466;
  }
  
  .page.--left {
	border-right: 0;
	box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.4);
  }
  
  .page.--right {
	border-left: 0;
	box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.4);
  }
  
  .page.--right .page-footer {
	text-align: right;
  }
  
  .page.hard {
	background-color: #f2e8d9;
	border: solid 1px #666666;
  }
  
  .page.page-cover {
	background-color: #222;
	color: white;
	border-top: solid 1px #666666;
  }
  
  .page.page-cover h2, .page.page-cover h3 {
	text-align: center;
	padding-top: 50%;
	font-size: 210%;
  }
  
  .page.page-cover.page-cover-top {
	box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), -2px 0 5px 2px rgba(0, 0, 0, 0.4);
  }
  
  .page.page-cover.page-cover-bottom {
	box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), 10px 0 8px 0px rgba(0, 0, 0, 0.4);
  }
  
  .stf_block {
	overflow:hidden;
  }
  
  .stf__canvas {
	box-shadow: 0px 0px 20px 10px rgba(0,0,0,.25);
	image-rendering: smooth;
	position: relative;
	z-index: 10;
  }

  /* Classe pour bloquer le page flip quand zoomé */
  #ChronoMag.zoom-active .stf__parent {
	pointer-events: none !important;
  }

  #ChronoMag.zoom-active .stf__parent * {
	pointer-events: none !important;
	user-select: none !important;
  }

  #ChronoMag.zoom-active .stf__canvas {
	pointer-events: auto !important;
	z-index: 10000 !important;
	position: relative !important;
  }
  
  
  /* MENU */
  #mag_menu {
	backdrop-filter: invert(100%) blur(10px);
	position: fixed !important;
	filter:invert(100%);
	z-index: 9999 !important;
  }

  /* LIKE COUNTER */
  #like-counter {
	position: fixed;
	bottom: 35px;
	left:calc(300px - 10px);
	background: #000000;
	color: #ffffff;
	padding: 2px 5px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: bold;
	z-index: 10000;
	filter: invert(100%);
	font-size: 8px;
	font-family: arial;
	pointer-events: none;
  }
  
  #menubottom {
	position: absolute;
	width: 40%;
	margin-left: 30%;
	height: 5px;
	top: 70px;
	display:none;
  }

  .menu_portrait {
		opacity: 0;
		height: 60px;
		left: 0px;
		background:#0000004d;
		border-radius: 10px;
		box-shadow: 0px 0px 5px 5px rgba(255,255,255,0.25);
		border:1px solid #000000;

		width: calc(100% - 10%);
		margin-left: 5%;
		margin-bottom: 10px;
		border-radius: 20px;
  }

  .menu_landscape {
	height: 550px;
	top: 30px;
	right: 0px;
	width: 70px !important;
	background: #6666 !important;
	border-radius: 10px 0px 0px 10px;
	overflow: hidden !important;
	transition: all 250ms;
	border: 1px solid #000;
	box-shadow: 0px 0px 5px 5px rgba(255,255,255,0.25);
	margin-right: -1px;
  }
  

.menu_landscape #like-counter {
	bottom: 125px !important;
	left: 45px !important;
}
  
  .menu_landscape .menubtn1 img {
	width:50px;
	height:50px;
  }
  
  .menu_portrait .menubtn1 img {
	margin-top:0px;
	width:40px !important;
	height:40px !important;
  }

  .menubtn3 img {
	filter:invert(100%) !important;
  }

  /* Masquer le bouton reset sur les petits écrans */
  @media screen and (max-width: 380px) {
    .btn-reset {
      display: none !important;
    }

	#like-counter {
		left: calc(240px - 10px);
	}
  }
  
  
  .menu_portrait #page-numbers {
	/* margin-top:-30px; */
	}
  
  
  #page-numbers {
	position:absolute;
	width: 95px;
	position: absolute;
	text-align: center;
	margin-left: 50%;
	left: -65px;
	margin-bottom: 0px;
	/* display:none; */
	backdrop-filter:invert(100%) blur(10px);
	color:#FFFFFF !important;
	bottom:66px;
	padding: 13px;
	border-radius:15px;
	font-size:5px !important;
	filter:invert(100%);
	position: fixed !important;
	z-index: 9999 !important;
	border: 2px solid rgba(255,255,255,0.5);
	background:rgba(255,255,255,0.5);
	box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, 0.25);
	}

  
  .page-name, .page-current, .page-total, .page-sep {
	float:left;
	font-family:arial;
	font-size:14px;
	color:#000000;
	margin-right:5px;
	text-align:center;
  }

  .page-current {
	font-weight:bold;
  }

  .page-name {
	margin-right:10px;
  }
  
  
  /* BUTTONS */
  
  
  .menubtn1 img {
	float:left;
	height: 30%;
	margin-top:10px;
	width: auto;
	padding:10px;
  
  }
  
  .menubtn2 img {
	padding:10px;
  }
  
  .btn-prev img {
	margin-top:0%;
	height: 50%;
	float: left;
	width: auto;
	padding:10px;
	margin-right:10px;
  }
  .btn-next img {
	margin-top:0%;
	height: 50%;
	float: right;
	width: auto;
	padding:10px;
  }

  #ham-icon img {
	filter:invert(100%);
  }

  /* ========== DESKTOP MODE (reader) ========== */
  .mag_desktop #ChronoMagCont {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
  }

  .mag_desktop #ChronoMag {
    width: 100%;
  }

  .mag_desktop .stf__parent {
    width: 100% !important;
  }

  .mag_desktop #mag_menu {
    bottom: 20px !important;
    left: 50%;
    transform: translateX(-50%) scale(1.15);
    width: 440px;
    border-radius: 20px;
    padding: 0 20px;
  }

  .btn-share {
    float: left;
    transform: scale(1.40);
    margin-top: 9px;
    margin-left: 10px;
}

  .mag_desktop .menu_portrait {
    width: auto;
    margin-left: 0;
    border-radius: 20px;
  }

.mag_desktop #page-numbers {
	width: 95px;
	left: -65px;
}

.mag_desktop #like-counter {
	left:auto;
	right:160px;
}

/* Loading overlay - book animation */
.book,
.book__pg-shadow,
.book__pg {
  animation: cover 10s ease-in-out infinite;
}
.book {
  background: #c9302c;
  border-radius: 0.25em;
  box-shadow: 0 0.25em 0.5em hsla(0, 0%, 0%, 0.3), 0 0 0 0.25em #c9302c inset;
  padding: 0.25em;
  perspective: 37.5em;
  position: relative;
  width: 8em;
  height: 6em;
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
}
.book__pg-shadow,
.book__pg {
  position: absolute;
  left: 0.25em;
  width: calc(50% - 0.25em);
}
.book__pg-shadow {
  animation-name: shadow;
  background-image: linear-gradient(-45deg, hsla(0, 0%, 0%, 0) 50%, hsla(0, 0%, 0%, 0.3) 50%);
  filter: blur(0.25em);
  top: calc(100% - 0.25em);
  height: 3.75em;
  transform: scaleY(0);
  transform-origin: 100% 0%;
}
.book__pg {
  animation-name: pg1;
  background-color: #c9302c;
  background-image: linear-gradient(90deg, hsla(223, 10%, 90%, 0) 87.5%, hsl(223, 10%, 90%));
  height: calc(100% - 0.5em);
  transform-origin: 100% 50%;
}
.book__pg--2 { animation-name: pg2; }
.book__pg--3 { animation-name: pg3; }
.book__pg--4 { animation-name: pg4; }
.book__pg--5 { animation-name: pg5; }

@keyframes cover {
  from, 5%, 45%, 55%, 95%, to { animation-timing-function: ease-out; background-color: #c9302c; }
  10%, 40%, 60%, 90% { animation-timing-function: ease-in; background-color: #c9302c; }
}
@keyframes shadow {
  from, 10.01%, 20.01%, 30.01%, 40.01% { animation-timing-function: ease-in; transform: translate3d(0, 0, 1px) scaleY(0) rotateY(0); }
  5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { animation-timing-function: ease-out; transform: translate3d(0, 0, 1px) scaleY(0.2) rotateY(90deg); }
  10%, 20%, 30%, 40%, 50%, to { animation-timing-function: ease-out; transform: translate3d(0, 0, 1px) scaleY(0) rotateY(180deg); }
  50.01%, 60.01%, 70.01%, 80.01%, 90.01% { animation-timing-function: ease-in; transform: translate3d(0, 0, 1px) scaleY(0) rotateY(180deg); }
  60%, 70%, 80%, 90%, to { animation-timing-function: ease-out; transform: translate3d(0, 0, 1px) scaleY(0) rotateY(0); }
}
@keyframes pg1 {
  from, to { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.4deg); }
  10%, 15% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(180deg); }
  20%, 80% { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(180deg); }
  85%, 90% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(180deg); }
}
@keyframes pg2 {
  from, to { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(0.3deg); }
  5%, 10% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.3deg); }
  20%, 25% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.9deg); }
  30%, 70% { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(179.9deg); }
  75%, 80% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.9deg); }
  90%, 95% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.3deg); }
}
@keyframes pg3 {
  from, 10%, 90%, to { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(0.2deg); }
  15%, 20% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.2deg); }
  30%, 35% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.8deg); }
  40%, 60% { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(179.8deg); }
  65%, 70% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.8deg); }
  80%, 85% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.2deg); }
}
@keyframes pg4 {
  from, 20%, 80%, to { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(0.1deg); }
  25%, 30% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.1deg); }
  40%, 45% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.7deg); }
  50% { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(179.7deg); }
  55%, 60% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.7deg); }
  70%, 75% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0.1deg); }
}
@keyframes pg5 {
  from, 30%, 70%, to { animation-timing-function: ease-in; background-color: hsl(223, 10%, 45%); transform: translate3d(0, 0, 1px) rotateY(0); }
  35%, 40% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0); }
  50% { animation-timing-function: ease-in-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(179.6deg); }
  60%, 65% { animation-timing-function: ease-out; background-color: hsl(223, 10%, 100%); transform: translate3d(0, 0, 1px) rotateY(0); }
}
