/*
 * uad-espace.css — Mon espace (E1, D-542), page /espace seule.
 * Chargee par membre/espace.blade.php, versionnee par EspaceController (meme formule que $uadAvoir).
 * Controle : blogv2:avoirs, liste AVOIRS_PAGES (A == B == C) ; deposee dans les DEUX racines (E-205).
 * Reprend le style en ligne de membre/partials/privileges.blade.php (A-53), retire par E1.
 * Mobile d abord : 1 colonne, puis 2 et 3 colonnes par requetes de conteneur (sans conteneur : 1 colonne, lisible).
 * Aucun mode sombre (le site n en a pas). prefers-reduced-motion respecte.
 */

/* La boite des ecrans membre (560 px) s elargit pour /espace seule. Sans :has, elle reste a 560 px. */
.boite:has(.uad-esp-carte){max-width:1100px}
@media (max-width:560px){.boite:has(.uad-esp-carte){margin:16px auto;padding:20px 14px}}

/* ---- Bandeau d echeance (D-381) et titres : repris a l identique d A-53 ---- */
.uad-priv-bandeau{border-left:5px solid;padding:12px 14px;border-radius:8px;margin:0 0 18px;font-size:.9rem;line-height:1.5}
.uad-priv-bandeau strong{display:block;margin-bottom:3px}
.uad-priv-bandeau a{font-weight:700}
.uad-priv-bleu{background:#e8f6fd;border-color:#00b7ff}
.uad-priv-or{background:#fdf6e3;border-color:#c9962c}
.uad-priv-orange{background:#fdeee4;border-color:#f36f21}
.uad-priv-echu{background:#fdecec;border-color:#c0392b}
.uad-priv-titre{font-size:1.15rem;color:var(--bleu);margin:28px 0 6px}

/* ---- La carte de membre ---- */
.uad-esp-carte{
  --navy:#0a1628;--abyss:#000814;--steel:#b8c7d9;--cyan:#00b7ff;--gemme:#8a97a8;
  position:relative;overflow:hidden;color:#fff;border-radius:18px;margin:0 0 18px;
  background:
    radial-gradient(900px 420px at 85% -20%,#0f3a66 0%,transparent 60%),
    radial-gradient(600px 300px at 10% 120%,#00b7ff33 0%,transparent 60%),
    linear-gradient(180deg,var(--navy),var(--abyss));
  container-type:inline-size;
}
.uad-esp-carte::before{content:"";position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(#1f365466 1px,transparent 1px),linear-gradient(90deg,#1f365466 1px,transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(ellipse at 70% 40%,#000 30%,transparent 75%);mask-image:radial-gradient(ellipse at 70% 40%,#000 30%,transparent 75%)}
.uad-esp-carte-in{position:relative;display:grid;grid-template-columns:1fr;gap:20px;padding:22px 20px}
@container (min-width:720px){.uad-esp-carte-in{grid-template-columns:1.4fr 1fr;gap:28px;padding:34px 36px}}
.boite .uad-esp-carte .sous{color:var(--steel);font-size:.9rem;margin:0}
.boite .uad-esp-carte h1{font-family:"Dela Gothic One",Impact,sans-serif;font-weight:400;color:#fff;font-size:1.5rem;line-height:1.2;margin:4px 0 0;overflow-wrap:anywhere}
@container (min-width:720px){.boite .uad-esp-carte h1{font-size:2rem}}
.uad-esp-lead{color:var(--steel);max-width:56ch;margin:12px 0 0;font-size:.95rem}
.uad-esp-badge{display:inline-flex;align-items:center;gap:10px;margin-top:16px;padding:8px 16px 8px 8px;border-radius:999px;background:#ffffff12;border:1px solid #ffffff2a;max-width:100%}
.uad-esp-gemme{width:32px;height:32px;border-radius:50%;flex:none;background:radial-gradient(circle at 35% 30%,#fff 0%,var(--gemme) 35%,#0a1628 100%);box-shadow:0 0 0 2px #ffffff33,0 0 22px var(--gemme)}
.uad-esp-badge b{display:block;font-family:"Dela Gothic One",Impact,sans-serif;font-weight:400;font-size:1rem;letter-spacing:.02em}
.uad-esp-badge small{display:block;color:var(--steel);font-size:.78rem}
.uad-esp-niv-starter{--gemme:#00b7ff}
.uad-esp-niv-silver{--gemme:#c0c9d4}
.uad-esp-niv-echu{--gemme:#6b7787}
.uad-esp-niv-gold,.uad-esp-niv-fondateur{--gemme:#c9962c}
.uad-esp-niv-platinum{--gemme:#9fd3e8}
.uad-esp-chiffres{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:end}
@container (min-width:480px){.uad-esp-chiffres{grid-template-columns:repeat(3,1fr)}}
@container (min-width:720px){.uad-esp-chiffres{grid-template-columns:1fr 1fr}}
.uad-esp-chiffre{background:#0a162899;border:1px solid #00e5ff40;border-radius:14px;padding:12px 12px 10px;min-width:0}
.uad-esp-chiffre b{display:block;font-family:"Dela Gothic One",Impact,sans-serif;font-weight:400;font-size:1.6rem;color:var(--cyan);line-height:1;font-variant-numeric:tabular-nums}
.uad-esp-chiffre span{display:block;font-size:.78rem;color:var(--steel);margin-top:6px;line-height:1.3}
.uad-esp-off b{color:var(--steel);opacity:.6}

/* ---- Rangees et tuiles ---- */
.uad-esp-rangees{container-type:inline-size}
.boite .uad-esp-rangee{font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#56657a;margin:18px 0 8px;display:flex;align-items:center;gap:10px}
.uad-esp-rangee::after{content:"";flex:1;height:1px;background:#dfe6ee}
.uad-esp-tuiles{display:grid;grid-template-columns:1fr;gap:14px}
@container (min-width:520px){.uad-esp-tuiles{grid-template-columns:1fr 1fr}}
@container (min-width:820px){.uad-esp-tuiles{grid-template-columns:repeat(3,1fr)}}
.uad-esp-tuile{background:#fff;border:1px solid #dfe6ee;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;min-width:0;transition:transform .18s ease,box-shadow .18s ease}
.uad-esp-tuile:hover{transform:translateY(-2px);box-shadow:0 10px 30px #0b3d6722}
@media (prefers-reduced-motion:reduce){.uad-esp-tuile,.uad-esp-tuile:hover{transition:none;transform:none}}

/* La scene : image deposee, ou repli (degrade bleu nuit + quadrillage + icone du bloc). */
.uad-esp-scene{position:relative;aspect-ratio:16/9;overflow:hidden;color:#fff;background:linear-gradient(160deg,#102a4d,#0a1628 55%,#000814)}
.uad-esp-scene::before{content:"";position:absolute;inset:0;
  background-image:linear-gradient(#1f365480 1px,transparent 1px),linear-gradient(90deg,#1f365480 1px,transparent 1px);background-size:32px 32px;
  -webkit-mask-image:radial-gradient(ellipse at 80% 20%,#000 20%,transparent 70%);mask-image:radial-gradient(ellipse at 80% 20%,#000 20%,transparent 70%)}
.uad-esp-scene::after{content:"";position:absolute;width:60%;aspect-ratio:1;border-radius:50%;right:-10%;top:-30%;background:radial-gradient(circle,#00b7ff55,transparent 65%)}
.uad-esp-scene-image::before,.uad-esp-scene-image::after{display:none}
.uad-esp-scene img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.uad-esp-scene-ico{position:absolute;right:18px;bottom:10px;font-size:3.2rem;line-height:1;filter:drop-shadow(0 0 12px #00e5ff99);z-index:1}
.uad-priv-verrouille .uad-esp-scene>img,.uad-priv-verrouille .uad-esp-scene-ico,.uad-priv-verrouille .uad-esp-scene::after{filter:saturate(.25) brightness(.55)}
.uad-priv-verrouille .uad-esp-scene{background:linear-gradient(160deg,#1a2433,#0d1420 55%,#05080d)}
.uad-esp-cadenas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:999px;background:#000814cc;box-shadow:0 0 0 1px #ffffff33;color:#fff;font-size:.82rem;font-weight:700;white-space:nowrap}
.uad-esp-cadenas svg{flex:none;display:block}

.uad-esp-corps{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1;font-size:.88rem}
.boite .uad-esp-corps h4{font-size:1rem;margin:0;color:var(--txt);line-height:1.3}
.uad-esp-corps p{margin:0;color:#3d4650}
.uad-esp-corps ul{margin:0;padding-left:18px}
.uad-esp-corps li{overflow-wrap:anywhere}
.uad-priv-etiq{align-self:flex-start;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:3px 9px;border-radius:999px;white-space:nowrap}
.uad-priv-ouvert .uad-priv-etiq{background:#eaf6ee;color:#1e6b3a}
.uad-priv-partiel .uad-priv-etiq{background:#e8f0f8;color:#0b3d67}
.uad-priv-attente .uad-priv-etiq{background:#fdf6e3;color:#7a5a12}
.uad-priv-jeton .uad-priv-etiq{background:#e8f6fd;color:#005f86}
.uad-priv-verrouille{background:#f7f8fa}
.uad-priv-verrouille .uad-priv-etiq{background:#e6e9ee;color:#4a5560}
.uad-esp-corps .uad-priv-lien{margin-top:auto;font-weight:600}

/* ---- E2 (D-542) : la page d un dossier, /tag/SLUG designe par le reglage dossiers_espace ----
 * Cette feuille est aussi chargee par site/taxonomie.blade.php pour un dossier seulement (hors reglage : page inchangee).
 * Couverture = la scene des tuiles (.uad-esp-scene, image ou repli) ; texte a cote des 720 px, dessous avant. */
.uad-dos-tete{display:grid;grid-template-columns:1fr;gap:16px;align-items:center;margin:0 0 24px}
@media (min-width:720px){.uad-dos-tete{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:28px}}
.uad-dos-scene{border-radius:16px}
.uad-dos-texte{min-width:0}
.uad-dos-texte .uad-titre-page{overflow-wrap:anywhere}
.uad-dos-phrase{margin:8px 0 0;color:#3d4650;max-width:60ch}
.uad-dos-compte{margin:10px 0 0;font-weight:700;color:#0b3d67;font-size:.9rem}

/* ---- E3 (D-656 → D-665) : la bande « Les niveaux », entre les tuiles et « Mon compte » ----
 * Prefixe uad-esp-nvx-* (D-663) ; la couleur d une carte vient de sa classe uad-esp-niv-<niveau> ci-dessus (Invite : couleur par defaut).
 * 5 colonnes, 3 sous 900 px, 2 sous 560 px (maquette V3) ; bouton et lien : cibles d au moins 44 px. */
.uad-esp-nvx{--gemme:#8a97a8;margin:0 0 8px}
.uad-esp-nvx-grille{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding-top:10px}
@media (max-width:900px){.uad-esp-nvx-grille{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:560px){.uad-esp-nvx-grille{grid-template-columns:repeat(2,minmax(0,1fr))}}
.uad-esp-nvx-carte{position:relative;background:#fff;border:1px solid #dfe6ee;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:6px;min-width:0;font-size:.82rem}
.uad-esp-nvx-gemme{width:26px;height:26px;border-radius:50%;flex:none;background:radial-gradient(circle at 35% 30%,#fff 0%,var(--gemme) 35%,#0a1628 100%);box-shadow:0 0 12px var(--gemme)}
.boite .uad-esp-nvx-carte h3{font-size:.98rem;margin:0;color:var(--txt);line-height:1.3;overflow-wrap:anywhere}
.boite .uad-esp-nvx-carte p{margin:0}
.uad-esp-nvx-duree{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:#56657a}
.uad-esp-nvx-prix{color:#0b3d67;font-weight:700;overflow-wrap:anywhere}
.uad-esp-nvx-carte ul{margin:0;padding-left:16px;color:#3d4650}
.uad-esp-nvx-carte li{overflow-wrap:anywhere}
/* .boite a (0,1,1) colore les liens de la boite : le bouton le surclasse par .boite, sinon son texte prend la couleur de son fond. */
.boite .uad-esp-nvx-bouton{margin-top:auto;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 10px;border-radius:10px;background:#0b3d67;color:#fff;font-weight:700;text-align:center;text-decoration:none;overflow-wrap:anywhere;transition:background-color .18s ease}
.boite .uad-esp-nvx-bouton:hover,.boite .uad-esp-nvx-bouton:focus-visible{background:#00b7ff;color:#001}
.boite .uad-esp-nvx-carte .uad-esp-nvx-inclus{margin-top:auto;color:#1e6b3a;font-weight:700}
.uad-esp-nvx-courant{border-color:#00b7ff;box-shadow:0 0 0 3px #00b7ff22}
.uad-esp-nvx-pastille{position:absolute;top:-10px;right:10px;background:#00b7ff;color:#001;font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:2px 8px;border-radius:999px;white-space:nowrap}
.uad-esp-nvx-lien{margin:6px 0 0;font-size:.88rem}
.uad-esp-nvx-lien a{display:inline-flex;align-items:center;min-height:44px;font-weight:600}
@media (prefers-reduced-motion:reduce){.uad-esp-nvx-bouton{transition:none}}

/* ---- R1 (D-463, D-675, D-678) : la tuile « Mon reseau », entre les tuiles et « Les niveaux » ----
 * Une seule tuile, pleine largeur (la grille des tuiles passe a 2 et 3 colonnes par conteneur : surclasse ici).
 * Les boutons Copier / Partager surclassent .boite button (pleine largeur, marge haute) ; le tableau des invites
 * surclasse .boite td:first-child (45 %). Aucun chiffre, aucun montant : la tuile montre une adresse et des dates. */
.uad-esp-reseau-grille{grid-template-columns:1fr;margin-top:14px}
.uad-esp-reseau-lien{overflow-wrap:anywhere}
.uad-esp-reseau-lien code{font-size:.95rem;font-weight:700;color:#0b3d67;background:#e8f0f8;padding:3px 8px;border-radius:6px}
.uad-esp-reseau-boutons{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.boite .uad-esp-reseau-bouton{width:auto;margin:0;min-height:40px;padding:8px 14px;border-radius:8px;background:#0b3d67;color:#fff;font-size:.88rem;font-weight:700;border:0;cursor:pointer}
.boite .uad-esp-reseau-bouton:hover,.boite .uad-esp-reseau-bouton:focus-visible{background:#00b7ff;color:#001}
.uad-esp-reseau-compte{font-weight:600}
.boite .uad-esp-reseau-table{margin-top:4px;font-size:.84rem}
.boite .uad-esp-reseau-table th{text-align:left;font-weight:700;color:#56657a;padding:4px 8px 4px 0;border-bottom:1px solid #dfe6ee}
.boite .uad-esp-reseau-table td{padding:6px 8px 6px 0;border-bottom:1px solid #eef1f4;overflow-wrap:anywhere}
.boite .uad-esp-reseau-table td:first-child{width:auto;color:inherit;white-space:nowrap}
/* ---- R2 (D-463, D-483, D-675) : la tuile « Mes gains », apres « Mon reseau » ----
 * Meme forme que la tuile du reseau : pleine largeur, deux soldes en tete, un tableau de lignes. Aucun chiffre ici :
 * les montants viennent de la base, convertis en unites par le controleur (centiemes partout en base, D-675). */
.uad-esp-gains-grille{grid-template-columns:1fr;margin-top:14px}
.uad-esp-gains-soldes{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline}
.uad-esp-gains-soldes strong{color:#56657a;font-size:.84rem;text-transform:uppercase;letter-spacing:.04em}
.uad-esp-gains-soldes span[data-uad-gains-solde]{font-size:1.05rem;font-weight:700;color:#0b3d67;background:#e8f0f8;padding:3px 10px;border-radius:6px}
.uad-esp-gains-essai{font-size:.88rem;color:#56657a}
.uad-esp-gains-compte{font-weight:600}
.boite .uad-esp-gains-table{margin-top:4px;font-size:.84rem}
.boite .uad-esp-gains-table th{text-align:left;font-weight:700;color:#56657a;padding:4px 8px 4px 0;border-bottom:1px solid #dfe6ee}
.boite .uad-esp-gains-table td{padding:6px 8px 6px 0;border-bottom:1px solid #eef1f4;overflow-wrap:anywhere}
.boite .uad-esp-gains-table td:first-child{width:auto;color:inherit;white-space:nowrap}
.boite .uad-esp-gains-table tr[data-uad-gain-statut="annulee"] td{color:#8a97a8;text-decoration:line-through}
.boite .uad-esp-gains-table tr[data-uad-gain-statut="annulee"] td:last-child{text-decoration:none}
