/* ================= VARIABLES ================= */
:root {
  --color--neutral-white: #ffffff;
  --color--neutral-extralightgrey: #f8f9f8;
  --color--neutral-lightgrey: #e6f0ea;
  --color--neutral-semilightgrey: #dae4de;
  --color--neutral-grey: #c6d5cc;
  --color--neutral-darkgrey: #595959;
  --color--neutral-extradarkgrey: #3f3f3f;
  --color--neutral-black: #000000;
  --color--primary-darkgreen: #002300;
  --color--primary-mediumgreen: #02640b;
  --color--primary-green: #78d700;
  --color--secondary-yellow: #e8c500;
  --color--secondary-purple: #8c8cff;
  --color--secondary-pink: #ffb9ff;
  --color--secondary-orange: #ff8c12;
  --color--secondary-cyan: #73beff;
  --color--secondary-blue: #12a0f3;
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 0 0 0.2rem var(--color--primary-green);
  --radius: 12px;
}

/* ================= FONTS ================= */
@font-face { font-family: "NaotypoBold"; src: url("../fonts/Naotypo-Bold.woff") format("woff"); }
@font-face { font-family: "NaotypoExtraBold"; src: url("../fonts/Naotypo-ExtraBold.woff") format("woff"); }
@font-face { font-family: "NaotypoLight"; src: url("../fonts/Naotypo-Light.woff") format("woff"); }
@font-face { font-family: "NaotypoSemiBold"; src: url("../fonts/Naotypo-SemiBold.woff") format("woff"); }
@font-face {
    font-display: swap;
    font-family: "Naotypo_web";
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/jsp_gppro/styles/fonts/naotypo/Naotypo-Medium.woff") format("woff");
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: "NaotypoSemiBold", Arial, Helvetica, sans-serif; }

body {
    margin: 0;
    height: 100vh;
    background: #d6e4dc;
}

/* ================= INTRO ================= */
#intro {
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg, #0b1f00, #0f3d00);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.intro-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .intro-logo { width: 140px; }
}

/* ================= HEADER ================= */
header {
    width: 100%;
    background: linear-gradient(90deg, #0b1f00, #0f3d00);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: clamp(20px, 4vw, 36px);
    font-family: "Naotypo_web", "Tahoma", "Arial", sans-serif;
}

.clock { text-align: right; }

#time {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: bold;
}

/* ================= CONTAINER ================= */
#container {
  background-color: transparent; /* plus de couleur de fond “fenêtre” */
  border-radius: 0;              /* coins carrés */
  min-height: 100%;
  min-width: 100%;
  max-height: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: none;             /* plus d’ombre */
  padding: 0;                   /* plus de padding autour */
  transition: none;             /* plus de transition */
}

@media screen and (max-width: 1000px) {
  #container {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    width: 100%;
    border-radius: 0;
  }
}

/* ==================== MAIN CONTENT ==================== */
/* LEFT PANEL (desktop) */
.left-panel {
    position: fixed;           /* desktop reste fixed */
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: auto;              /* laisser la hauteur s'adapter */
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    background: none;
    overflow: hidden;
}

/* iframe prend la majeure partie de la div, mais pas 100% */
.left-panel iframe {
    width: 100%;
    height: 650px;           /* laisse de la place pour le lien */
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

/* Lien cliquable sous l'iframe, visible tout le temps */
.full-page-link {
    display: block;
    text-align: center;
    margin: 8px auto 15px;    /* espace au-dessus et en dessous */
    font-size: 14px;
    color: #11a8e0;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.full-page-link:hover {
    color: #0a7ca0;
}

/* ================= PAGE ================= */
#container .page {
  padding: 20px;              /* moins de padding */
  width: 100%;                /* prend toute la largeur disponible */
  max-width: 800px;           /* limite la largeur pour que ça reste compact */
  margin: 0 auto;             /* centre horizontalement */
  box-sizing: border-box;
}

#container .page.hidden { 
  display: none !important; 
}

/* ================= LISTES ================= */
#stops, #quays {
  max-height: 70vh;          /* limite la hauteur pour qu'elle ne prenne pas toute la page */
  width: 100%;
  overflow-y: auto;           /* scroll interne toujours possible */
  scrollbar-width: none;      /* pour Firefox */
  -ms-overflow-style: none;   /* pour IE 10+ */
}

/* Cacher la scrollbar pour Chrome, Safari et Edge */
#stops::-webkit-scrollbar,
#quays::-webkit-scrollbar {
  display: none;
}

/* ---------------- LOADING ---------------- */
#loading { display: flex; align-items: center; justify-content: center; }
#loading img { width: 75%; height: 75%; }

/* ---------------- STOPS ---------------- */
#browse-stop { display: flex; flex-direction: column; }
#stops {
  flex: 1 1 auto;
  width: 100%;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.stop {
  padding: 20px;
  width: calc(100% - 50px);
  border-radius: 20px;
  background-color: var(--color--neutral-white);
  box-shadow: var(--shadow);
  font-family: "NaotypoBold";
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.2s, background 0.2s;
  margin: 5px;
}

