/* Le carnet du site : bandeau d'accord, fenêtre « avant de partir », tableau de bord. */

/* ——— Le bandeau d'accord : les deux boutons ont exactement le même poids ——— */
.we-accord {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  max-width: 560px; padding: 18px 20px;
  background: var(--graphite); color: #E8ECEC; border-radius: var(--rayon-carte);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.7);
  font-size: .9rem; line-height: 1.5;
}
.we-accord[hidden] { display: none; }
.we-accord p { margin: 0 0 12px; }
.we-accord b { color: #fff; }
.we-accord a { color: var(--vague-vif); }
.we-accord-choix { display: flex; gap: 10px; }
.we-accord-choix .bouton { flex: 1; justify-content: center; color: #fff; border-color: rgba(255,255,255,.45); background: transparent; }
.we-accord-choix .bouton:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
@media (max-width: 640px) { .we-accord { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* ——— La fenêtre « avant de partir » ——— */
/* l'attribut hidden doit gagner sur les display: grid posés plus bas */
.we-sortie [hidden] { display: none !important; }
.we-sortie {
  padding: 0; border: 0; border-radius: 14px; width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 28px); overflow: auto;
  background: var(--papier-2); color: var(--encre);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.75);
}
.we-sortie::backdrop { background: rgba(12,15,17,.62); backdrop-filter: blur(3px); }
.we-sortie[open] { animation: we-entree .35s var(--douce); }
@keyframes we-entree { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .we-sortie[open] { animation: none; } }
.we-sortie-cadre { display: grid; grid-template-columns: 38% 1fr; position: relative; }
.we-sortie-visuel { margin: 0; background: var(--nuit); display: flex; align-items: center; justify-content: center; padding: 28px 22px; }
.we-sortie-visuel img { width: 100%; height: auto; max-width: 300px; border-radius: 4px; box-shadow: 0 22px 44px -18px rgba(0,0,0,.9); transform: rotate(-2deg); }
.we-sortie-corps { padding: 32px 34px 28px; }
.we-sortie-corps h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.05; margin: 6px 0 10px; }
.we-sortie-chapeau { color: var(--encre-doux); margin: 0 0 18px; }
.we-sortie-fermer {
  position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: rgba(20,24,27,.06); color: var(--encre);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.we-sortie-fermer:hover { background: rgba(20,24,27,.14); }
.we-sortie form { display: grid; gap: 10px; }
.we-sortie-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.we-sortie label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--encre); }
.we-sortie label small { font-weight: 400; color: var(--encre-pale); }
.we-sortie input:not([type=checkbox]) {
  font: inherit; font-weight: 400; font-size: 1rem; padding: 11px 12px; width: 100%;
  border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: #fff; color: var(--encre);
}
.we-sortie input:focus { outline: 2px solid var(--vague-vif); outline-offset: 1px; border-color: var(--vague); }
.we-sortie-aide { margin: -2px 0 0; font-size: .8rem; color: var(--encre-pale); }
.we-sortie-accord { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .82rem !important; line-height: 1.45; color: var(--encre-doux) !important; }
.we-sortie-accord input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--vague); }
.we-sortie-piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.we-sortie-erreur { margin: 0; padding: 9px 12px; border-radius: var(--rayon); background: var(--refus-fond); color: var(--refus); font-size: .88rem; }
.we-sortie button[type=submit] { justify-self: start; margin-top: 4px; }
.we-sortie-mention { margin: 4px 0 0; font-size: .78rem; color: var(--encre-pale); }
.we-sortie-mention a { color: var(--vague); }
.we-sortie-reponse { display: grid; gap: 14px; justify-items: start; padding-top: 6px; }
.we-sortie-merci { font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 0; }
@media (max-width: 720px) {
  .we-sortie-cadre { grid-template-columns: 1fr; }
  .we-sortie-visuel { padding: 18px 18px 0; background: var(--papier-2); }
  .we-sortie-visuel img { max-width: 130px; transform: none; }
  .we-sortie-corps { padding: 14px 20px 22px; }
  .we-sortie-deux { grid-template-columns: 1fr; }
}

/* ——— Le tableau de bord ——— */
.tb-periodes { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-periodes a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--trait-fort); color: var(--encre); text-decoration: none; font-size: .87rem; }
.tb-periodes a[aria-current] { background: var(--encre); color: #fff; border-color: var(--encre); }
.tb-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 22px 0 30px; }
.tb-chiffres .carte { padding: 16px 18px; }
.tb-chiffres .chiffre { font-size: 2rem; margin-top: 4px; }
.tb-chiffres .discret { margin: 4px 0 0; font-size: .8rem; }
.tb-courbe { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 10px 0 0; border-bottom: 1px solid var(--trait); }
.tb-courbe div { flex: 1; min-width: 4px; background: var(--vague-fond); border-radius: 3px 3px 0 0; position: relative; }
.tb-courbe div i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--vague); border-radius: 3px 3px 0 0; }
.tb-courbe div b { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); font-size: .68rem; color: var(--aube); font-weight: 800; }
.tb-jours { display: flex; justify-content: space-between; font-size: .72rem; color: var(--encre-pale); margin-top: 6px; }
.tb-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 860px) { .tb-deux { grid-template-columns: 1fr; } }
.tb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tb-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-pale); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--trait-fort); }
.tb-table td { padding: 9px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tb-table td.n { text-align: right; font-family: var(--mono); white-space: nowrap; }
.tb-table a { color: var(--vague); }
.tb-defile { overflow-x: auto; }
.tb-etat { font-size: .74rem; padding: 3px 9px; border-radius: 999px; background: var(--trait); white-space: nowrap; }
.tb-etat.nouveau { background: var(--aube-fond); color: #8A5A1C; font-weight: 700; }
.tb-etat.rappele { background: var(--vague-fond); color: var(--vague); }
.tb-etat.client { background: var(--accord-fond); color: var(--accord); font-weight: 700; }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tb-actions select, .tb-actions input { font: inherit; font-size: .82rem; padding: 5px 8px; border: 1px solid var(--trait-fort); border-radius: var(--rayon); }
.tb-actions button { font: inherit; font-size: .82rem; padding: 5px 10px; border-radius: var(--rayon); border: 1px solid var(--encre); background: var(--encre); color: #fff; cursor: pointer; }
.tb-en-ligne { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accord); box-shadow: 0 0 0 4px var(--accord-fond); margin-right: 8px; }
.tb-fil { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--trait); }
.tb-fil li { position: relative; padding: 8px 0 8px 22px; }
.tb-fil li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--trait-fort); }
.tb-fil li.fort::before { background: var(--aube); }
.tb-fil li.nouvelle-visite { margin-top: 14px; }
.tb-fil time { font-family: var(--mono); font-size: .8rem; color: var(--encre-pale); margin-right: 10px; }
.tb-fil small { color: var(--encre-pale); }
.tb-vide { color: var(--encre-pale); font-style: italic; }
.tb-badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--aube); color: #fff; font-weight: 800; font-size: .78rem; text-align: center; }
