/* Espace équipe Hyperboissons : couleurs et polices de legroscaviste.com (bordeaux #9E3434, vert #008300,
   Montserrat pour le texte, Roboto pour les titres, boutons arrondis comme sur le site). */
:root {
  --bordeaux: #9E3434;
  --bordeaux-fonce: #7E2828;
  --bordeaux-haut: #8E2E2E;
  --accent: #9E3434;
  --vert: #007A00;
  --vert-doux: #E2F2E2;
  --ambre: #9A5800;
  --ambre-doux: #FBEEDA;
  --rouge: #B3261E;
  --fond: #F7F3F0;
  --carte: #FFFFFF;
  --carte-2: #FBF8F6;
  --texte: #2A2020;
  --doux: #6C5E5E;
  --trait: #ECE2DE;
  --rose: #F6E8E6;
  --ombre: 0 1px 2px rgba(70, 25, 25, .06), 0 12px 30px -14px rgba(70, 25, 25, .22);
  --ombre-forte: 0 2px 6px rgba(70, 25, 25, .08), 0 24px 48px -20px rgba(70, 25, 25, .42);
  --rayon: 18px;
  --titre: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --corps: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #E58A8A;
    --vert: #6CCB6C;
    --vert-doux: #1D3220;
    --ambre: #EBB060;
    --ambre-doux: #3A2B16;
    --rouge: #FF8A80;
    --fond: #151011;
    --carte: #211A1B;
    --carte-2: #1A1415;
    --texte: #F3ECEA;
    --doux: #B8A9A7;
    --trait: #362B2C;
    --rose: #3B2325;
    --ombre: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
    --ombre-forte: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px -20px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--corps);
  font-size: 15px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
body:not(.admin) .seulement-admin { display: none !important; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.15; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid rgba(158, 52, 52, .55); outline-offset: 2px; }
.cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Chargement */
.ecran-chargement { min-height: 100dvh; display: grid; place-items: center; }
.ecran-chargement img { animation: battement 1.4s ease-in-out infinite; }
@keyframes battement { 50% { transform: scale(.9); opacity: .6; } }

/* Connexion et choix du mot de passe */
.ecran-marque {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(110% 70% at 100% 0%, #BD4848 0%, transparent 55%),
    linear-gradient(160deg, #8C2C2C 0%, #9E3434 45%, #5C1C1C 100%);
}
.ecran-marque::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  right: -190px; bottom: -170px;
  background: url(/gc-blanc.png) center / contain no-repeat;
  opacity: .07;
  pointer-events: none;
}
.carte-connexion {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 32px 24px 24px;
  border-radius: 26px;
  background: var(--carte);
  text-align: center;
  box-shadow: 0 30px 70px -24px rgba(25, 4, 4, .65);
  animation: monte .35s ease-out;
}
@keyframes monte { from { transform: translateY(12px); opacity: 0; } }
.embleme { width: 76px; height: 76px; }
.surtitre { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--doux); }
.carte-connexion h1 { font-size: 30px; margin-bottom: 22px; }
.carte-connexion .intro { margin: -10px 0 20px; color: var(--doux); font-size: 14px; }
.petit { margin: 18px 0 0; font-size: 13px; color: var(--doux); }

form { display: grid; gap: 14px; text-align: left; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--trait);
  border-radius: 14px;
  background: var(--carte-2);
  font-size: 16px;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--bordeaux); box-shadow: 0 0 0 4px rgba(158, 52, 52, .15); }
.aide { margin: -6px 0 0; font-size: 12.5px; color: var(--doux); font-weight: 500; }
.message { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--rouge); }
.message:empty { display: none; }
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 50px; }
.voir {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--doux); cursor: pointer;
}
.voir:hover { color: var(--accent); }

