/* NovaCBD — panneau « Mon compte » (connexion Google) et page Admin. Couleurs du thème (style.css). */

/* icône du compte une fois connecté : l'initiale dans une pastille dorée */
/* (un vrai élément, pas un ::after : les pseudo-éléments de .icon-btn servent au halo de survol) */
.icon-btn.est-connecte svg { opacity: 0; }
.compte-initiale {
  position: absolute; inset: 9px; z-index: 1; display: none; place-items: center; border-radius: 50%;
  background: var(--or); color: var(--sur-or); font: 800 .8rem var(--sans); pointer-events: none;
}
.icon-btn.est-connecte .compte-initiale { display: grid; }

/* panneau : même habillage que la vérification d'âge, avec un fondu */
.compte {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--fond-2) 72%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s ease;
}
.compte.est-ouvert { opacity: 1; }
.compte__carte {
  position: relative; width: 100%; max-width: 400px; padding: 2.4rem 2rem 2rem; border-radius: 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--ligne); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
  transform: translateY(14px) scale(.97); transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.compte.est-ouvert .compte__carte { transform: none; }
.compte h2 { font-size: 1.45rem; }
.compte p { margin-top: .7rem; font-size: .92rem; color: var(--doux); }
.compte__fermer {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--ligne); background: none; color: var(--texte);
  transition: border-color .2s, color .2s, transform .3s cubic-bezier(.3, 1.5, .5, 1);
}
.compte__fermer:hover { border-color: var(--or); color: var(--or-clair); transform: rotate(90deg); }
.compte__fermer svg { width: 18px; height: 18px; }
.compte__google { display: flex; justify-content: center; min-height: 44px; margin-top: 1.6rem; }
.compte__note { font-size: .8rem !important; color: color-mix(in srgb, var(--texte) 55%, transparent) !important; }
.compte__connecte { display: grid; justify-items: center; gap: .3rem; }
.compte__connecte[hidden], .compte__invite[hidden] { display: none; }
.compte__avatar {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: .8rem; overflow: hidden; border-radius: 50%;
  background: var(--or); color: var(--sur-or); font: 800 1.8rem var(--sans); box-shadow: 0 0 0 4px color-mix(in srgb, var(--or) 25%, transparent);
}
.compte__avatar img { width: 100%; height: 100%; object-fit: cover; }
.compte__email { margin-top: 0 !important; }
.compte__connecte .btn { margin-top: .8rem; min-width: 220px; }

/* ---------- Page Admin ---------- */

.admin { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem); }
.admin__tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.admin__tete h1 { margin-top: .8rem; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.admin__exemple {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem; border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--or) 55%, transparent); color: var(--or-clair); font-size: .78rem; font-weight: 700;
}
.admin__chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.admin__chiffre { padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--ligne); }
.admin__chiffre span { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.admin__chiffre strong { display: block; margin-top: .4rem; font-family: var(--chiffres); font-size: 2rem; font-weight: 800; line-height: 1.1; }
.admin__chiffre small { color: var(--accent-texte); font-weight: 600; }
.admin__grille { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; }
.admin__bloc { padding: 1.4rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--ligne); overflow-x: auto; }
.admin__bloc h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.admin table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin th { padding: .5rem .6rem; text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); border-bottom: 1px solid var(--ligne); }
.admin td { padding: .65rem .6rem; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.admin td.num { font-family: var(--chiffres); font-weight: 600; text-align: right; }
.admin tr:last-child td { border-bottom: 0; }
.etat { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.etat--ok { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent-texte); }
.etat--attente { background: color-mix(in srgb, var(--or) 18%, transparent); color: var(--or-clair); }
.etat--bas { background: rgba(224, 138, 110, .16); color: #e9a08a; }
.admin__refus { max-width: 460px; margin: clamp(3rem, 10vw, 7rem) auto; padding: 2.4rem 2rem; text-align: center; border-radius: 24px; background: var(--surface); border: 1px solid var(--ligne); }
.admin__refus h1 { font-size: 1.6rem; }
.admin__refus p { margin: .8rem 0 1.6rem; color: var(--doux); }
.admin [hidden] { display: none !important; }
@media (max-width: 1000px) { .admin__chiffres { grid-template-columns: repeat(2, 1fr); } .admin__grille { grid-template-columns: 1fr; } }

/* carte fidélité, dans le panneau du compte */
.fidelite { width: 100%; margin: 1rem 0 .4rem; padding: 1rem 1.1rem; border-radius: 16px; text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--or) 14%, var(--fond)), var(--fond)); border: 1px solid color-mix(in srgb, var(--or) 35%, transparent); }
.fidelite__tete { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.fidelite__tete strong { font-family: var(--display); font-weight: 400; font-size: 1rem; }
.fidelite__tete span { font-size: .74rem; color: var(--doux); }
.fidelite__cases { display: flex; gap: .55rem; margin-top: .8rem; }
.fidelite__case { display: grid; place-items: center; flex: 1; aspect-ratio: 1; max-width: 54px; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--or) 45%, transparent); color: color-mix(in srgb, var(--or) 35%, transparent);
  transition: background-color .4s, color .4s, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.fidelite__case svg { width: 45%; height: 45%; }
.fidelite__case.est-tamponnee { border-style: solid; background: var(--or); color: var(--sur-or); transform: rotate(-8deg); }
.fidelite__case--cadeau { border-style: solid; border-color: color-mix(in srgb, var(--or) 60%, transparent); color: var(--or-clair); }
.fidelite__cadeau { margin: .7rem 0 0 !important; font-size: .82rem !important; font-weight: 700; color: var(--or-clair) !important; }

/* dernières commandes, dans le panneau du compte */
.mes-commandes { width: 100%; margin: .6rem 0 .4rem; text-align: left; }
.mes-commandes > strong { display: block; margin-bottom: .4rem; font-family: var(--display); font-weight: 400; font-size: 1rem; }
.mes-commandes ul { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.mes-commandes li { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--ligne); font-size: .84rem; }
.mes-commandes li:last-child { border-bottom: 0; }
.mes-commandes li > span:last-child { text-align: right; }
.mes-commandes b { font-family: var(--chiffres); letter-spacing: .04em; }
.mes-commandes em { font-style: normal; font-weight: 700; }
.mes-commandes small { display: block; font-size: .72rem; color: var(--doux); }
.mes-commandes__statut--payee, .mes-commandes__statut--prete { color: var(--or-clair) !important; font-weight: 700; }
.mes-commandes__statut--expediee { color: var(--accent-texte) !important; font-weight: 700; }
