/* Réservation en ligne */
.booking { background: #fff; }
.mx { margin: 0 auto 36px; }
.rdv-box { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto; }
.rdv-box .step { background: var(--cream); border-radius: var(--radius); padding: 24px; border: 1px solid rgba(168,34,110,.12); }
.rdv-box h3 { font-size: 1.2rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.rdv-box h3 span { width: 30px; height: 30px; border-radius: 50%; background: var(--magenta); color: #fff; display: grid; place-items: center; font: 600 .9rem 'Jost', sans-serif; }
.rdv-box select, .rdv-box input, .rdv-box textarea, .admin input, .admin select {
  width: 100%; padding: 12px 14px; border: 1px solid #d9c3cf; border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink);
}
.rdv-box input:focus, .rdv-box select:focus, .rdv-box textarea:focus, .admin input:focus { outline: 2px solid var(--magenta); outline-offset: 1px; }
.rdv-box label, .admin label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 12px; }
.rdv-box label input, .rdv-box label textarea, .admin label input { margin-top: 4px; }
.hint { color: #7a6471; font-size: .92rem; margin-top: 8px; }
.hint.wide { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.cal-head button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--magenta); background: #fff; color: var(--magenta); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.cal-head button:hover:not(:disabled) { background: var(--magenta); color: #fff; }
.cal-head button:disabled { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow span { font-size: .75rem; font-weight: 600; color: var(--magenta); padding: 4px 0; }
.cal-grid button { aspect-ratio: 1; border: 0; border-radius: var(--radius); background: transparent; font: inherit; color: #b9a5b0; cursor: not-allowed; }
.cal-grid button.avail { background: #fff; color: var(--ink); font-weight: 500; cursor: pointer; border: 1px solid #ecd5e2; }
.cal-grid button.avail:hover { background: var(--rose); }
.cal-grid button.sel { background: var(--magenta); color: #fff; border-color: var(--magenta); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 12px; }
.slots button { padding: 10px 0; border-radius: var(--radius); border: 1px solid var(--magenta); background: #fff; color: var(--magenta); font: 500 .95rem 'Jost', sans-serif; cursor: pointer; }
.slots button:hover { background: var(--rose); }
.slots button.sel { background: var(--magenta); color: #fff; }

#rdvForm { grid-column: 1 / -1; }
#rdvForm .btn { width: 100%; cursor: pointer; font: inherit; font-weight: 500; }
#rdvForm .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.recap { margin: 6px 0 14px; font-weight: 500; color: var(--magenta); min-height: 1.5em; }
.form-msg { margin-top: 12px; text-align: center; }
.form-msg.err, .err { color: #b3261e; font-weight: 500; }
.done { grid-column: 1 / -1; text-align: center; padding: 40px 20px; background: var(--cream); border-radius: var(--radius); }
.done h3 { justify-content: center; font-size: 1.8rem; color: var(--magenta); }
#rdvBox:has(.done) { display: block; }

@media (max-width: 760px) { .rdv-box { grid-template-columns: 1fr; } }

/* Administration */
body.admin { background: var(--cream); min-height: 100vh; font-family: 'Jost', system-ui, sans-serif; color: var(--ink); }
.login { max-width: 360px; margin: 12vh auto; background: #fff; padding: 36px 30px; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(168,34,110,.18); text-align: center; }
.login img { margin: 0 auto 14px; border-radius: var(--radius); }
.login h1 { font-size: 1.5rem; margin-bottom: 18px; color: var(--magenta); }
.login label { text-align: left; }
.login .btn { width: 100%; cursor: pointer; font: inherit; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; background: var(--magenta); color: #fff; padding: 16px 5vw; }
.admin-bar h1 { font-size: 1.5rem; }
.admin-bar a { color: #fff; }
.admin-main { display: grid; grid-template-columns: 1fr 320px; gap: 30px; max-width: 1150px; margin: 30px auto; padding: 0 5vw; align-items: start; }
.admin h2.day { font-size: 1.15rem; text-transform: capitalize; color: var(--magenta); margin: 24px 0 10px; }
.empty { padding: 40px 0; color: #7a6471; }
.rdv { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 10px; border-left: 5px solid var(--gold); box-shadow: 0 3px 12px rgba(42,26,36,.06); }
.rdv.confirmed { border-left-color: #2e8b57; }
.rdv.cancelled { border-left-color: #999; opacity: .6; }
.rdv .time { font: 700 1.3rem 'Playfair Display', serif; color: var(--magenta); }
.rdv .time small { display: block; font: 400 .8rem 'Jost', sans-serif; color: #7a6471; }
.rdv .info { font-size: .93rem; }
.rdv .msg { font-style: italic; color: #5a4553; }
.badge { font-size: .72rem; padding: 2px 10px; border-radius: var(--radius); margin-left: 8px; background: #fbefd5; color: #8a6014; }
.badge.confirmed { background: #dff3e7; color: #1f6b41; }
.badge.cancelled { background: #eee; color: #666; }
.actions { display: flex; flex-direction: column; gap: 6px; }
.actions button { border: 0; border-radius: var(--radius); padding: 7px 12px; cursor: pointer; font: 500 .85rem 'Jost', sans-serif; color: #fff; }
.actions .ok { background: #2e8b57; } .actions .warn { background: var(--gold); } .actions .del { background: #b3261e; }
.admin aside { background: #fff; padding: 22px; border-radius: var(--radius); box-shadow: 0 3px 12px rgba(42,26,36,.06); }
.admin aside h2 { font-size: 1.1rem; margin-bottom: 14px; }
.admin aside .btn { width: 100%; cursor: pointer; font: inherit; }
@media (max-width: 860px) { .admin-main { grid-template-columns: 1fr; } .rdv { grid-template-columns: 64px 1fr; } .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }

/* Comptes clients */
/* Les éléments de la barre (nom, rôle, minuteur, boutons) sont de simples éléments de la barre du haut : tous sur la même ligne, ceux qui dépassent de l'écran passent à la ligne. */
.auth-bar { display: contents; }
.auth-bar > * { margin-top: 3px; margin-bottom: 3px; }
.auth-hello { font-size: .85rem; color: var(--ink); font-weight: 500; }
.auth-btn { font: 500 .82rem 'Jost', sans-serif; line-height: 1.2; padding: 4px 14px; border-radius: var(--radius); border: 1.5px solid var(--magenta); background: transparent; color: var(--magenta); text-decoration: none; cursor: pointer; white-space: nowrap; }
.auth-btn:hover { background: var(--rose); }
.auth-btn.auth-fill { background: var(--magenta); color: #fff; }
.auth-btn.auth-fill:hover { background: var(--magenta-dark); }
.modal-sm { width: min(460px, 94vw); }
.auth-form { margin-top: 22px; }
.auth-form label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 12px; }
.auth-form label small { font-weight: 300; color: #7a6471; }
.auth-form input { width: 100%; margin-top: 4px; padding: 12px 14px; border: 1px solid #d9c3cf; border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); }
.auth-form input:focus { outline: 2px solid var(--magenta); outline-offset: 1px; }
.auth-form .btn { width: 100%; cursor: pointer; font: inherit; font-weight: 500; margin-top: 6px; }
.auth-form .btn:disabled { opacity: .6; cursor: wait; }
.auth-switch { margin-top: 18px; font-size: .95rem; }
.auth-switch a, .auth a:not(.btn) { color: var(--magenta); font-weight: 500; }
.my-rdv { margin: 18px 0 24px; display: grid; gap: 10px; }
.my-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 14px 16px; border-left: 5px solid var(--gold); box-shadow: 0 3px 12px rgba(42,26,36,.06); text-transform: none; }
.my-item.confirmed { border-left-color: #2e8b57; }
.my-item.cancelled { border-left-color: #999; opacity: .6; }
.my-item strong { text-transform: capitalize; }
.cancel-btn { border: 1px solid #b3261e; color: #b3261e; background: #fff; border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font: 500 .85rem 'Jost', sans-serif; }
.cancel-btn:hover { background: #b3261e; color: #fff; }
.auth .btn-small { display: inline-block; }
@media (max-width: 520px) { .site-header { gap: 0 5px; padding-right: 3vw; } .auth-btn { padding: 4px 10px; } }

/* Fenêtres de connexion / inscription : format compact */
.modal-sm { width: min(340px, 94vw); border-radius: var(--radius); height: auto; max-height: calc(100vh - var(--hh, 60px) - 16px); margin-top: 0; border-radius: 0 0 16px 16px; }
.modal-sm .section { padding: 20px 20px 118px; }
.modal-sm .eyebrow { display: none; }
.modal-sm h2 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-sm .modal-close { width: 30px; height: 30px; font-size: 1.2rem; margin: 6px 6px -34px 0; top: 6px; }
.modal-sm .auth-form { margin-top: 10px; }
.modal-sm .auth-form label { font-size: .8rem; margin-bottom: 6px; }
.modal-sm .auth-form label small { font-size: .72rem; }
.modal-sm .auth-form input { padding: 7px 10px; border-radius: var(--radius); font-size: .9rem; margin-top: 2px; }
.modal-sm .auth-form .btn { padding: 8px 16px; font-size: .9rem; margin-top: 2px; }
.modal-sm .form-msg { margin-top: 4px; font-size: .82rem; min-height: 0; }
.modal-sm .form-msg:empty { display: none; }
.modal-sm .auth-switch { margin-top: 10px; font-size: .8rem; }
.modal-sm .my-rdv { margin: 10px 0 12px; }
.modal-sm .my-item { padding: 9px 12px; font-size: .85rem; }
.modal-sm .hint { margin: 0; font-size: .8rem; }
@media (max-width: 860px) { .modal-sm { width: min(340px, 94vw); height: auto; margin: 8px auto 0; border-radius: var(--radius); } .modal-sm .section { padding: 22px 20px 118px; } }

/* Rôles */
.role-badge { font: 500 .75rem 'Jost', sans-serif; background: rgba(255,255,255,.2); padding: 3px 12px; border-radius: var(--radius); margin-left: 10px; vertical-align: middle; }
.admin-main.one { grid-template-columns: 1fr; max-width: 900px; }
.filter { text-align: right; font-size: .9rem; }
.admin select { width: auto; padding: 7px 10px; border: 1px solid #d9c3cf; border-radius: var(--radius); font: inherit; background: #fff; }
.user-row { grid-template-columns: 1fr auto; }
.actions.row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.badge.role-admin { background: #f3d6e6; color: #7e1752; }
.badge.role-chef { background: #e0d9f5; color: #4a3a8a; }
.badge.role-commercial { background: #d8ecf5; color: #1f5f80; }
.badge.role-user { background: #eee; color: #555; }
.perms { background: #fff; padding: 6px 16px; border-radius: var(--radius); margin-top: 8px; overflow-x: auto; }
.perms table { min-width: 560px; }
.perms th, .perms td { color: var(--ink); border-color: #eee; text-align: center; }
.perms th:first-child, .perms td:first-child { text-align: left; }
.perms th { color: var(--magenta); }
.login label small { font-weight: 300; color: #7a6471; }

/* Compte administrateur */
.warn-banner { background: #fff3cd; color: #7a5a00; border-bottom: 2px solid #e0b100; padding: 12px 5vw; font-weight: 500; }
.pwd-box { max-width: 1150px; margin: 14px auto 0; padding: 0 5vw; }
.pwd-box summary { cursor: pointer; font-weight: 600; color: var(--magenta); }
.pwd-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 10px; background: #fff; padding: 16px; border-radius: var(--radius); }
.pwd-form label { margin: 0; flex: 1 1 180px; }
.pwd-form .btn { cursor: pointer; font: inherit; }
.ok-msg { color: #1f6b41; font-weight: 500; }

/* Confirmation e-mail */
.pending { margin-top: 14px; font-size: .9rem; }
.pending .auth-btn, .form-msg .auth-btn { margin-top: 6px; }
.verify { max-width: 440px; }
.verify h1 { font-size: 1.5rem; }
.verify p { margin: 10px 0; }
.verify .btn { display: inline-block; }

/* Groupes */
.badge.role-group { background: #e3f1d9; color: #36621c; }
.group-card { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 3px 12px rgba(42,26,36,.06); border-left: 5px solid var(--magenta); }
.group-head { display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.group-head label { margin: 0; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin: 8px 0 12px; }
.admin label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.admin label.check input { width: auto; margin: 0; }
@media (max-width: 700px) { .group-head { grid-template-columns: 1fr; } }

/* Barre d'accueil connectée (mêmes éléments que admin.html) */
.auth-bar .user-info { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--ink); flex-wrap: wrap; justify-content: flex-end; }
.auth-bar .user-info a { color: var(--magenta); font-weight: 500; }
.auth-bar .ico-user { fill: var(--ink); }
.auth-bar .presence-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; margin-right: 2px; }
.auth-bar .badge { display: inline-block; background: var(--rose); color: var(--magenta); font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: var(--radius); }
.auth-bar .timer { color: #6b7280; }
.auth-bar .timer::before { content: "\23F1  "; }

/* Administration dans une fenêtre modale */
.modal-xl { width: min(1180px, 97vw); }
.modal .section.adminframe { padding: 0; }
.adminframe iframe { display: block; width: 100%; height: calc(100vh - var(--hh, 60px) - 40px); border: 0; border-radius: var(--radius); background: #fff; }
@media (max-width: 860px) { .modal-xl { width: 100vw; } .adminframe iframe { height: calc(100vh - var(--hh, 60px)); border-radius: 0; } }

.team-row { display: block; margin-top: 10px; font-weight: 500; font-size: .92rem; }
.team-row select { margin-top: 4px; }

/* Mon profil */
.pwd-details { margin-top: 12px; border-top: 1px solid #ecd5e2; padding-top: 8px; }
.pwd-details summary { cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--magenta); }
.auth-form input:disabled { background: #f3eef1; color: #7a6471; }
.auth-form .ok-msg { color: #1f6b41; }
.modal-sm .pwd-details .auth-form { margin-top: 6px; }

/* Page de confirmation d'e-mail : +100 px d'espace en bas */
body.admin { padding-bottom: 100px; }

.small-err { font-size: .78rem; margin-top: 6px; word-break: break-word; }

/* Pastille de présence : grise quand la personne est inactive depuis plus de 2 minutes */
.auth-bar .presence-dot.away { background: #9ca3af; }

/* Réservation en ligne : cadres au plus compact */
.rdv-box { gap: 8px; max-width: 760px; align-items: start; }
.rdv-box .step { padding: 8px 10px; border-radius: var(--radius); }
.rdv-box h3 { font-size: .92rem; margin-bottom: 6px; gap: 6px; }
.rdv-box h3 span { width: 20px; height: 20px; font-size: .72rem; }
.rdv-box select, .rdv-box input, .rdv-box textarea { padding: 5px 8px; font-size: .85rem; border-radius: var(--radius); }
.rdv-box label { font-size: .78rem; margin-bottom: 5px; }
.rdv-box textarea { min-height: 0; resize: vertical; }
.hint { font-size: .78rem; margin-top: 4px; }
.team-row { margin-top: 6px; font-size: .8rem; }
.cal-head { margin-bottom: 4px; }
.cal-head strong { font-size: .95rem; }
.cal-head button { width: 26px; height: 26px; font-size: 1rem; }
.cal-grid { gap: 2px; }
.cal-dow span { font-size: .68rem; padding: 1px 0; }
.cal-grid button { aspect-ratio: auto; height: 26px; font-size: .78rem; border-radius: var(--radius); }
.slots { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; margin-top: 6px; }
.slots button { padding: 4px 0; font-size: .8rem; border-radius: var(--radius); }
.recap { margin: 2px 0 8px; font-size: .82rem; min-height: 1.2em; }
#rdvForm .btn { padding: 8px 16px; font-size: .88rem; }
.form-msg { margin-top: 6px; font-size: .82rem; }
.modal .section.booking { padding-top: 40px; }
.booking .lead.mx { margin-bottom: 14px; font-size: .95rem; }
.booking h2 { margin-bottom: 8px; font-size: 1.8rem; }

/* Le numéro de téléphone n'est affiché qu'une fois la valeur à jour chargée (évite d'afficher un ancien numéro) */
html:not(.site-ready) [data-phone] { visibility: hidden; }

.contact-card.hidden { display: none; }
.contact-card strong { overflow-wrap: anywhere; }

/* Fenêtre de connexion : pas de découpe (overflow visible) pour que la liste des mots de passe d'un gestionnaire comme Dashlane, affichée sous le champ, ne soit ni coupée ni cachée. Fenêtre courte : pas de défilement nécessaire. */
#modal-connexion { overflow: visible; }
/* La fenêtre de connexion a de la hauteur sous les champs : les gestionnaires de mots de passe (Dashlane…) y affichent leur liste de comptes sans manquer de place. */
#modal-connexion { min-height: 460px; }
#modal-connexion .section { padding-bottom: 260px; }