.stop:hover {
  background: var(--color--neutral-lightgrey);
  box-shadow: var(--shadow-hover);
  transform: scale(1.03);
}

/* ---------------- QUAIS ---------------- */
#browse-quay { display: flex; flex-direction: column; }
#quays {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  margin-top: 10px;
}

.quay {
  padding: 20px;
  width: calc(100% - 50px);
  border-radius: 20px;
  background-color: var(--color--neutral-white);
  box-shadow: var(--shadow);
  font-family: "NaotypoBold";
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.2s;
  margin: 5px;
}

.quay:hover { box-shadow: var(--shadow-hover); transform: scale(1.02); }

.quay .name { width: 15%; display: flex; align-items: center; justify-content: center; }
.quay .lines { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; width: 85%; }

.line {
  background: var(--color--secondary-blue);
  color: var(--color--neutral-white);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.line:hover { background: #0e8ebd; transform: scale(1.05); }

/* ---------------- SETTINGS ---------------- */
#settings { display: flex; flex-direction: column; height: 100%; }
#settings form { flex: 1 1 auto; display: flex; flex-direction: column; gap: 20px; }

#settings fieldset {
  border: 1px solid var(--color--neutral-grey);
  border-radius: 15px;
  padding: 15px;
}

#settings legend { font-weight: bold; }

#settings label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#settings input[type="checkbox"],
#settings input[type="radio"] { accent-color: var(--color--primary-green); }

#settings button {
  padding: 15px;
  border-radius: 20px;
  font-size: 1.2rem;
  background: var(--color--primary-green);
  color: var(--color--neutral-white);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.2s;
}

#settings button:hover { transform: scale(1.03); box-shadow: var(--shadow-hover); }

/* ---------------- URL ---------------- */
#url a { font-family: Arial, Helvetica, sans-serif; color: var(--color--primary-darkgreen); word-break: break-word; }

/* ================= INPUTS ================= */
input[type="text"], input[type="number"] {
  width: calc(100% - 40px);
  max-width: 500px;             /* limite la largeur pour que ça reste compact */
  padding: 15px;
  border-radius: 25px;          /* un peu plus arrondi */
  border: 2px solid rgba(0,0,0,0.1); /* bord subtil */
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* légère profondeur */
  font-size: 1.2rem;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.2s;
  display: block;
  margin: 0 auto 25px auto;     /* centre horizontalement + espace en bas */
  text-align: center;           /* centre le texte à l’intérieur */
}

input[type="text"]:focus,
input[type="number"]:focus {
  box-shadow: 0 0 15px rgba(118,197,18,0.5); /* glow vert */
  border-color: #78d700;       /* bord vert vif au focus */
  transform: scale(1.02);      /* léger effet zoom */
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: gray;
  text-align: center;           /* placeholder centré */
  opacity: 0.7;
}

/* ================= FOOTER ================= */
#footer {
  text-align: center;
  padding: 15px 20px;
  background: linear-gradient(90deg, #0b1f00, #0f3d00); /* même gradient que le header */
  color: white;
  font-family: "Naotypo_web", "Tahoma", "Arial", sans-serif;
  font-size: 0.9rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin-top: 20px;
}

#footer a {
  color: #78d700;          /* couleur verte assortie */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

#footer a:hover {
  color: #abe604;           /* effet au survol */
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  #footer {
    font-size: 0.8rem;
    padding: 12px 15px;
  }
}

/* ================= ANIMATIONS ================= */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .stop, .quay, .line { font-size: 1rem; padding: 12px; }
  #container { padding: 15px; }
  .quay .name { width: 20%; }
  .quay .lines { width: 80%; }
}

/* ================= LEGAL CARD ================= */
.legalcard {
  background: #ffffff;
  max-width: 900px;
  margin: 40px auto 80px auto;   /* centrée + espace en bas */
  padding: 35px 40px;
  border-radius: 26px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

/* TITRE PRINCIPAL */
.legalcard h1 {
  font-size: clamp(26px, 4vw, 38px);
  color: #143c00;
  margin-bottom: 30px;
  font-family: "Naotypo_web", "Tahoma", Arial, sans-serif;
}

/* SOUS-TITRES */
.legalcard h2 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 10px;
  color: #0f3d00;
  font-family: "Naotypo_web", "Tahoma", Arial, sans-serif;
}

/* PARAGRAPHES */
.legalcard p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 12px;
}

/* LISTES */
.legalcard ul {
  margin: 15px 0 15px 20px;
}

.legalcard li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* NOTES / INFOS */
.legalcard .note {
  font-size: 14px;
  color: #6b6b6b;
  margin-top: 10px;
}

/* LIENS */
.legalcard a {
  color: #11a8e0;
  text-decoration: none;
  font-weight: 600;
}

.legalcard a:hover {
  text-decoration: underline;
}

/* LIEN RETOUR */
.legalcard .back-link {
  display: inline-block;
  margin-top: 35px;
  font-weight: bold;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .legalcard {
    padding: 25px 22px;
    margin: 25px 15px 60px 15px;
  }

  .legalcard h2 {
    font-size: 20px;
  }

  .legalcard p {
    font-size: 15px;
  }
}