/* ===========================
   Thèmes (par défaut = Nuit)
   =========================== */

:root{
  --bg:#0b0c10;
  --card:rgba(18,20,27,.90);
  --text:#e8e8ea;
  --muted:#a9acb6;
  --border:rgba(255,255,255,.12);
  --btn:#1f2330;
  --btnHover:#2a3040;
  --radius:18px;

  --shadow:0 20px 60px rgba(0,0,0,.45);
  --surface:rgba(255,255,255,.03);
  --dash:rgba(255,255,255,.08);
  --logoBg:#0f1118;
  --planningBg:#0f1118;

  --codeBg:rgba(255,255,255,.06);
  --codeBorder:rgba(255,255,255,.10);
}

/* Mode Jour */
[data-theme="light"]{
  --bg:#f5f6f8;
  --card:rgba(255,255,255,.92);
  --text:#14151a;
  --muted:#5b5f6b;
  --border:rgba(0,0,0,.12);
  --btn:#f0f2f6;
  --btnHover:#e6e9f0;

  --shadow:0 20px 60px rgba(0,0,0,.14);
  --surface:rgba(0,0,0,.03);
  --dash:rgba(0,0,0,.10);
  --logoBg:rgba(0,0,0,.04);
  --planningBg:rgba(0,0,0,.04);

  --codeBg:rgba(0,0,0,.05);
  --codeBorder:rgba(0,0,0,.10);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  background:radial-gradient(1200px 700px at 30% 0%, rgba(120,130,180,.18) 0%, var(--bg) 55%);
  color:var(--text);
  padding:24px;
}

.card{
  width:100%;
  max-width:980px;
  margin:0 auto;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}

/* --- Logo centré en haut, RESPONSIVE, ne dépasse jamais --- */
.logoWrap{
  display:flex;
  justify-content:center;
  margin-bottom:10px;

  /* Important : on évite que le padding de la card + logo cause un dépassement */
  max-width:100%;
}

.logoTop{
  /* Taille fluide + bornée */
  width: clamp(110px, 34vw, 190px);
  height: clamp(110px, 34vw, 190px);

  /* Sécurité anti-dépassement */
  max-width:100%;
  max-height:100%;

  object-fit:contain;
  border-radius:14px;
  background:var(--logoBg);
  border:1px solid var(--border);

  /* Padding fluide, mais borné aussi */
  padding:clamp(6px, 1.6vw, 12px);

  /* Le logo ne doit jamais rétrécir “bizarrement” dans un flex */
  flex:0 0 auto;
}

.header{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:10px;
}

.title{min-width:0;}
h1{margin:0;font-size:28px; line-height:1.15}
.tagline{margin:2px 0 0;color:var(--muted)}
.description{margin:14px 0 18px;opacity:.92}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  min-width:0;
}

h2{margin:0 0 10px;font-size:18px}

.line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
  border-bottom:1px dashed var(--dash);
}
.line:last-child{border-bottom:none}

.k{color:var(--muted)}
.v{color:var(--text);text-decoration:none; text-align:right; word-break:break-word}
.v:hover{text-decoration:underline}

.actions{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}

.btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--btn);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  text-align:center;
}
.btn:hover{background:var(--btnHover)}

.hours{
  list-style:none;
  padding:0;
  margin:0;
}
.hours li{
  display:flex;
  justify-content:space-between;
  padding:6px 0;
  border-bottom:1px dashed var(--dash);
}
.hours li:last-child{border-bottom:none}
.day{color:var(--muted)}
.open{color:var(--text); text-align:right}

.planning{
  width:100%;
  max-width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--planningBg);
  display:block;
}

code{
  background:var(--codeBg);
  padding:2px 6px;
  border-radius:8px;
  border:1px solid var(--codeBorder);
}

.footer{
  margin-top:14px;
  color:var(--muted);
  text-align:center;
}

/* ---- Liens utiles en boutons ---- */
.links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.linkbtn{
  display:inline-block;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--btn);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition: transform .05s ease;
  text-align:center;
}
.linkbtn:hover{ background:var(--btnHover); }
.linkbtn:active{ transform: translateY(1px); }

/* ---- Bouton Jour/Nuit ---- */
.toggle{
  margin-left:auto;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--btn);
  color:var(--text);
  cursor:pointer;
  white-space:nowrap;
}
.toggle:hover{ background:var(--btnHover); }

/* ===========================
   Responsive smartphone
   =========================== */
@media (max-width: 820px){
  body{ padding:14px; }
  .card{ padding:16px; }

  .header{
    flex-wrap:wrap;
    gap:10px;
  }

  h1{ font-size:24px; }

  .grid{
    grid-template-columns:1fr;
  }

  .actions .btn{
    flex:1 1 calc(50% - 10px);
  }

  .links{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .linkbtn{
    width:100%;
  }
}

@media (max-width: 380px){
  .links{ grid-template-columns:1fr; }
  .actions .btn{ flex:1 1 100%; }
}
