body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background: #eaeaea;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Arabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: "Roboto", sans-serif;
}

.ar {
  font-family: 'Montserrat';
}

input[type="email"] {
  width: clamp(100px, 300px, 70vw);
}

#address {
  width: clamp(100px, 300px, 70vw);
}


header {
  flex-direction: column;
  text-align: center;
  background: #eaeaea;
  padding: clamp(0.1rem, 1.0rem, 0.5vw) clamp(0.5rem, 3rem, 4rem);
  font-family: 'Montserrat';
  font-size: clamp(0.5rem, 2.0rem, 5vw); /* taille du texte responsive */
  white-space: pre-line;
}

header a {
  color: inherit;
  text-decoration: none;
}

header h1, header p {
  margin: 0;            /* supprime les marges par défaut */
  padding: 0;           /* supprime le padding si présent */
}

header h1 + p {
  margin-top: 0.5vw;   /* espace entre h1 et p, ajustable */
}

section {
    margin: auto;
    padding-inline: auto;
}

.cta-section {
  width: clamp(60vw, 80vw, 1200px);
}

.cta-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: auto;
}

.cta-section input, .cta-section button {
    padding: 10px;
    font-size: 16px;
}

button {
    background-color: #1e5577;
    color: white;
    border: none;
    cursor: pointer;
}

/* button:hover {
    background-color: #b4875c;
} */

.buy-button {
    padding: 15px 25px;
    font-size: 16px;
    text-decoration: none;
    background-color: #1e5577;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    width: clamp(200px, 250px, 60vw);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr; /* base LTR */
}

.buy-button:hover {
    background-color: #b4875c;
}

footer {
    text-align: center;
    padding: 30px 20px;
    background: #eaeaea;
}

.contact-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px; /* espace entre les éléments */
    flex-wrap: wrap; /* passe à la ligne sur petit écran */
    margin-top: 10px;
}

.contact-line span {
    white-space: nowrap; /* évite les retours à la ligne internes */
}

.contact-line a {
    color: #1e5577;
    text-decoration: none;
}

.contact-line a:hover {
    text-decoration: underline;
}

#book {
    width: 800px;
    height: 500px;
    margin: 40px auto;
}

.page {
    width: 100%;
    height: 100%;
}

/* flip book ================================================= */
.bookshelf {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* Shelf image */
.bookshelf .shelf-img {
  z-index: 0;
  max-width: 75vh;
  width: 100%;
  height: auto;
  display: block;
}

/* Covers container */
.bookshelf .covers {
  display: flex;
  justify-content: center;
  gap: calc(75vh * 0.03);
  width: 100%;
  position: relative;
  z-index: 2;
  margin-bottom: -0.2rem; /* overlaps slightly with shelf */
}

/* Individual book thumb */
.bookshelf .thumb {
  width: min(15%, 100px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Thumb image */
.bookshelf .thumb img {
  width: 100%;
  display: block;
  box-shadow:
    4px 0 8px rgba(0, 0, 0, 0.4),
    0 6px 10px rgba(0, 0, 0, 0.3);
}

#pdf-section {
  display: flex;
  flex-direction: column;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center */
  width: 100%;
  height: 100%;           /* full viewport height */
  background: #f0f0f0;
  box-sizing: border-box;
  padding: 20px;           /* optional spacing around the section */
}

.hero {
  width: 100%;
  /* min-height: 80vh; */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5vh 8vw;
  box-sizing: border-box;
}

.container {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  width: 100%;
  gap: 50px; /* space between image and text */
  justify-content: center;
  flex-wrap: wrap; /* for mobile */
}

.left img {
  width: 100%;
  max-width: 500px;
  height: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* shadow */
  transition: 0.3s; /* smooth hover effect */
}

.left img:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.right {
  flex: 1;
  min-width: 280px;
  align-items: top;
}

.right h1 {
  margin-bottom: 20px;
  font-size: clamp(0.5rem, 2.2rem, 6vw); /* taille du texte responsive */
  white-space: pre-line;
}

.right h2 {
  font-size: clamp(0.5rem, 1.3rem, 4vw);
  margin-bottom: 30px;
  line-height: 2.0;
  text-align: justify;
  direction: rtl;
}

.buttons {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center; /* aligns buttons horizontally: start, center, end, space-between, etc. */
}

#read-btn {
  padding: 12px 28px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #1e5577;
  color: #fff;
  cursor: pointer;
  margin-bottom: 30px;
}

#read-btn:hover {
  background: #b4875c;
}

#pdf-modal {
  display: none;              /* affiché via JS */
  position: fixed;            /* couvre toute la fenêtre */
  inset: 0;                   /* top:0 right:0 bottom:0 left:0 */
  z-index: 9999;
}

#pdf-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

