/* ============================================================
   Kebabs de Rezé — reprise du design "affiche dessinée"
   Palette : fond #f0ebe0 · encre #111 · orange #E85518
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; min-height: 100vh;
  background: #111;
  font-family: 'Space Mono', monospace;
}

#page {
  width: 100%;
  min-height: 100vh;
  background: #f0ebe0;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
}

/* ── Fond texture ── */
#page::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 10px 10px;
  pointer-events: none;
  z-index: 0;
}

/* ── Spray orange ── */
.spray { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0; }
.spray-1 { width: 500px; height: 400px; background: #E85518; opacity: 0.12; bottom: -80px; left: -100px; }
.spray-2 { width: 350px; height: 280px; background: #E85518; opacity: 0.10; top: 100px; right: -80px; }

/* ── Colonne gauche ── */
.col-left {
  grid-column: 1; grid-row: 1/3;
  padding: 32px 40px 32px 44px;
  display: flex; flex-direction: column;
  justify-content: flex-start; gap: 20px;
  position: relative; z-index: 2; overflow: hidden;
}
.col-left::after {
  content: ''; position: absolute; right: 0; top: 5%; bottom: 5%;
  width: 3px; background: #111; border-radius: 2px; opacity: 0.15;
}

/* Titre */
.titre { flex-shrink: 0; }
.titre-line {
  font-family: 'Bangers', cursive;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.90; letter-spacing: 3px;
  color: #111; display: block;
}
.titre-line.orange { color: #E85518; }
.titre-slogan {
  font-family: 'Bangers', cursive;
  font-size: clamp(22px, 3vw, 48px);
  color: #E85518; letter-spacing: 2px;
  margin-top: 2px; display: block;
}

/* Illustration kebab + frites */
.illustration { flex: 1; display: flex; align-items: flex-end; padding-top: 24px; min-height: 0; }
.illustration svg { width: 100%; max-width: 460px; height: auto; }

/* ── Colonne droite — carte MapLibre ── */
.col-right {
  grid-column: 2; grid-row: 1/3;
  position: relative; z-index: 2; overflow: hidden;
  border-left: 3px solid #111;
}
.map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  min-height: 100vh;
}

/* ── Footer ── */
.footer {
  grid-column: 1/3; grid-row: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 44px; border-top: 3px solid #111;
  position: relative; z-index: 2; background: #f0ebe0;
  white-space: nowrap; gap: 16px;
}
.footer-tag { font-family: 'Permanent Marker', cursive; font-size: clamp(14px, 1.8vw, 22px); color: #E85518; }
.footer-url { font-family: 'Space Mono', monospace; font-size: clamp(11px, 1.2vw, 16px); font-weight: 700; color: #111; opacity: 0.6; }
.badge-footer { transform: rotate(8deg); flex-shrink: 0; }

/* ── Marqueur logo (POI) ── */
.kebab-marker {
  width: 60px; height: 60px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  /* ombre qui épouse la forme du logo (pas un rond) pour rester lisible sur la carte */
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.4));
  cursor: pointer;
  transition: transform 0.12s ease;
}
.kebab-marker:hover { transform: scale(1.12); }

/* ── Popup kebab (MapLibre) ── */
.kebab-popup { font-family: 'Space Mono', monospace; color: #111; min-width: 180px; }
.kebab-popup__name { font-family: 'Bangers', cursive; font-size: 20px; letter-spacing: 1px; color: #E85518; display: block; }
.kebab-popup__rating { font-size: 13px; margin: 2px 0 4px; }
.kebab-popup__rating span { color: #444; }
.kebab-popup__sub { font-size: 12px; margin: 2px 0 5px; color: #2a1402; }
.kebab-popup__addr { font-size: 11px; opacity: 0.75; }
.kebab-popup__desc { font-size: 12px; margin-top: 6px; }
.maplibregl-popup-content { border: 3px solid #111; border-radius: 6px; padding: 12px 14px; }

/* Le responsive de l'accueil est défini EN FIN DE FICHIER (après les règles de
   base .home-nav / .nav-card) : les @media n'ajoutent pas de spécificité, donc
   il doit venir APRÈS pour l'emporter sur l'ordre des règles. */

/* ============================================================
   ACCUEIL — les 2 entrées (carte / classement)
   ============================================================ */
.home-nav {
  grid-column: 2; grid-row: 1 / 3;
  display: flex; flex-direction: column; gap: 18px;
  padding: 30px 40px 30px 34px;
  position: relative; z-index: 2;
}
.nav-card {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 28px;
  border: 3px solid #111; border-radius: 16px;
  text-decoration: none; color: #111; overflow: hidden;
  box-shadow: 7px 7px 0 #111;
  transition: transform .14s ease, box-shadow .14s ease;
}
@media (hover: hover) {
  .nav-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 #111; }
  .nav-card:hover .nav-card__arrow { transform: translateX(6px); }
}
.nav-card:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #111; }
.nav-card--map  { background: #ede8dc; }
.nav-card--list { background: #E85518; }
.nav-card__deco { position: absolute; right: 0; top: 0; width: 68%; height: auto; pointer-events: none; }
.nav-card__kicker {
  position: relative; font-family: 'Permanent Marker', cursive;
  font-size: 16px; color: #E85518; margin-bottom: 6px;
}
.nav-card--list .nav-card__kicker { color: #111; }
.nav-card__title {
  position: relative; font-family: 'Bangers', cursive;
  font-size: clamp(38px, 4.6vw, 74px); line-height: 0.84; letter-spacing: 2px; color: #111;
}
.nav-card--list .nav-card__title { color: #f0ebe0; }
.nav-card__sub {
  position: relative; font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700;
  margin-top: 14px; color: #111; display: flex; align-items: center; gap: 10px;
}
.nav-card--list .nav-card__sub { color: #2a1402; }
.nav-card__arrow { font-family: 'Bangers', cursive; font-size: 26px; line-height: 1; transition: transform .14s ease; }

/* ============================================================
   BASCULE DE VUE (liste / carte) + bouton retour
   ============================================================ */
.switch {
  display: inline-flex; vertical-align: middle; margin-left: 14px;
  border: 3px solid #111; border-radius: 999px; overflow: hidden;
  background: #f0ebe0; box-shadow: 3px 3px 0 #111;
}
.switch a {
  font-family: 'Bangers', cursive; font-size: 20px; letter-spacing: 1px;
  text-decoration: none; color: #111; padding: 5px 20px 2px; line-height: 1.25;
}
.switch a.is-on { background: #E85518; color: #f0ebe0; }
.switch a:not(.is-on):hover { background: #111; color: #f0ebe0; }
.pill-back {
  display: inline-block; font-family: 'Space Mono', monospace; font-weight: 700; font-size: 13px;
  text-decoration: none; color: #111; background: #f0ebe0;
  border: 2px solid #111; border-radius: 999px; padding: 7px 16px;
  box-shadow: 3px 3px 0 #111; transition: transform .12s, box-shadow .12s;
}
.pill-back:hover  { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #111; }
.pill-back:active { transform: translate(2px, 2px);   box-shadow: 1px 1px 0 #111; }

/* ============================================================
   VUE LISTE — le classement
   ============================================================ */
.sheet {
  position: relative; min-height: 100vh; background: #f0ebe0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 10px 10px; padding-bottom: 56px; overflow: hidden;
}
.sheet-head { position: relative; z-index: 2; max-width: 940px; margin: 0 auto; padding: 36px 24px 8px; }
.sheet-title { font-family: 'Bangers', cursive; font-size: clamp(54px, 10vw, 128px); line-height: 0.82; letter-spacing: 3px; color: #111; margin-top: 20px; }
.sheet-title .o { color: #E85518; }
.sheet-kicker { font-family: 'Space Mono', monospace; font-size: 14px; color: #444; max-width: 560px; margin-top: 12px; }

.rank { position: relative; z-index: 2; list-style: none; max-width: 940px; margin: 26px auto 0; padding: 0 24px; }
.rank-item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 24px; align-items: center;
  padding: 22px 6px; border-top: 3px solid #111;
}
.rank-item:last-child { border-bottom: 3px solid #111; }
.rank-item.is-first { background: linear-gradient(90deg, rgba(232,85,24,0.12), transparent 72%); }
.rank-num { font-family: 'Bangers', cursive; font-size: 70px; line-height: 0.8; color: #111; text-align: center; }
.rank-item.is-first .rank-num { color: #E85518; font-size: 92px; }
.rank-flag {
  display: inline-block; font-family: 'Permanent Marker', cursive; font-size: 13px; color: #f0ebe0;
  background: #E85518; border: 2px solid #111; padding: 2px 11px; border-radius: 999px;
  margin-bottom: 7px; transform: rotate(-2deg);
}
.rank-name { font-family: 'Bangers', cursive; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: 1px; color: #111; line-height: 0.95; }
.rank-addr { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700; color: #E85518; margin-top: 4px; }
.rank-crit { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.rank-crit li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
.rank-crit__k {
  flex-shrink: 0; white-space: nowrap;
  font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; color: #111;
  background: #fff; border: 2px solid #111; border-radius: 999px; padding: 2px 9px;
}
.rank-crit__k b { color: #E85518; }
.rank-crit__c { font-family: 'Space Mono', monospace; font-size: 12px; color: #444; font-style: italic; }
.rank-desc { font-family: 'Space Mono', monospace; font-size: 13px; color: #444; margin-top: 8px; max-width: 54ch; }
.rank-score { text-align: right; min-width: 116px; }
.flames { font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.flames .off { filter: grayscale(1); opacity: 0.25; }
.score-num { font-family: 'Bangers', cursive; font-size: 34px; color: #111; line-height: 1; margin-top: 3px; }
.score-num span { font-size: 16px; color: #9a9a90; }
.rank-empty { font-family: 'Space Mono', monospace; padding: 40px 6px; color: #444; border-top: 3px solid #111; border-bottom: 3px solid #111; }

.sheet-foot {
  position: relative; z-index: 2; max-width: 940px; margin: 36px auto 0; padding: 14px 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 3px solid #111;
}

/* ============================================================
   VUE CARTE — plein écran
   ============================================================ */
.map-screen { position: fixed; inset: 0; }
.map-fs { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-overlay {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  padding: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.map-brand {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 11px; text-decoration: none;
  background: #f0ebe0; border: 3px solid #111; border-radius: 12px; padding: 8px 14px;
  box-shadow: 4px 4px 0 #111; transition: transform .12s, box-shadow .12s;
}
.map-brand:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 #111; }
.map-brand img { display: block; border-radius: 4px; }
.map-brand__txt { font-family: 'Bangers', cursive; font-size: 22px; letter-spacing: 1px; color: #111; line-height: 0.9; display: flex; flex-direction: column; }
.map-brand__txt small { font-family: 'Space Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0; color: #E85518; }
.switch--float { margin-left: 0; pointer-events: auto; }

/* ── Responsive vues liste / carte ── */
@media (max-width: 700px) {
  .rank-item { grid-template-columns: 56px 1fr; gap: 14px; }
  .rank-num { font-size: 48px; }
  .rank-item.is-first .rank-num { font-size: 60px; }
  .rank-score { grid-column: 2; text-align: left; margin-top: 4px; }
  .flames { font-size: 17px; }
  .switch a { font-size: 18px; padding: 5px 16px 2px; }
}

/* ============================================================
   Responsive : PAGE D'ACCUEIL
   (placé en fin de fichier pour passer APRÈS les bases .home-nav / .nav-card)
   ============================================================ */
@media (max-width: 700px) {
  #page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto; /* zone des cartes extensible, footer collé en bas */
    min-height: 100vh;
    min-height: 100svh;                /* évite le saut lié à la barre d'adresse mobile */
    overflow-x: hidden;
  }
  .col-left {
    grid-column: 1; grid-row: 1;
    padding: 26px 22px 4px; gap: 10px;
    align-items: center; text-align: center; /* hero centré façon affiche */
  }
  .col-left::after { display: none; }
  .titre-line { font-size: clamp(46px, 15vw, 84px); letter-spacing: 1px; }
  .titre-slogan { font-size: clamp(24px, 7vw, 42px); }
  .illustration {
    flex: 0 0 auto; justify-content: center; align-items: center;
    padding-top: 4px; max-height: 27vh;
  }
  .illustration svg { max-width: 240px; max-height: 27vh; }

  .home-nav {
    grid-column: 1; grid-row: 2;
    padding: 8px 20px 18px; gap: 14px; justify-content: center;
  }
  .nav-card { min-height: 118px; padding: 20px 22px; border-radius: 14px; box-shadow: 5px 5px 0 #111; }
  .nav-card__deco { width: 52%; }
  .nav-card__kicker { font-size: 15px; margin-bottom: 4px; }
  .nav-card__title { font-size: clamp(34px, 12vw, 56px); letter-spacing: 1px; }
  .nav-card__sub { margin-top: 10px; font-size: 11.5px; }

  .footer {
    grid-column: 1; grid-row: 3;
    flex-wrap: wrap; justify-content: center; text-align: center;
    gap: 6px 14px; padding: 12px 20px 16px;
  }
  .footer-tag { font-size: 18px; }
  .footer-url { font-size: 12px; }
  .badge-footer svg { width: 58px; height: 58px; }
}

@media (max-width: 420px) {
  .titre-line { font-size: clamp(40px, 16vw, 60px); }
  .illustration svg { max-width: 200px; max-height: 23vh; }
  .nav-card { min-height: 106px; padding: 16px 18px; }
  .nav-card__title { font-size: clamp(30px, 11.5vw, 46px); }
  .nav-card__kicker { font-size: 14px; }
}

/* ── Révélation à l'ouverture (accueil) ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes kebRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .titre-line, .titre-slogan, .illustration, .nav-card {
    animation: kebRise .55s cubic-bezier(.2, .7, .2, 1) backwards;
  }
  .titre-line:nth-child(1) { animation-delay: .03s; }
  .titre-line:nth-child(2) { animation-delay: .09s; }
  .titre-line:nth-child(3) { animation-delay: .15s; }
  .titre-slogan { animation-delay: .21s; }
  .illustration { animation-delay: .27s; }
  .nav-card--map  { animation-delay: .32s; }
  .nav-card--list { animation-delay: .40s; }
}

/* ============================================================
   AUTH — connexion / inscription
   ============================================================ */
.login-page {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: #f0ebe0; padding: 24px;
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 10px 10px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff;
  border: 3px solid #111; border-radius: 12px; padding: 30px 28px;
  box-shadow: 8px 8px 0 #111;
}
.login-card h1 {
  font-family: 'Bangers', cursive; font-size: 40px; letter-spacing: 2px;
  color: #E85518; line-height: 0.95; margin-bottom: 4px;
}
.login-card .sub { font-family: 'Space Mono', monospace; font-size: 12px; color: #444; margin-bottom: 18px; }
.login-card label { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 12px; display: block; margin: 14px 0 4px; }
.login-card input {
  width: 100%; padding: 10px 12px; font-family: 'Space Mono', monospace; font-size: 14px;
  border: 2px solid #111; border-radius: 6px; background: #f0ebe0;
}
.login-card button {
  width: 100%; margin-top: 22px; padding: 12px;
  font-family: 'Bangers', cursive; font-size: 22px; letter-spacing: 1px;
  color: #fff; background: #E85518; border: 3px solid #111; border-radius: 6px;
  cursor: pointer; box-shadow: 3px 3px 0 #111;
}
.login-card button:active { transform: translate(3px, 3px); box-shadow: none; }
.login-error, .auth-flash {
  font-family: 'Space Mono', monospace; font-size: 12px; line-height: 1.45;
  border: 2px solid #111; border-radius: 6px; padding: 9px 11px; margin-bottom: 10px;
}
.login-error { color: #fff; background: #bb2010; }
.auth-flash { color: #163d12; background: #cdeac0; }
.auth-alt {
  display: block; text-align: center; margin-top: 16px; padding-top: 14px;
  font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700;
  color: #111; text-decoration: none; border-top: 2px dashed rgba(17, 17, 17, .25);
}
.auth-alt:hover { color: #E85518; }
/* erreurs de validation des formulaires Symfony */
.login-card ul { list-style: none; }
.login-card ul li {
  font-family: 'Space Mono', monospace; font-size: 11px; color: #bb2010; margin-top: 4px;
}

/* ============================================================
   FICHE KEBAB
   ============================================================ */
.fiche {
  position: relative; z-index: 2; max-width: 1000px; margin: 6px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start;
}
.fiche-name { font-family: 'Bangers', cursive; font-size: clamp(40px, 6vw, 80px); letter-spacing: 2px; color: #111; line-height: 0.86; }
.fiche-addr { font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 700; color: #E85518; margin-top: 8px; }
.fiche-score { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.fiche-score__num { font-family: 'Bangers', cursive; font-size: 34px; color: #111; line-height: 1; }
.fiche-score__num span { font-size: 16px; color: #9a9a90; }
.fiche-score__lbl { font-family: 'Space Mono', monospace; font-size: 11px; color: #444; text-transform: uppercase; letter-spacing: 1px; }
.fiche-desc {
  font-family: 'Space Mono', monospace; font-size: 14px; color: #333; line-height: 1.5;
  margin-top: 16px; max-width: 60ch; border-left: 4px solid #E85518; padding-left: 14px;
}

.fiche-crits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.crit-card { background: #fff; border: 3px solid #111; border-radius: 12px; padding: 16px; box-shadow: 5px 5px 0 #111; }
.crit-card__head { display: flex; align-items: baseline; gap: 8px; }
.crit-card__emoji { font-size: 22px; }
.crit-card__label { font-family: 'Bangers', cursive; font-size: 22px; letter-spacing: 1px; color: #111; }
.crit-card__num { margin-left: auto; font-family: 'Bangers', cursive; font-size: 22px; color: #E85518; }
.crit-card__num span { font-size: 12px; color: #9a9a90; }
.crit-card .flames { font-size: 14px; margin: 8px 0 7px; }
.crit-card__txt { font-family: 'Space Mono', monospace; font-size: 12px; color: #444; font-style: italic; line-height: 1.45; }
.crit-card__empty { font-family: 'Space Mono', monospace; font-size: 12px; color: #aaa; }

.fiche-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.fiche-map { height: 300px; border: 3px solid #111; border-radius: 12px; overflow: hidden; box-shadow: 5px 5px 0 #111; }
.fiche-go {
  display: block; text-align: center; text-decoration: none;
  font-family: 'Bangers', cursive; font-size: 24px; letter-spacing: 1px; color: #f0ebe0;
  background: #111; border: 3px solid #111; border-radius: 10px; padding: 12px;
  box-shadow: 5px 5px 0 #E85518; transition: transform .12s, box-shadow .12s;
}
.fiche-go:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #E85518; }
.fiche-go:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #E85518; }

@media (max-width: 820px) {
  .fiche { grid-template-columns: 1fr; }
  .fiche-side { position: static; }
}
@media (max-width: 540px) {
  .fiche-crits { grid-template-columns: 1fr; }
}

/* Nom cliquable dans le classement */
.rank-name a { color: inherit; text-decoration: none; }
.rank-name a:hover { color: #E85518; }

/* Lien "voir la fiche" dans la popup carte */
.kebab-popup__link {
  display: inline-block; margin-top: 8px;
  font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700;
  color: #E85518; text-decoration: none;
}
.kebab-popup__link:hover { text-decoration: underline; }

/* ============================================================
   CARTE D'ADMINISTRATION (ajout de POI)
   ============================================================ */
.adminmap-screen { position: fixed; inset: 0; background: #ede8dc; }
.adminmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.adminmap-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none;
  padding: 14px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
}
.adminmap-bar .map-brand { pointer-events: auto; }
.adminmap-hint {
  align-self: center; pointer-events: none;
  font-family: 'Space Mono', monospace; font-size: 12px; color: #111;
  background: #f0ebe0; border: 2px solid #111; border-radius: 999px;
  padding: 7px 14px; box-shadow: 3px 3px 0 #111;
}
.adminmap-hint b { color: #E85518; }

.poi-pop, .poi-add { font-family: 'Space Mono', monospace; min-width: 150px; }
.poi-pop b, .poi-add b { font-family: 'Bangers', cursive; font-size: 18px; letter-spacing: .5px; color: #E85518; display: block; }
.poi-add__coords { display: block; font-size: 10px; color: #777; margin-top: 2px; }
.poi-pop a, .poi-add a {
  display: inline-block; margin-top: 7px; font-size: 12px; font-weight: 700;
  color: #111; text-decoration: none; border-bottom: 2px solid #E85518;
}
.poi-pop a:hover, .poi-add a:hover { color: #E85518; }
