:root{
  --bg:#f7f5f0;
  --card:#fff;
  --soft:#faf4e6;
  --line:#eadfcd;
  --text:#333;
  --muted:#666;
  --gold:#c59b3b;
  --navy:#0b1b3b;
  --radius:12px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.6;
  background:var(--bg);
  color:var(--text);
}

.wrap{
  max-width:980px;
  margin:0 auto;
  background:var(--card);
  min-height:100vh;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

/* =========================
   HEADER
========================= */
/*
header{
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  position:sticky;
  top:0;
  background:#fff;
  z-index:10;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:240px;
}
.brand svg{height:54px;width:auto;display:block}

/* nav a{
  color:var(--text);
  text-decoration:none;
  font-size:.92rem;
  margin-left:12px;
  white-space:nowrap;
}
nav a:hover{color:#b18124}
*/

main{padding:18px}

h1{font-size:1.5rem;margin:6px 0 10px}
h2{font-size:1.2rem;margin:18px 0 8px}

/* =========================
   CARDS / LAYOUT
========================= */
.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px 16px;
}

.soft{background:var(--soft)}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

/* =========================
   BOUTONS
========================= */
.btn{
  display:inline-block;
  border-radius:999px;
  padding:12px 20px;
  text-decoration:none;
  font-weight:600;
  border:1px solid transparent;
  font-size:16px;
}

