/* BML Locations - outil de créneaux. Pensé d'abord pour le téléphone.
   Couleurs : rose pâle et bleu ciel, avec les teintes vives des carrés du logo en accents. */
:root {
    --ciel: #e6f4fe;            /* fond de page */
    --ciel-fort: #bfe1f9;       /* bordures bleu ciel */
    --rose: #fde4ed;            /* bandeaux rose pâle */
    --rose-fort: #f8bfd2;       /* bordures roses */
    --carte: #ffffff;
    --encre: #1c1b33;
    --encre-douce: #5a5c78;
    --trait: #d3e5f5;
    --action: #d4106f;          /* rose vif du logo, foncé pour rester lisible */
    --action-fonce: #94094c;
    --bleu: #1f84e6;
    --vert: #33a443;
    --orange: #f0672a;
    --violet: #7a2a90;
    --jaune: #f9c80e;
    --ok-fond: #e2f6e6;
    --ok-encre: #14602a;
    --erreur-fond: #fde3ea;
    --erreur-encre: #8c1238;
    --info-fond: #fff3c9;
    --info-encre: #5c4500;
    --rayon: 22px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ciel);
    color: var(--encre);
    font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", "Segoe UI", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

a { color: #0b5cab; }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.entete { background: var(--carte); }
/* Ruban aux couleurs des carrés du logo */
.entete::after {
    content: ""; display: block; height: 7px;
    background: linear-gradient(90deg,
        #f0672a 0 11.1%, #ec3fb1 0 22.2%, #1f84e6 0 33.3%, #33a443 0 44.4%, #7a2a90 0 55.5%,
        #128ad2 0 66.6%, #f0508c 0 77.7%, #a58a6a 0 88.8%, #f9c80e 0);
}
.entete-int {
    max-width: 760px; margin: 0 auto; padding: 10px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: block; height: 62px; width: auto; }
.logo-lien { display: block; text-decoration: none; }

.deconnexion { margin: 0; }
.lien-bouton {
    background: none; border: 0; padding: 6px 0; font: inherit; font-size: 0.95rem;
    color: var(--encre-douce); text-decoration: underline; cursor: pointer;
}

.menu {
    max-width: 760px; margin: 0 auto; padding: 0 12px 12px;
    display: flex; gap: 6px; overflow-x: auto;
}
.menu a {
    flex: 0 0 auto; padding: 8px 15px; border-radius: 999px;
    color: var(--encre); text-decoration: none; font-weight: 700; font-size: 0.98rem;
    background: var(--ciel);
}
.menu a:hover { background: var(--rose); }
.menu a.actif { background: var(--action); color: #fff; }

/* ---------- Contenu ---------- */
.contenu { max-width: 760px; margin: 0 auto; padding: 22px 18px 60px; }

h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; font-weight: 800; }
h2 { font-size: 1.22rem; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.intro { color: var(--encre-douce); margin-bottom: 20px; }
.petit { font-size: 0.92rem; color: var(--encre-douce); }

/* Bandeau rose avec la mascotte */
.bandeau {
    display: flex; align-items: center; gap: 12px;
    background: var(--rose); border: 2px solid var(--rose-fort); border-radius: var(--rayon);
    padding: 18px 12px 18px 20px; margin-bottom: 20px; overflow: hidden;
}
.bandeau-texte { flex: 1; min-width: 0; }
.bandeau h1 { margin: 0; }
.bandeau p { margin: 8px 0 0; color: #4d3a48; }
.mascotte { flex: 0 0 auto; width: 150px; height: auto; margin: -6px -4px -10px 0; }

.carte {
    background: var(--carte); border: 2px solid var(--ciel-fort); border-radius: var(--rayon);
    padding: 18px; margin-bottom: 18px;
}
.carte > :last-child { margin-bottom: 0; }

.fiche { margin: 0; }
.fiche dt { font-size: 0.9rem; color: var(--encre-douce); margin-top: 10px; }
.fiche dt:first-child { margin-top: 0; }
.fiche dd { margin: 0; font-weight: 700; }
.fiche ul { margin: 0; padding-left: 20px; }

/* ---------- Messages ---------- */
.message { border-radius: 16px; padding: 12px 16px; margin: 0 0 18px; font-weight: 700; }
.message ul { margin: 0; padding-left: 20px; }
.message-ok { background: var(--ok-fond); color: var(--ok-encre); }
.message-erreur { background: var(--erreur-fond); color: var(--erreur-encre); }
.message-info { background: var(--info-fond); color: var(--info-encre); }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 700; margin-bottom: 4px; }
.champ { margin-bottom: 14px; }
.aide { display: block; font-weight: 400; font-size: 0.9rem; color: var(--encre-douce); }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], input[type="number"], textarea, select {
    width: 100%; padding: 12px 14px; font: inherit; color: var(--encre);
    background: #fff; border: 2px solid var(--ciel-fort); border-radius: 14px;
    min-height: 48px;
}
input:focus, textarea:focus, select:focus { border-color: var(--bleu); outline: none; }
input[type="file"] { width: 100%; font: inherit; font-size: 0.95rem; padding: 8px 0; }

.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.bouton {
    display: inline-block; min-height: 50px; padding: 12px 22px;
    font: inherit; font-weight: 800; text-align: center; text-decoration: none;
    color: #fff; background: var(--action); border: 0; border-radius: 999px;
    box-shadow: 0 4px 0 var(--action-fonce); cursor: pointer;
}
.bouton:hover { background: #bf0d63; }
.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--action-fonce); }
.bouton-large { display: block; width: 100%; }
.bouton-discret {
    min-height: 40px; padding: 7px 14px; font-size: 0.92rem; font-weight: 700;
    color: var(--encre); background: #fff; border: 2px solid var(--ciel-fort); box-shadow: none;
}
.bouton-discret:hover { background: var(--ciel); }
.bouton-danger { color: var(--erreur-encre); border-color: var(--rose-fort); }
.bouton-danger:hover { background: var(--rose); }

/* ---------- Étapes du parcours client ---------- */
.etapes { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.etapes li {
    flex: 1; text-align: center; font-size: 0.85rem; font-weight: 800; color: var(--encre-douce);
    padding-top: 10px; border-top: 7px solid #fff; border-radius: 4px;
}
.etapes li.faite { border-color: var(--vert); color: var(--encre); }
.etapes li.en-cours { border-color: var(--action); color: var(--encre); }

/* ---------- Créneaux : les "bulles" d'horaires ---------- */
.jour { border-bottom: 2px solid var(--trait); }
.jour:last-child { border-bottom: 0; }
.jour summary {
    cursor: pointer; padding: 14px 0; font-weight: 800; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.jour summary::-webkit-details-marker { display: none; }
.jour summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--action); }
.jour[open] summary::after { content: "–"; }
.jour summary .compte { font-weight: 400; font-size: 0.9rem; color: var(--encre-douce); margin-left: auto; }

.bulles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; padding: 4px 0 20px; }
.bulle {
    display: block; padding: 12px 6px; text-align: center; text-decoration: none;
    font-weight: 800; font-size: 1.08rem; color: var(--encre);
    background: #fff; border: 2px solid var(--bleu); border-radius: 999px;
    box-shadow: 0 4px 0 var(--bleu);
}
.bulle:hover, .bulle:focus-visible { background: var(--rose); border-color: var(--action); box-shadow: 0 4px 0 var(--action); }
.bulle:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--action); }