/* Boutons (arrondis comme sur legroscaviste.com) */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
  user-select: none;
}
.bouton:hover { background: var(--rose); }
.bouton.plein { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
.bouton.plein:hover { background: var(--bordeaux-fonce); border-color: var(--bordeaux-fonce); }
.bouton.large { width: 100%; padding: 14px; font-size: 16px; margin-top: 4px; }
.bouton.petit { padding: 7px 14px; font-size: 13px; }
.bouton.danger { border-color: var(--rouge); color: var(--rouge); }
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .6; cursor: progress; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* Barre du haut */
.barre {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--bordeaux-haut);
  color: #fff;
}
.marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.marque img { flex: none; width: 38px; height: 38px; }
.marque strong { display: block; font-family: var(--titre); font-size: 17px; font-weight: 700; }
.marque small { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-moi { position: relative; flex: none; }
.avatar {
  width: 42px; height: 42px;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-family: var(--titre); font-size: 17px; font-weight: 700;
  cursor: pointer;
}
.avatar:hover { background: rgba(255, 255, 255, .26); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 250px;
  padding: 8px;
  border: 1px solid var(--trait); border-radius: 18px;
  background: var(--carte); color: var(--texte);
  box-shadow: var(--ombre-forte);
  animation: monte .15s ease-out;
}
.menu-qui { margin: 0 0 6px; padding: 8px 12px 12px; border-bottom: 1px solid var(--trait); }
.menu-qui strong, .menu-qui small { display: block; }
.menu-qui small { color: var(--doux); font-size: 12px; overflow-wrap: anywhere; }
.menu button { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font-weight: 500; cursor: pointer; }
.menu button:hover { background: var(--rose); }

/* Le haut de l'accueil */
.haut {
  position: relative;
  overflow: hidden;
  padding: 20px 16px 84px;
  color: #fff;
  background:
    radial-gradient(80% 120% at 100% 0%, #B84444 0%, transparent 60%),
    linear-gradient(180deg, var(--bordeaux-haut) 0%, #9E3434 70%, #973232 100%);
}
.haut::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  right: -110px; top: -70px;
  background: url(/gc-blanc.png) center / contain no-repeat;
  opacity: .08;
  pointer-events: none;
}
.haut-dedans { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.date { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .82; }
#bonjour { margin: 6px 0 10px; font-size: clamp(30px, 7vw, 46px); font-weight: 700; }
.magasin {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  font-size: 13px; font-weight: 600;
}
.annonce {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 720px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.annonce-icone { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--bordeaux); }
.annonce-texte { flex: 1; min-width: 0; }
.annonce-texte p { margin: 0; font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.annonce-texte small { display: block; margin-top: 4px; font-size: 12px; opacity: .75; }
.annonce-modifier, .lien-clair {
  flex: none;
  border: 0; background: none; color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; opacity: .85;
}
.lien-clair { display: block; margin-top: 16px; padding: 0; }

/* Les tuiles */
.contenu { position: relative; z-index: 2; max-width: 1080px; margin: -56px auto 0; padding: 0 16px 24px; }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tuile {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
  box-shadow: var(--ombre);
  color: var(--texte);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  animation: monte .4s ease-out backwards;
}
.tuile:nth-child(2) { animation-delay: .03s; } .tuile:nth-child(3) { animation-delay: .06s; } .tuile:nth-child(4) { animation-delay: .09s; }
.tuile:nth-child(5) { animation-delay: .12s; } .tuile:nth-child(6) { animation-delay: .15s; } .tuile:nth-child(n+7) { animation-delay: .18s; }
a.tuile:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); border-color: rgba(158, 52, 52, .35); }
a.tuile:active { transform: translateY(-1px) scale(.99); }
.tuile-icone { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 15px; background: var(--rose); color: var(--accent); }
.tuile-titre { font-family: var(--titre); font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.tuile-texte { font-size: 12.5px; line-height: 1.45; color: var(--doux); }
.tuile-pied { display: flex; align-items: center; gap: 6px; min-height: 30px; margin-top: auto; padding-top: 6px; }
.tuile-fleche { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border-radius: 50%; background: var(--rose); color: var(--accent); transition: transform .18s, background .18s, color .18s; }
a.tuile:hover .tuile-fleche { background: var(--bordeaux); color: #fff; transform: translateX(2px); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--rose); color: var(--accent);
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.badge.bientot { margin-left: auto; background: var(--ambre-doux); color: var(--ambre); }
.tuile.bientot .tuile-icone { background: var(--carte-2); color: var(--doux); }
.tuile.bientot .tuile-titre { color: var(--doux); }
.tuile.a-venir { border: 1.5px dashed rgba(158, 52, 52, .35); background: transparent; box-shadow: none; }
.tuile.a-venir .tuile-icone { background: transparent; border: 1.5px dashed rgba(158, 52, 52, .4); }

/* Ajouter à l'écran d'accueil */
.astuce {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--trait); border-radius: 18px;
  background: var(--carte);
}
.astuce img { flex: none; border-radius: 11px; }
.astuce p { flex: 1; margin: 0; font-size: 13px; color: var(--doux); }
.astuce p > strong { display: block; color: var(--texte); font-size: 14px; }

/* Les nouveautés de la caisse */
.nouveautes { overflow: hidden; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre); }
.nouveaute {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--trait);
  color: var(--texte); text-decoration: none;
  transition: background .15s;
}
.nouveaute:first-child { border-top: 0; }
.nouveaute:hover { background: var(--carte-2); }
.nv-date {
  display: grid; place-content: center; justify-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--rose); color: var(--accent);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1;
}
.nv-date strong { font-family: var(--titre); font-size: 20px; letter-spacing: 0; }
.nv-date.jour { background: var(--bordeaux); color: #fff; }
.nv-texte { min-width: 0; }
.nv-texte strong { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.nv-texte small { font-size: 12px; color: var(--doux); }
.nv-stock { display: grid; gap: 2px; font-size: 12px; color: var(--doux); text-align: right; white-space: nowrap; }
.nv-stock b { margin-left: 4px; font-size: 14px; color: var(--texte); }
.nv-stock b.zero { color: var(--doux); font-weight: 600; }
@media (max-width: 430px) {
  .nouveaute { grid-template-columns: 46px minmax(0, 1fr); row-gap: 4px; }
  .nv-date { width: 46px; height: 46px; grid-row: span 2; }
  .nv-stock { display: flex; gap: 14px; text-align: left; }
}
.note-section { margin: 8px 2px 0; font-size: 12px; color: var(--doux); }

/* Les temps forts */
.titre-section { margin: 30px 2px 12px; font-family: var(--corps); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--doux); }
.temps-forts {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 1fr); gap: 12px;
  margin: 0 -16px; padding: 2px 16px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 16px;
  scrollbar-width: none;
}
.temps-forts::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .temps-forts { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; } }
.tf { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--trait); border-radius: 18px; background: var(--carte); scroll-snap-align: start; }
.tf-jours { font-size: 12.5px; font-weight: 600; color: var(--doux); }
.tf-jours strong { margin-right: 4px; font-family: var(--titre); font-size: 30px; line-height: 1.1; color: var(--accent); }
.tf-jours strong.mot { font-size: 22px; }
.tf-nom { font-size: 14.5px; font-weight: 700; }
.tf-date { font-size: 12px; color: var(--doux); }
.tf.proche { border-color: var(--bordeaux); background: var(--bordeaux); color: #fff; }
.tf.proche .tf-jours, .tf.proche .tf-date { color: rgba(255, 255, 255, .82); }
.tf.proche .tf-jours strong { color: #fff; }

.pied { max-width: 1080px; margin: 0 auto; padding: 12px 16px calc(32px + env(safe-area-inset-bottom)); font-size: 13px; text-align: center; color: var(--doux); }

/* Fenêtres */
dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0; border-radius: 24px;
  background: var(--carte); color: var(--texte);
  box-shadow: var(--ombre-forte);
}
dialog.large { width: min(680px, calc(100vw - 24px)); }
dialog[open] { animation: monte .2s ease-out; }
dialog::backdrop { background: rgba(30, 8, 8, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.d-tete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; background: var(--carte); }
.d-tete h2 { font-size: 20px; }
.d-corps { display: grid; gap: 14px; padding: 6px 20px calc(22px + env(safe-area-inset-bottom)); }
.d-corps .intro { margin: 0; }
.fermer {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--rose); color: var(--accent);
  font-size: 22px; line-height: 1; cursor: pointer;
}
@media (max-width: 560px) {
  dialog, dialog.large { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
}

/* L'équipe */
.ajout > summary { list-style: none; width: max-content; }
.ajout > summary::-webkit-details-marker { display: none; }
.ajout[open] > summary { margin-bottom: 12px; }
.ajout form { padding: 14px; border: 1px solid var(--trait); border-radius: 18px; background: var(--carte-2); }
.liste-equipe { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.personne { border: 1px solid var(--trait); border-radius: 16px; background: var(--carte-2); }
.personne > summary { display: flex; align-items: center; gap: 12px; padding: 12px; list-style: none; cursor: pointer; }
.personne > summary::-webkit-details-marker { display: none; }
.personne[open] > summary { border-bottom: 1px solid var(--trait); }
.pastille { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rose); color: var(--accent); font-family: var(--titre); font-weight: 700; }
.personne-infos { flex: 1; min-width: 0; display: grid; }
.personne-infos strong { font-size: 15px; }
.personne-infos small { font-size: 12px; color: var(--doux); overflow-wrap: anywhere; }
.etat { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.etat-actif { background: var(--vert-doux); color: var(--vert); }
.etat-invite { background: var(--ambre-doux); color: var(--ambre); }
.etat-nouveau, .etat-desactive { background: var(--trait); color: var(--doux); }
.badge-direction { margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.personne-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.personne-actions p { flex-basis: 100%; margin: 0 0 2px; font-size: 12.5px; color: var(--doux); }
#l-lien { font-size: 13px; color: var(--doux); }

/* Message rapide */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: #2B1B1B; color: #fff;
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: var(--ombre-forte);
  transform: translateX(-50%);
  animation: monte .2s ease-out;
}

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