.btn-primary{background:var(--gold);color:#fff}

.btn-secondary{
  background:#fff;
  border-color:#d6c7aa;
  color:var(--text);
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}
.btn-secondary:hover{border-color:#cbb88f}

.btn-danger{
  background:#d9534f;
  color:#fff;
  border-color:#d9534f;
}

.btn-danger:hover{
  background:#c9302c;
  border-color:#c9302c;
}

.btn-cancel{
  background:#1e7bd7;
  color:#fff;
  border-color:#1e7bd7;
}

.btn-cancel:hover{
  background:#1667b3;
  border-color:#1667b3;
}
button.btn{
  -webkit-appearance:none;
  appearance:none;
  font:inherit;
  font-size:inherit;
  line-height:1.2;
  cursor:pointer;
}

/* =========================
   DIVERS
========================= */
.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:#f2efe8;
  border:1px solid #e2ddd3;
  font-size:.85rem;
  color:var(--muted);
}

small,.muted{color:var(--muted)}

.list{list-style:none;padding:0;margin:0}
.list li{padding:10px 0;border-bottom:1px solid #f1e6d6}
.list li:last-child{border-bottom:none}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================
   SLOTS : boutons cr?neaux
========================= */
.slotbtn{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e2ddd3;
  border-radius:12px;
  background:#faf7f2;
  text-decoration:none;
  color:var(--text);
}
.slotbtn:hover{border-color:#d6c7aa}
.badge{font-size:.82rem;color:var(--muted)}

button.slotbtn{
  width:100%;
  -webkit-appearance:none;
  appearance:none;
  cursor:pointer;
}

/* =========================
   FORMULAIRES
========================= */
form label{display:block;font-size:.9rem;margin-top:10px}

input,textarea,select{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d9d3c7;
  font:inherit;
  background:#fff;
}

textarea{min-height:90px}

.actions{margin-top:12px;display:flex;gap:10px;flex-wrap:wrap}
.notice{font-size:.9rem;color:var(--muted);margin-top:8px}

input[type="radio"],
input[type="checkbox"]{
  width:auto;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
}

/* =========================
   FOCUS
========================= */
a:focus,button:focus,input:focus,textarea:focus,select:focus{outline:none}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  box-shadow:0 0 0 3px rgba(197,155,59,.35);
  border-color:#d6c7aa;
}

/* =========================
   CALENDRIER
========================= */
table.calendar{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  margin-top:16px;
  font-size:15px;
}

table.calendar th,
table.calendar td{
  border:1px solid #e0e0e0;
  text-align:center;
  vertical-align:middle;
  padding:4px;
}

table.calendar th{
  background:#fafafa;
  font-weight:bold;
  color:#555;
}

table.calendar td{
  height:72px;
  background:#fff;
}

table.calendar td.empty{background:#fdfdfd}

table.calendar td a{
  text-decoration:none;
  display:block;
  width:100%;
  height:100%;
  padding:6px 2px;
  border-radius:8px;
  color:inherit;
}

table.calendar td a:hover{background:#e7f3ff}

.daybox,
table.calendar td a{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
}

.daynum{
  font-size:18px;
  font-weight:700;
  margin-bottom:6px;
}

.mark-ok{
  color:#0a8800;
  font-size:24px;
  font-weight:800;
  text-shadow:
  0.8px 0   currentColor,
 -0.8px 0   currentColor,
  0   0.8px currentColor,
  0  -0.8px currentColor;
}
.mark-full{color:#cc0000;font-size:24px;font-weight:800}
.mark-none{color:#bbbbbb;font-size:22px;font-weight:800}

.full-day{opacity:.6}
.out-range{background:#f7f7f7}
.today{box-shadow: inset 0 0 0 2px #4a90e2}

/* ===== AJOUT: Cong?s annuels / jours ferm?s (?) ===== */
table.calendar td.closed-day{
  background:#fff1f1;
}
.mark-closed{
  color:#cc0000;
  font-size:24px;
  font-weight:800;
}

/* ===== AJOUT: Fermeture hebdomadaire (??) ===== */
table.calendar td.weekly-closed{
  background:#f6f6f6;
}
.mark-weekly{
  color:#555;
  font-size:20px;
  font-weight:700;
}

/* =========================
   BOOK.PHP
========================= */
.mode-row{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:10px 0 12px;
  padding-left:.75rem;
}

.mode-row label.mode-option{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  white-space:nowrap;
  line-height:1.25;
}

.book-main{max-width:900px;margin:0 auto}
.book-main .card{width:100%}

.date-field{
  display:flex;
  align-items:center;
  gap:10px;
  max-width:420px;
}

.date-ico{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d9d3c7;
  border-radius:10px;
  background:#fff;
  color:var(--muted);
}

.date-field input[type="date"]{
  flex:1 1 auto;
  min-width:0;
}

.date-field input[type="date"]::-webkit-calendar-picker-indicator{
  opacity:0;
  cursor:pointer;
}

/* =========================
   SLOTS.PHP : FIX iPhone FINAL (WRAPPER .date-wrap)
========================= */
.slot-date-form{
  /* rien d?obligatoire ici */
}

.slot-date-form .date-wrap{
  border:1px solid #d9d3c7;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}

.slot-date-form .date-wrap input[type="date"]{
  display:block;
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;

  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;

  padding:10px 14px;

  text-align:left;

  color:var(--text);
  -webkit-text-fill-color:var(--text);
}

.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit,
.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit-text,
.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit-month-field,
.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit-day-field,
.slot-date-form .date-wrap input[type="date"]::-webkit-datetime-edit-year-field{
  padding-left:12px;
}

/* =========================
   RESPONSIVE GLOBAL
========================= */
@media(max-width:768px){
  /* header{flex-direction:column;align-items:flex-start} */
  /* nav{display:flex;flex-wrap:wrap;gap:10px} */
  /* nav a{margin-left:0} */
  .grid{grid-template-columns:1fr}
  .brand svg{height:76px}
}

@media(max-width:520px){
  table.calendar td{height:84px}
  .daynum{font-size:20px}
  .mark-ok,.mark-full{font-size:28px}
  .mark-none{font-size:26px}

  .mark-closed{font-size:28px}
  .mark-weekly{font-size:26px}

  /* Smartphone : on garde le cercle fin */
  .mark-ok{ text-shadow:none; }

  .date-field{
    max-width:320px;
    margin:0 auto;
  }

  .date-ico{display:none}

  .mode-row label.mode-option{
    white-space:normal;
  }
}

/* =========================
   BOOK: R?sum? (JA ? gauche / FR ? droite)
   - Desktop: 2 colonnes
   - Smartphone: JA au-dessus de FR
   (isol?: n'affecte pas index/calendar/slots)
========================= */
.book-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:start;
}

.book-summary-ja,
.book-summary-fr{
  font-size:15px;
  line-height:1.7;
}

.book-summary p{
  margin:0 0 6px;
  font-weight:400;
  padding-left:0;
  margin-left:0;
  text-indent:0;
}

/* Gras: service + date (lignes 2 et 3) dans les 2 langues */
.book-summary .book-summary-ja p:nth-child(2),
.book-summary .book-summary-ja p:nth-child(3),
.book-summary .book-summary-fr p:nth-child(2),
.book-summary .book-summary-fr p:nth-child(3){
  font-weight:700;
}

@media(max-width:520px){
  .book-summary{
    grid-template-columns:1fr;
    gap:14px;
  }
  .book-summary-ja{
    border-bottom:1px solid var(--line);
    padding-bottom:10px;
  }
}

/* BOOK: correction optique du d?but de ligne avec ??? (Windows) */
.book-summary .book-summary-ja p:nth-child(2){
  position:relative;
  left:-0.60em; /* ajuste si besoin : -0.25em ? -0.45em */
}

