/* =========================================================
   Villa 24H Le Mans — pages « Mon compte » et « Administration »
   Mêmes couleurs, typographie et boutons que le site :
   fond brume, cartes blanches, aucune ombre, bleu réservé aux actions.
   ========================================================= */

:root {
  --ink: #1d1d1f;
  --fog: #f5f5f7;
  --white: #ffffff;
  --graphite: #707070;
  --slate: #86868b;
  --iron: #5b5b61;
  --ash: #e8e8ed;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --red: #c4001a;
  --iris: linear-gradient(60deg, #0894ff 0%, #c959dd 40%, #ff2e54 67%, #ff9003 100%);

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1080px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 28px;
  --radius-sm: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.014em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Barre du haut ---------- */
.bar { position: sticky; top: 0; z-index: 20; color: #f5f5f7; }
.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(29, 29, 31, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(100% - var(--gutter) * 2, var(--maxw));
  height: 48px;
  margin-inline: auto;
}
.bar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.bar__logo:hover { text-decoration: none; }
.bar__logo svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.bar__logo:hover svg { transform: translateY(-2px) rotate(-8deg); }
.bar__section { padding-left: 16px; border-left: 1px solid rgba(245, 245, 247, .25); font-size: 13px; color: rgba(245, 245, 247, .7); white-space: nowrap; }
.bar__user { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; font-size: 13px; color: rgba(245, 245, 247, .76); }
.bar__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__btn {
  padding: 5px 14px;
  border: 1px solid rgba(245, 245, 247, .4);
  border-radius: 980px;
  background: none;
  color: #f5f5f7;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.bar__btn:hover { border-color: #f5f5f7; background: #f5f5f7; color: var(--ink); }

/* ---------- Mise en page ---------- */
.page {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 0 120px;
}
.narrow { max-width: 480px; margin-inline: auto; }
.loading { padding: 80px 0; text-align: center; color: var(--graphite); }

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.008em;
}
.title {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.02em;
}
.title em { font-style: normal; }
.iris {
  background-image: var(--iris);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lead { margin-bottom: 28px; font-size: clamp(19px, 2vw, 21px); line-height: 1.38; color: var(--graphite); }
.caption { font-size: 13px; line-height: 1.4; color: var(--graphite); }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 36px; }
.head .title { margin-bottom: 0; }
.head__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--white);
  animation: rise .7s var(--ease) both;
}
.card + .card, .grid2 + .card, .card + .grid2 { margin-top: 20px; }
.card__title {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
}
.card__sub { margin: 28px 0 6px; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card__text { margin-bottom: 20px; font-size: 15px; color: var(--graphite); }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
/* ---------- Avis : note en étoiles, case à cocher, compteur ---------- */
#avis { scroll-margin-top: 84px; }
.rating { margin: 0 0 18px; padding: 0; border: 0; }
.rating__label { margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--graphite); }
.rating__stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rating__stars input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating__stars label { padding: 0 2px; font-size: 34px; line-height: 1; color: var(--line); cursor: pointer; transition: color .15s, transform .25s; }
.rating__stars label:hover { transform: scale(1.12); }
.rating__stars input:checked ~ label,
.rating__stars label:hover,
.rating__stars label:hover ~ label { color: var(--ink); }
.rating__stars input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 6px; }
.field--area textarea { min-height: 120px; resize: vertical; }
.avis-count { margin: -12px 0 16px; text-align: right; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; font-size: 15px; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.mes-avis { margin-bottom: 20px; }
.mes-avis .row__note { white-space: pre-wrap; }
.avis-attente { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--fog); font-size: 15px; }
.badge--publie { background: #e7f6ec; color: #1b7340; }
.badge--refuse { background: #fdecee; color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.avis-stars { letter-spacing: 1px; color: var(--ink); }
.panel__note { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--white); color: var(--iron); font-size: 14px; line-height: 1.45; }

.envoi-etat { margin: -6px 0 20px; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.envoi-etat.is-ok { background: #e7f6ec; color: #1b7340; }
.envoi-etat.is-warn { background: #fff4e5; color: #a24a00; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.grid2 > .card + .card { margin-top: 0; }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }

/* ---------- Boutons (comme sur le site) ---------- */
.btn {
  --bg: var(--ash);
  --fg: var(--ink);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 980px;
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: -0.022em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease), scale .3s var(--ease), opacity .3s;
}
.btn:hover { text-decoration: none; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform .9s var(--ease);
}
.btn:hover::before { transform: translateX(110%); }
.btn:active { scale: .96; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn:disabled::before { display: none; }
.btn--primary { --bg: var(--blue); --fg: #fff; }
.btn--primary:hover:not(:disabled) { --bg: var(--blue-hover); }
.btn--ghost { --bg: transparent; padding: 10px 21px; border: 1px solid var(--ink); }
.btn--ghost::before {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 300%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .65s var(--ease);
}
.btn--ghost:hover:not(:disabled) { --fg: #fff; }
.btn--ghost:hover:not(:disabled)::before { transform: translate(-50%, -50%) scale(1); }
.btn--danger { --bg: transparent; --fg: var(--red); padding: 10px 21px; border: 1px solid currentColor; }
.btn--danger::before { display: none; }
.btn--danger:hover:not(:disabled) { --bg: var(--red); --fg: #fff; border-color: var(--red); }
.btn--sm { min-height: 34px; padding: 7px 16px; font-size: 14px; }
.btn--ghost.btn--sm, .btn--danger.btn--sm { padding: 6px 15px; }
.btn--block { width: 100%; }

.link-btn { padding: 0; border: 0; background: none; color: var(--link); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Champs à étiquette flottante (comme la fenêtre de réservation) ---------- */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fields--one { grid-template-columns: 1fr; }
.fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { position: relative; display: block; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 58px;
  padding: 26px 16px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  font-size: 17px;
  outline: none;
  transition: border-color .3s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--link); outline: 3px solid rgba(0, 102, 204, .18); }
.field input:user-invalid { border-color: var(--red); }
.field span {
  position: absolute;
  left: 17px;
  top: 18px;
  max-width: calc(100% - 34px);
  overflow: hidden;
  font-size: 17px;
  color: var(--graphite);
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transform-origin: 0 0;
  transition: translate .35s var(--ease), scale .35s var(--ease);
}
.field input:focus + span,
.field input:not(:placeholder-shown) + span,
.field select + span,
.field textarea:focus + span,
.field textarea:not(:placeholder-shown) + span { translate: 0 -10px; scale: .72; max-width: calc((100% - 34px) / .72); }
.field--sm input { min-height: 50px; padding: 22px 12px 7px; font-size: 15px; }
.field--sm span { left: 13px; top: 15px; font-size: 15px; }

.form-error {
  margin: -6px 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdecee;
  color: var(--red);
  font-size: 15px;
  animation: shake .45s;
}
@keyframes shake {
  20%, 60% { translate: -5px 0; }
  40%, 80% { translate: 5px 0; }
}

/* ---------- Onglets (contrôle segmenté) ---------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border-radius: 980px;
  background: var(--ash);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 0;
  border-radius: 980px;
  background: none;
  color: var(--iron);
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"],
.tabs button[aria-pressed="true"] { background: var(--white); color: var(--ink); font-weight: 500; }
.tabs--block { display: flex; margin-bottom: 20px; }
.tabs--block button { flex: 1; justify-content: center; }
.tabs--sm button { padding: 6px 14px; font-size: 14px; }
.count {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.dash__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dash__head .title { margin-bottom: 0; }
.panel { animation: rise .6s var(--ease) both; }
.panel__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ash);
  color: var(--iron);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--en_attente { background: #fff4e5; color: #a24a00; }
.badge--acceptee { background: #e7f6ec; color: #1b7340; }
.badge--refusee { background: #fdecee; color: var(--red); }
.badge--annulee { background: var(--ash); color: var(--graphite); }
.badge--admin { background: #e8f1fd; color: var(--link); }

/* ---------- Demandes ---------- */
.reqs { display: grid; gap: 14px; }
.req {
  display: grid;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--white);
  animation: rise .6s var(--ease) both;
}
.req__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--graphite); }
.req__who { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.012em; }
.req__contact { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.req__stay { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; font-size: 15px; color: var(--iron); }
.req__stay strong { color: var(--ink); font-size: 17px; }
.req__msg { padding: 12px 16px; border-radius: 14px; background: var(--fog); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.req__warn { display: flex; gap: 8px; align-items: center; color: #a24a00; font-size: 14px; font-weight: 500; }
.req__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.empty { padding: 56px 16px; border-radius: var(--radius); background: var(--white); color: var(--graphite); text-align: center; }
.empty .btn { margin-top: 16px; }

/* ---------- Listes (comptes, blocages, mes demandes) ---------- */
.rows { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 18px;
  background: var(--white);
}
.row + .row { border-top: 1px solid var(--line); }
.row__main { display: grid; flex: 1 1 220px; min-width: 0; }
.row__main strong { overflow-wrap: anywhere; }
.row__note { font-size: 14px; color: var(--graphite); overflow-wrap: anywhere; }
.row__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row--empty { justify-content: center; color: var(--graphite); font-size: 15px; }

.mine__dates { font-weight: 600; }
.mine__meta { font-size: 14px; color: var(--graphite); }
.mine__total { margin-left: auto; font-weight: 600; white-space: nowrap; }

.info { display: grid; gap: 12px; margin-bottom: 20px; }
.info dt { font-size: 13px; color: var(--graphite); }
.info dd { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Saisons (tarifs) ---------- */
.seasons { display: grid; gap: 10px; margin-bottom: 14px; }
.season { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; }
.season__del {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--fog);
  color: var(--graphite);
  cursor: pointer;
  transition: background-color .3s, color .3s, rotate .5s var(--ease);
}
.season__del:hover { background: #fdecee; color: var(--red); rotate: 90deg; }
.season__del svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.example { margin-top: 4px; padding: 14px 18px; border-radius: 14px; background: var(--fog); font-size: 15px; color: var(--iron); }

/* ---------- Mini-calendriers (disponibilités) ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; font-size: 13px; color: var(--graphite); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.minicals { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 24px; }
.minical__name { margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.minical__name::first-letter { text-transform: uppercase; }
.minical__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 12px; text-align: center; }
.minical__days b { padding-bottom: 2px; font-weight: 500; color: var(--slate); }
.minical__days span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; }
.day--booked, .legend .day--booked { background: var(--ink); color: #fff; }
.day--blocked, .legend .day--blocked { background: repeating-linear-gradient(135deg, var(--ash) 0 4px, var(--line) 4px 7px); color: var(--iron); }
.day--pending, .legend .day--pending { outline: 1.5px solid #e08a00; outline-offset: -1.5px; color: #a24a00; }
.day--past { color: var(--line); }
.day--today { font-weight: 700; text-decoration: underline; }

/* ---------- Message bref ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 22px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  text-align: center;
  opacity: 0;
  translate: -50% 20px;
  pointer-events: none;
  transition: opacity .35s, translate .6s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.toast.is-warn { background: var(--red); }

/* ---------- Boîte de confirmation ---------- */
dialog.ask { width: min(460px, 100% - 24px); max-width: none; margin: auto; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
dialog.ask::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .3s ease; }
.ask__card { padding: clamp(24px, 5vw, 36px); border-radius: var(--radius); background: var(--white); animation: pop .5s var(--ease) both; }
.ask__title { margin-bottom: 10px; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.ask__text { margin-bottom: 20px; color: var(--iron); font-size: 15px; }
.ask .field { margin-bottom: 20px; }
.ask__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ask .form-error { margin: -6px 0 16px; }
.ask__help { margin: -4px 0 20px; }
.ask__help a { color: var(--link); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; translate: 0 24px; scale: .97; } }

/* ---------- Petits écrans ---------- */
@media (max-width: 734px) {
  .fields, .fields--three { grid-template-columns: 1fr; }
  .bar__section { display: none; }
  .season { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
  .season .field:first-child { grid-column: 1 / -1; }
  .head__actions .btn, .card__foot .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