#pdf-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(50vw, 90vw, 1200px);
  height: clamp(50vw, 78vw, 900px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;                 /* au-dessus de l’overlay */
}

#flipbook-scroll {
  width: 100%;
  height: 100%;

  overflow: auto;             /* scroll vertical & horizontal */
  display: flex;
  justify-content: center;
  align-items: flex-start;    /* aligné en haut (IMPORTANT) */
}

/* cacher scrollbar */
#flipbook-scroll::-webkit-scrollbar {
  display: none;
}
#flipbook-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#flipbook {
  visibility: hidden;         /* visible après init turn.js */
  transform-origin: top left;
  transition: transform 0.2s ease;
  display: flex;
  width: 100%;
  max-height: 100%;
}

/* pages */
#flipbook .page {
  position: relative;
  flex: 1;
  overflow: hidden;
  width: 100%;
  height: 100%; */
}

#flipbook .page img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* adapte l’image à la page sans déformer */
}


@keyframes arrowPulse {
  0%   { transform: translateX(0); opacity: 0.6; }
  50%  { transform: translateX(5px); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.6; }
}

body.modal-open {
  overflow: hidden;
}

#zoom-controls {
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#zoom-controls button {
  font-size: 1.4rem;
  padding: 10px 14px;
  color: #fff;
  background: #1e5577;
}

@media (min-width: 992px) {
  #zoom-controls button:hover {
    background: #b4875c;
  }
}

.book-cover {
  width: 300px;          /* book width */
  height: 450px;         /* book height */
  perspective: 1200px;   /* depth effect */
  margin: 50px;
  background: white;
  cursor: pointer;
}

.book-cover img {
  width: 100%;
  height: 100%;
  transform-origin: right center;
  transition: transform 0.8s ease, box-shadow 0.8s ease;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  display: block;
  transform: rotateY(20deg);
}

.book-cover img:hover,
.book-cover img.hovered {
  transform: rotateY(30deg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.book-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;           /* the white page behind */
  transform: rotateY(0deg);   /* aligned with page */
  z-index: -1;                /* behind the cover */
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
  border-left: 1px solid #ccc; /* optional spine effect */
  pointer-events: none;
}


.book-cover-static {
  width: 300px;          /* book width */
  height: 450px;         /* book height */
  perspective: 1200px;   /* depth effect */
  margin: 50px;
  background: white;
}

.book-cover-static img {
  width: 100%;
  height: 100%;
  transform-origin: right center; /* hinge side */
  transition: transform 0.8s ease, box-shadow 0.8s ease;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  display: block;
  transform: rotateY(20deg); /* initial subtle 3D tilt */
}

.book-cover-static img:hover {
  transform: rotateY(30deg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

#signup-form {
    display: flex;
    flex-direction: row;
    gap: clamp(2px,8px,1vw);
    max-width: 400px;
    padding-inline: 10vw;
    justify-content: center;
  }
}

#signup-form input[type="email"] {
  flex: 1;                    /* input stretches to fill space */
  padding: 10px;
  font-size: 1rem;
  text-align: left;          /* keep your RTL alignment */
  width: clamp(300px, 600px, 70vw);
  border: 1px solid #ccc;
  border-radius: 0 4px 4px 0; /* rounded on left side only */
}

#signup-form button {
  padding: 10px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px 0 0 4px;  /* rounded on right side only */
  background-color: #1e5577;
  color: white;
  cursor: pointer;
  max-width: 100px;
}

#signup-form button:hover {
  background-color: #b4875c;
}

.page-bg {
  /*background: url("background.jpg") center / cover no-repeat;*/
  background: #f5f5f5;
  width: 100%;
}

.icon {
  display: inline-block;
  font-size: 2rem;      /* nécessaire pour que transform fonctionne bien */
  transition: transform 1s ease; /* animation douce */
  margin-right: 8px;
  margin-left: 8px;
}

.icon:hover {
  transform: scale(1.5); /* augmente la taille de 20% au survol */
}

.icon.hovered {
  transform: scale(1.5); /* augmente la taille de 20% au survol */
}

.button-sahara {
  color: #1e5577;
}
.free_reading {
  font-size: clamp(0.5rem, 1.1rem, 3.5vw);
  line-height: 2.0;
  text-align: justify;
  direction: rtl;
}

.icon-img {
  height: 50px;
  width: auto;
  margin-right: 8px;
  margin-left: 8px;

}

.buy-button-baridi {
    padding: 15px 25px;
    font-size: 16px;
    text-decoration: none;
    background-color: #f5f5f5;
    color: #1e5577;
    border-radius: 5px;
    border: 2px solid rgba(30, 85, 119, 0.6);
    font-weight: bold;
    text-align: center;
    width: clamp(200px, 350px, 80vw);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr; /* base LTR */
}