/* ---------- Confirmation ---------- */
.confirmation { border-color: #9ed9a8; }
.horaire { font-size: 1.15rem; font-weight: 800; }

/* ---------- Espace gérant ---------- */
.ligne {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    padding: 10px 0; border-top: 1px solid var(--trait);
}
.ligne:first-of-type { border-top: 0; }
.ligne .heure { font-weight: 800; min-width: 112px; }
.ligne .infos { flex: 1 1 150px; font-size: 0.93rem; color: var(--encre-douce); }
.ligne form { margin: 0; }
.ligne.ferme .heure { text-decoration: line-through; color: var(--encre-douce); }
.etiquette {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 0.82rem; font-weight: 700; background: var(--info-fond); color: var(--info-encre);
}
.etiquette-ok { background: var(--ok-fond); color: var(--ok-encre); }
.etiquette-ferme { background: var(--ciel); color: #3d4d66; }
.etiquette-alerte { background: var(--erreur-fond); color: var(--erreur-encre); }

.article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--trait); }
.article:first-of-type { border-top: 0; }
.article label { margin: 0; font-weight: 700; flex: 1; }
.article input[type="number"] { width: 84px; text-align: center; }

.lien-boite { display: flex; gap: 8px; flex-wrap: wrap; }
.lien-boite input { flex: 1 1 220px; font-size: 0.9rem; }