.buy-button-baridi.unavailable {
  filter: grayscale(100%);
  opacity: 0.6;
}

.buy-button-visa {
    padding: 15px 25px;
    font-size: 16px;
    text-decoration: none;
    background-color: #f5f5f5;
    color: #1e5577;
    border-radius: 5px;
    border: 2px solid rgba(30, 85, 119, 0.6);
    font-weight: bold;
    text-align: center;
    width: clamp(200px, 350px, 80vw);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr; /* base LTR */
}


.buy-button-visa:hover {
    background-color: #d6d6d6;
}

fieldset {
  border: 2px solid rgba(30, 85, 119, 0.6);
}

label {
  display: block;
  margin-bottom: 12px;
}

.form-message {
  min-height: 2em;          /* reserves space permanently */
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.form-message.show {
  opacity: 1;
}

.buy-button-visa.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

@media screen and (max-width: 991px) {
  #pdf-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(50vw, 78vw, 1200px);
    height: clamp(50vw, 78vw, 900px);
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    align-items: center;
    z-index: 1;                 /* au-dessus de l’overlay */
  }

  #zoom-controls {
    flex-direction: row !important;
    justify-content: center;
    margin-bottom: 10px;
  }

  #zoom-controls button:active {
    background: #b4875c;
  }
}

#storeModal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9999;
}

#storeOverlay {
  position: absolute;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
}

#storeContainer {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #f5f5f5;
  padding: 20px;
  border-radius: 12px;
  min-width: 250px;
  text-align: center;
}

#storeLinks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.store-link-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

.store-link-btn:hover {
  background: #eaeaea;
}

#closeStoreModal {
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.limited-badge {
  color: #B23A2E;
  font-weight: bold;
  margin-left: 6px;
}

.limited-title {
    text-align: center;
    font-size: 2.2em;
    color: #333;
    margin-bottom: 0.3em;
}

.delivery-note {
    text-align: center;
    font-size: 1.2em;
    color: #666;
    font-weight: normal;
    margin-top: 0;
}

.book-info-row {
  display: flex;
  justify-content: center; /* center the row */
  max-width: 600px;
  margin: 1em auto;
  gap: 1.2em; /* exact spacing between icons */
}

.book-info-row .info-item {
  display: flex;
  flex-direction: column; /* stack icon above text */
  align-items: center;
  width: 100px; /* fixed width for equal spacing */
  font-family: 'Cairo', sans-serif;
  color: #333;
}

.book-info-row .info-item i {
  color: #B23A2E; /* limited edition color */
  margin-bottom: 0.3em; /* space between icon and text */
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em 1.2em;
}

/* 📱 Mobile */
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr; /* stack fields vertically */
  }
}


/* Smooth validation feedback */
.form-group input {
  border: 1.5px solid #ccc;
  border-radius: 6px;
  padding: 0.6em 0.7em;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Invalid field */
.form-group input.invalid {
  border-color: #d9534f;
  box-shadow: 0 0 0 1px rgba(217,83,79,0.2);
}

/* Valid field */
.form-group input.valid {
  border-color: #3cb371;
  box-shadow: 0 0 0 1px rgba(60,179,113,0.25);
}

.store-link-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}



/* =================================
   BOOKSTORES SECTION – EDITORIAL
================================= */

.bookstores-section {
  background: #f5f5f5;
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.bookstores-section h2 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 60px;
  color: #2c2c2c;
  font-weight: 600;
}

.bookstores-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

/* Store card */
.store-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  border-top: 4px solid #C49A6C;
}

.store-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.1);
}

.store-card h3 {
  font-size: 1.15em;
  margin-bottom: 10px;
  color: #8B5E3C;
}

.store-card p {
  font-size: 0.95em;
  color: #6b6b6b;
  margin: 5px 0;
}

.store-card iframe {
  margin-top: 15px;
  border-radius: 12px;
  border: none;
  width: 100%;
}

/* Button */
.map-link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  background: #8B5E3C;
  color: #ffffff;
  border-radius: 40px;
  text-decoration: none;
  font-size: 0.9em;
  transition: 0.3s ease;
}

.map-link:hover {
  background: #C49A6C;
  color: #2c2c2c;
}

/* ===============================
   TABLET (≤1024px)
================================= */
@media (max-width: 1024px) {

  .bookstores-container {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ===============================
   MOBILE (≤768px)
================================= */
@media (max-width: 768px) {

  .bookstores-section {
    padding: 60px 18px;
  }

  .bookstores-section h2 {
    font-size: 1.6em;
    margin-bottom: 40px;
  }

  .bookstores-container {
    grid-template-columns: 1fr;
  }

  .store-card iframe {
    height: 200px;
  }

  .map-link {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

}

/* SMALL PHONES */
@media (max-width: 480px) {

  .store-card iframe {
    height: 180px;
  }

}