.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tuile {
    display: block; padding: 18px; text-decoration: none; color: var(--encre);
    background: #fff; border: 2px solid var(--ciel-fort); border-top-width: 8px; border-radius: var(--rayon);
    font-weight: 800;
}
.tuile:nth-child(1) { border-top-color: var(--bleu); }
.tuile:nth-child(2) { border-top-color: #ec3fb1; }
.tuile:nth-child(3) { border-top-color: var(--vert); }
.tuile:nth-child(4) { border-top-color: var(--jaune); }
.tuile span { display: block; font-weight: 400; font-size: 0.9rem; color: var(--encre-douce); margin-top: 4px; }
.tuile:hover { background: var(--rose); }

.ligne-form { display: flex; gap: 8px; flex: 1 1 240px; }
.ligne-form input { flex: 1; }

/* Champ invisible contre les robots */
.cache { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Photos du catalogue ---------- */
.vignette {
    flex: 0 0 auto; width: 72px; height: 72px; object-fit: cover;
    border-radius: 16px; border: 2px solid var(--ciel-fort); background: #fff; display: block;
}
.vignette-petite { width: 48px; height: 48px; border-radius: 12px; }
.vignette-vide { background: repeating-linear-gradient(45deg, var(--rose), var(--rose) 6px, #fff 6px, #fff 12px); }
.liste-materiel { list-style: none; padding: 0 !important; margin: 0; }
.liste-materiel li { display: flex; align-items: center; gap: 12px; padding: 5px 0; }

.fiche-article { padding: 16px 0; border-top: 1px solid var(--trait); }
.fiche-article:first-of-type { border-top: 0; padding-top: 0; }
.fiche-article .tete { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.fiche-article .tete strong { flex: 1; font-size: 1.05rem; }
.fiche-article form { margin: 0 0 10px; }
.fiche-article .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- QR code, remise et retour ---------- */
.carte-qr { text-align: center; border-color: var(--rose-fort); }
.carte-qr h2, .carte-qr p { text-align: left; }
.qr { max-width: 260px; margin: 6px auto 16px; padding: 8px; background: #fff; border: 2px solid var(--ciel-fort); border-radius: 16px; }
.qr svg { display: block; width: 100%; height: auto; }

.retour-ligne { padding: 12px 0; border-top: 1px solid var(--trait); }
.retour-ligne:first-of-type { border-top: 0; }
.retour-ligne .article { border-top: 0; }
.alerte { border-color: var(--rose-fort); }

@media (max-width: 480px) {
    .deux-colonnes, .tuiles { grid-template-columns: 1fr; }
    h1 { font-size: 1.4rem; }
    .logo { height: 52px; }
    .mascotte { width: 104px; margin-right: -6px; }
    .bandeau { padding: 16px 8px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .bouton:active, .bulle:active { transform: none; }
}

@media print {
    .entete, .bouton, .etapes, .message, .mascotte { display: none !important; }
    body { background: #fff; }
    .carte, .bandeau { border-color: #999; background: #fff; }
}

/* ---------- Sections du catalogue ---------- */
.section-catalogue {
    margin: 22px 0 6px; padding: 8px 14px; border-radius: 12px;
    background: var(--ciel); font-size: 1rem; font-weight: 800;
}
.section-catalogue:first-of-type { margin-top: 8px; }
.section-catalogue + .article, .section-catalogue + .fiche-article { border-top: 0; }

/* ---------- Paiement (fiche client) ---------- */
.carte-paiement { border-color: var(--rose-fort); background: #fff8fa; }
.a-encaisser {
    font-size: 1.25rem; margin: 0 0 12px; padding: 12px 16px; border-radius: 14px;
    background: var(--erreur-fond); color: var(--erreur-encre);
}
.a-encaisser strong { font-size: 1.5rem; }
.a-encaisser-ok { background: var(--ok-fond); color: var(--ok-encre); font-weight: 800; }
.fiche-article .ligne-form { flex-wrap: wrap; }
.fiche-article .ligne-form input, .fiche-article .ligne-form select { flex: 1 1 200px; }
