/* CDF Photobooth 2.0 — espace CDF Studio (administration). © CDF Studio, tous droits réservés. */
body.g { background: var(--gris); color: var(--encre); display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; min-height: 100dvh; }
.g-nav { background: var(--encre); color: #fff; padding: 1.6rem 1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.g-nav > * { flex: none; }
@media (max-height: 820px) and (min-width: 821px) { .g-logo { margin-bottom: .8rem; } .g-nav > a:not(.g-logo) { padding: .55rem .9rem; } .g-nav-bas { padding-top: .8rem; } }
.g-logo { margin: 0 .6rem 1.8rem; }
.g-nav > a:not(.g-logo) { padding: .75rem .9rem; border-radius: 14px; color: rgba(255,255,255,.72); font-weight: 600; text-decoration: none; }
.g-nav > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.g-nav > a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.g-nav-bas { margin-top: auto; display: flex; flex-direction: column; gap: .8rem; padding: 0 .6rem; font-size: .8rem; color: rgba(255,255,255,.5); }
.g-nav-bas .bt { color: #fff; align-self: flex-start; }
.en-ligne { display: inline; margin: 0; }
.g-corps { padding: clamp(1rem, 3vw, 2.2rem) clamp(1rem, 3.5vw, 2.6rem) 6rem; min-width: 0; }
.g-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.g-tete h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.g-tete p { margin: .5rem 0 0; color: var(--doux); max-width: 46rem; }
.g-tete small { color: var(--doux); display: block; margin-bottom: .35rem; }
.g-boutons { display: flex; flex-wrap: wrap; gap: .6rem; }
.g-bloc { background: #fff; border-radius: var(--rayon); padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.g-bloc h2 { font-size: 1.45rem; margin-bottom: .8rem; }
.g-note { color: var(--doux); font-size: .9rem; }
.g-chargement { color: var(--doux); }
code { background: var(--gris); padding: .1em .4em; border-radius: 6px; word-break: break-all; font-size: .9em; }
.g-cle { font-size: 1.2rem; padding: .3em .6em; }
.g-message { padding: .9rem 1.1rem; border-radius: 16px; font-weight: 600; margin: 0 0 1rem; }
.g-message-ok { background: #E3F1EA; color: #1F5E3C; }
.g-message-attente { background: #FBF1D6; color: #6E5400; }
.g-message-probleme { background: #FCE6E2; color: #A2352A; }
.pastille { display: inline-block; padding: .25em .75em; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.pastille-ok { background: #E3F1EA; color: #1F5E3C; }
.pastille-attente { background: #FBF1D6; color: #6E5400; }
.pastille-probleme { background: #FCE6E2; color: #A2352A; }
.pastille-neutre { background: var(--gris); color: var(--doux); }
.g-etat { display: grid; grid-template-columns: max-content 1fr; gap: .7rem 1.4rem; margin: 0; }
.g-etat dt { font-weight: 600; }
.g-etat dd { margin: 0; }

/* Formulaires */
.g-form { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin-bottom: 1rem; max-width: 40rem; }
.g-form label, .champ > label, .champ-tete label { font-weight: 600; font-size: .92rem; }
.g-form label { margin-top: .6rem; }
.g-form .bt { margin-top: .8rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
	width: 100%; font: inherit; padding: .7em .9em; border: 1px solid var(--ligne); border-radius: 12px; background: #fff; color: var(--encre); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px rgba(18,18,18,.08); }
textarea { min-height: 5rem; resize: vertical; }

/* Connexion */
body.g-connexion { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: var(--nuit); padding: 1rem; overflow: hidden; }
.g-connexion .aurore { position: fixed; inset: -25%; filter: blur(70px); opacity: .8; background: radial-gradient(38% 45% at 18% 28%, var(--petrole), transparent 70%), radial-gradient(32% 40% at 82% 22%, var(--corail), transparent 70%), radial-gradient(38% 38% at 72% 86%, var(--or), transparent 70%); }
.g-boite { position: relative; width: min(420px, 100%); background: #fff; border-radius: 28px; padding: 2rem; display: flex; flex-direction: column; gap: .8rem; }
.g-boite img { align-self: flex-start; filter: brightness(.2); }
.g-boite h1 { font-size: 2.2rem; }
.g-boite p { margin: 0; color: var(--doux); }
.g-boite form { display: flex; flex-direction: column; gap: .4rem; }
.g-boite label { font-weight: 600; margin-top: .4rem; }
.g-boite .bt { margin-top: 1rem; }
.g-boite .g-rester { display: flex; align-items: center; gap: .6rem; font-weight: 500; margin-top: .6rem; cursor: pointer; }
.g-boite .g-rester input { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--encre); flex: none; }

/* Liste des événements */
.ev-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.ev-carte { background: #fff; border-radius: var(--rayon); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .7rem; text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color .15s; }
.ev-carte:hover { border-color: var(--encre); }
.ev-carte small { color: var(--doux); }
.ev-carte h2 { font-size: 1.5rem; }
.ev-carte .ev-pied { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.ev-carte.passe { opacity: .7; }
.ev-vide { background: #fff; border-radius: var(--rayon); padding: 2.4rem; text-align: center; }
.ev-vide h2 { font-size: 1.8rem; margin-bottom: .6rem; }
.ev-nouveau { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .8rem; align-items: end; }
.ev-nouveau .champ { display: flex; flex-direction: column; gap: .35rem; }
.ev-nouveau .plein { grid-column: 1 / -1; }
.ev-titre-liste { font-size: 1.2rem; margin: 1.6rem 0 .8rem; color: var(--doux); }

/* Fiche d'un événement */
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.fiche-cote { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.fiche-tete h1 { margin-top: .1rem; }
.fiche-etat { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.g-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* L'essentiel : le tirage éclairé à gauche, les réglages du quotidien à droite */
.g-essentiel { display: grid; grid-template-columns: minmax(240px, 34%) minmax(0, 1fr); background: #fff; border-radius: var(--rayon); overflow: hidden; margin-bottom: 1.2rem; }
.es-apercu { background: radial-gradient(70% 70% at 50% 45%, #22302F, var(--nuit)); display: grid; place-items: center; padding: 2rem 1.4rem; }
.es-tirage { --es-fond: #fff; --es-texte: #121212; --es-police: "Playfair Display", Georgia, serif; width: 100%; max-width: 300px; aspect-ratio: 3 / 2; background: var(--es-fond); border-radius: 3px; padding: 4%; display: grid; grid-template-columns: 62% 1fr; gap: 4%; box-shadow: 0 24px 50px rgba(0,0,0,.5); transform: rotate(-2deg); }
.es-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 5%; }
.es-photos i { background: linear-gradient(160deg, #6E8F8E, #3B5352); }
.es-photos i:nth-child(2) { background: linear-gradient(160deg, #C9A86B, #8A6E3F); }
.es-photos i:nth-child(3) { background: linear-gradient(160deg, #D98C7D, #9C5448); }
.es-photos i:nth-child(4) { background: linear-gradient(160deg, #8A8FA8, #555A73); }
.es-texte { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--es-texte); min-width: 0; gap: .25rem; }
.es-texte[hidden] { display: none; }
.es-texte b { font-family: var(--es-police); font-weight: 700; font-size: clamp(.8rem, 1.5vw, 1.15rem); line-height: 1.05; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.es-texte span { font-size: .6rem; font-weight: 600; overflow-wrap: anywhere; }
.es-texte small { font-size: .52rem; opacity: .8; }
.es-champs { padding: 1.4rem 1.5rem 1.5rem; min-width: 0; }
.es-champs h2 { font-size: 1.6rem; }
.es-note { margin: .35rem 0 1.1rem; color: var(--doux); font-size: .92rem; }
.es-champs .themes button { height: 84px; }
.es-champs .themes .t-verre::after { display: none; }

/* Onglets des réglages */
.g-reglages { background: #fff; border-radius: var(--rayon); }
.g-onglets { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .3rem; padding: .6rem; overflow-x: auto; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--ligne); border-radius: var(--rayon) var(--rayon) 0 0; }
.g-onglets::-webkit-scrollbar { display: none; }
.g-onglets button { flex: none; display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; padding: .6em 1em; background: transparent; color: var(--doux); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.g-onglets button:hover { background: var(--gris); color: var(--encre); }
.g-onglets button[aria-selected="true"] { background: var(--encre); color: #fff; }
.g-volet { padding: 1.4rem 1.5rem 1.6rem; }
.g-volet[hidden] { display: none; }
.volet-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .8rem 1.4rem; margin-bottom: 1.3rem; }
.volet-tete h2 { font-size: 1.6rem; }
.volet-tete p { margin: .4rem 0 0; color: var(--doux); max-width: 38rem; }
.volet-etat { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; max-width: 18rem; text-align: right; }
.volet-etat .g-note { font-size: .82rem; }
.g-lien { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; font-weight: 600; color: var(--encre); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.champ-bas { justify-content: flex-end; }
body.g-modifie .g-corps { padding-bottom: 7rem; }
.champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; }
.champ { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.champ.large { grid-column: 1 / -1; }
.champ .aide { color: var(--doux); font-size: .85rem; margin: 0; }
.champ-case { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; background: var(--gris); border-radius: 14px; padding: .7rem .9rem; }
.champ-case label { font-weight: 500; }
.champ-curseur .champ-tete { display: flex; justify-content: space-between; }
.champ-curseur output { font-weight: 600; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--encre); }
.couleur { display: flex; align-items: center; gap: .6rem; }
.couleur input[type=color] { width: 48px; height: 44px; border: 1px solid var(--ligne); border-radius: 12px; padding: 3px; background: #fff; cursor: pointer; }
.couleur input[type=text] { width: 8.5em; font-variant-numeric: tabular-nums; }
.puces { display: flex; flex-wrap: wrap; gap: .4rem; }
.puces button { border: 1px solid var(--ligne); background: #fff; border-radius: 999px; padding: .5em .95em; font-weight: 600; font-size: .88rem; cursor: pointer; }
.puces button[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.themes button { border: 0; border-radius: 16px; height: 110px; padding: .7rem; display: flex; align-items: flex-end; font-weight: 700; color: #fff; cursor: pointer; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--corail); }
.themes .t-verre { background: radial-gradient(circle at 25% 30%, rgba(255,200,120,.6) 0 14px, transparent 34px), radial-gradient(circle at 80% 25%, rgba(255,120,140,.5) 0 16px, transparent 40px), linear-gradient(160deg, #4a3c46, #151018); }
.themes .t-verre::after { content: ""; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 60%; height: 22px; border-radius: 999px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); }
.themes .t-aurore { background: radial-gradient(60% 60% at 15% 20%, #2B6A6C, transparent 70%), radial-gradient(60% 60% at 90% 25%, #F76E60, transparent 70%), radial-gradient(60% 60% at 70% 100%, #D4AF37, transparent 70%), #12191b; }
.themes .t-mosaique { background: conic-gradient(from 90deg at 62% 50%, #D4AF37 0 25%, #F76E60 0 50%, #2B6A6C 0 75%, #1c1c1f 0); }
.themes span { position: relative; z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.image-champ { display: flex; align-items: center; gap: .8rem; }
.image-apercu { width: 84px; height: 64px; border-radius: 12px; background: var(--gris) center / contain no-repeat; flex: none; box-shadow: inset 0 0 0 1px var(--ligne); }
.image-apercu.damier { background-color: #fff; background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.images-grille { display: flex; flex-wrap: wrap; gap: .5rem; }
.images-grille figure { margin: 0; position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--gris); }
.images-grille img { width: 100%; height: 100%; object-fit: contain; }
.images-grille .retirer { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.ajout { width: 84px; height: 84px; border-radius: 12px; border: 2px dashed var(--ligne); display: grid; place-items: center; color: var(--doux); font-size: 1.6rem; cursor: pointer; position: relative; background: #fff; }
.ajout input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ajout.envoi { opacity: .5; }

/* Liens et QR codes */
.liens h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.lien { display: grid; grid-template-columns: 72px 1fr; gap: .4rem .9rem; padding: .9rem 0; border-top: 1px solid var(--gris); }
.lien:first-of-type { border-top: 0; }
.lien .qr { width: 72px; height: 72px; grid-row: span 2; }
.lien .qr svg { width: 100%; height: 100%; display: block; }
.lien b { display: block; }
.lien small { color: var(--doux); font-size: .8rem; display: block; word-break: break-all; }
.lien .acts { display: flex; flex-wrap: wrap; gap: .35rem; }
.lien .acts .bt { min-height: 32px; padding: .35em .8em; font-size: .82rem; }
.lien.ferme { opacity: .55; }
.g-sauver { position: fixed; right: clamp(1rem, 3vw, 2.4rem); bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: .6rem; align-items: center; background: var(--encre); color: #fff; padding: .5rem .5rem .5rem 1.1rem; border-radius: 999px; box-shadow: 0 14px 40px rgba(0,0,0,.25); transform: translateY(150%); transition: transform .25s; }
.g-sauver.visible { transform: none; }
.g-sauver .bt { background: #fff; color: var(--encre); min-height: 42px; }
.g-toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); background: var(--encre); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; z-index: 30; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.zone-danger { display: flex; flex-wrap: wrap; gap: .6rem; }

@media (max-width: 1100px) { .fiche { grid-template-columns: minmax(0, 1fr); } .fiche-cote { position: static; } }
@media (max-width: 900px) { .g-essentiel { grid-template-columns: 1fr; } .es-apercu { padding: 1.4rem; } .es-tirage { max-width: 260px; } }
@media (max-width: 760px) {
	body.g { grid-template-columns: 1fr; }
	.g-nav { position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: .6rem .8rem; gap: .2rem; scrollbar-width: none; }
	.g-logo { margin: 0 .6rem 0 0; flex: none; }
	.g-logo img { height: 24px; }
	.g-nav > a:not(.g-logo) { white-space: nowrap; padding: .55rem .75rem; font-size: .9rem; }
	.g-nav-bas { display: none; }
	.champs { grid-template-columns: 1fr; }
	.themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.themes button { height: 84px; font-size: .85rem; }
	.ev-nouveau { grid-template-columns: 1fr; }
	.g-volet, .es-champs { padding: 1.1rem 1rem 1.3rem; }
	.volet-etat { align-items: flex-start; text-align: left; max-width: none; }
	.g-onglets { top: 52px; flex-wrap: nowrap; }
	.g-sauver { left: 1rem; right: 1rem; justify-content: space-between; }
}
.fiche-principal, .g-reglages, .g-corps { min-width: 0; }

/* Compositeur du tirage : images et logos placés à la main */
.compo-corps { display: flex; flex-direction: column; gap: .8rem; margin-top: .3rem; }
.compo-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.compo-ajout { position: relative; }
.compo-ajout input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compo-ajout.envoi { opacity: .5; }
.compo-scene { display: grid; place-items: center; height: clamp(260px, 42vw, 440px); padding: 1.2rem; border-radius: 18px; background: radial-gradient(70% 70% at 50% 45%, #22302F, var(--nuit)); }
.compo-tirage { position: relative; max-width: 100%; max-height: 100%; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.5); touch-action: none; user-select: none; -webkit-user-select: none; }
.compo-photo { position: absolute; display: grid; place-items: center; background: linear-gradient(160deg, #8FA9A8, #4F6968); color: rgba(255,255,255,.85); font-style: normal; font-size: .75rem; font-weight: 600; pointer-events: none; }
.compo-pied { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; text-align: center; pointer-events: none; overflow: hidden; }
.compo-pied b { font-size: clamp(.7rem, 1.6vw, 1.1rem); line-height: 1.05; overflow-wrap: break-word; max-width: 92%; }
.compo-pied span, .compo-pied small { font-family: Inter, sans-serif; font-size: .6rem; }
.compo-cadre { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compo-calque { position: absolute; max-width: none; cursor: grab; -webkit-user-drag: none; }
.compo-calque:active { cursor: grabbing; }
.compo-calque.choisi { outline: 2px dashed #fff; outline-offset: 3px; filter: drop-shadow(0 0 4px rgba(0,0,0,.6)); }
.compo-outils { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1.2rem; padding: 1rem; border-radius: 16px; background: var(--gris); }
.compo-boutons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.compo-boutons .seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: #fff; }
.compo-boutons .seg button { border: 0; border-radius: 999px; padding: .5em .95em; background: transparent; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--doux); }
.compo-boutons .seg button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.compo-astuce { margin: 0; }
@media (max-width: 760px) { .compo-outils { grid-template-columns: 1fr; } .compo-scene { height: 300px; padding: .8rem; } }

/* Sur mon téléphone */
.tel-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tel-app { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.tel-tete { display: flex; gap: 1rem; align-items: center; }
.tel-tete img { border-radius: 18px; flex: none; }
.tel-tete h2 { margin: 0 0 .25rem; }
.tel-tete p { margin: 0; }
.tel-qr { width: min(220px, 70%); align-self: center; background: #fff; }
.tel-qr svg { display: block; width: 100%; height: auto; }
.tel-legende { margin: 0; font-size: .9rem; color: var(--doux); text-align: center; }
.tel-installer { align-self: center; }
.tel-etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .5rem 2rem; }
.tel-etapes ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .5rem; }
.tel-note { grid-column: 1 / -1; margin: .6rem 0 0; }
@media (display-mode: standalone) { .tel-qr, .tel-legende { display: none; } }
.tel-installer[hidden] { display: none; }

/* Mes dossiers */
.ds-nouveau { display: grid; gap: .5rem; }
.ds-nouveau label { font-weight: 600; }
.ds-nouveau div { display: flex; gap: .6rem; flex-wrap: wrap; }
.ds-nouveau input { flex: 1 1 240px; min-width: 0; }
.ds-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.ds-carte { display: flex; flex-direction: column; gap: .25rem; padding: .7rem .7rem 1rem; background: #fff; border-radius: var(--rayon); text-decoration: none; color: inherit; border: 2px solid transparent; }
.ds-carte:hover { border-color: var(--encre); }
.ds-couv { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--gris); display: grid; place-items: center; margin-bottom: .45rem; }
.ds-couv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-couv i { color: var(--doux); font-style: normal; font-size: .9rem; }
.ds-carte b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-carte small { color: var(--doux); }
.ds-tete small a { color: var(--doux); }
.ds-tete h1 { overflow-wrap: anywhere; }
.ds-ajout { cursor: pointer; }
.ds-danger { color: #B3261E; }
.ds-barre { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1rem; margin: 0 0 1rem; background: #fff; border-radius: var(--rayon); box-shadow: 0 8px 24px rgba(18,18,18,.06); }
.ds-barre-sel { box-shadow: inset 0 0 0 2px var(--encre), 0 8px 24px rgba(18,18,18,.08); }
.ds-sel { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ds-sel span { color: var(--doux); font-size: .9rem; }
.ds-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ds-actions .bt { min-height: 42px; padding: .55em 1.1em; }
.ds-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); gap: .6rem; }
.ds-image { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--gris); aspect-ratio: 1; cursor: pointer; }
.ds-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.ds-image[aria-pressed=true] img { transform: scale(.9); border-radius: 10px; }
.ds-image[aria-pressed=true] { box-shadow: inset 0 0 0 3px var(--encre); }
.ds-coche { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(18,18,18,.25); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ds-image[aria-pressed=true] .ds-coche { background: var(--encre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ds-vide h2 { margin-bottom: .4rem; }
.ds-fond { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(18,18,18,.55); backdrop-filter: blur(4px); }
.ds-boite { width: min(540px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; background: #fff; border-radius: 26px; padding: 1.5rem; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.ds-boite h2 { font-size: 1.6rem; margin-bottom: .6rem; }
.ds-boite p { color: var(--doux); margin: 0 0 1rem; }
.ds-boite form, .ds-champs { display: grid; gap: .7rem; }
.ds-champs label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.ds-ou { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 1rem 0 .4rem; }
.ds-ou label { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 16px; background: var(--gris); border: 2px solid transparent; cursor: pointer; }
.ds-ou label:has(input:checked) { border-color: var(--encre); background: #fff; }
.ds-ou input { margin-top: .2rem; accent-color: var(--encre); }
.ds-ou span { display: flex; flex-direction: column; }
.ds-ou small { color: var(--doux); font-size: .8rem; }
.ds-pied { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.ds-rouge { background: #B3261E; }
.ds-toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 2rem)); background: var(--encre); color: #fff; padding: .8rem 1.2rem; border-radius: 16px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
@media (max-width: 760px) {
	.ds-barre { top: 52px; padding: .7rem; }
	.ds-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
	.ds-actions .bt { width: 100%; white-space: normal; text-align: center; line-height: 1.2; }
	.ds-ou { grid-template-columns: 1fr; }
	.ds-fond { align-items: end; padding: 0; }
	.ds-boite { border-radius: 26px 26px 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}
.g-etapes-gp { margin: .4rem 0 1rem; padding-left: 1.3rem; display: grid; gap: .4rem; }

/* Bornes de tes proches (page Ma borne) */
.pr-bloc { margin-top: 1.4rem; }
.pr-creer { display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; align-items: end; margin-top: 1rem; }
.pr-creer .champ { margin: 0; }
.pr-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.pr-tete h2 { margin-bottom: .2rem; }
.pr-corps { display: grid; grid-template-columns: 150px 1fr; gap: 1.2rem; margin-top: 1rem; align-items: start; }
.pr-qr { max-width: 150px; }
.pr-liens p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.pr-liens form { margin-top: .8rem; }
.pr-mdp { display: flex; flex-wrap: wrap; gap: .5rem; }
.pr-mdp input { flex: 1 1 12rem; min-width: 0; }
@media (max-width: 820px) {
	.pr-creer { grid-template-columns: 1fr; }
	.pr-corps { grid-template-columns: 1fr; }
	.pr-qr { max-width: 180px; }
}
.g-ligne-bts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .4rem 0; }
#cle-studio { word-break: break-all; font-size: 1rem; }

/* Version complète */
.g-complete { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-radius: 14px; background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(247,110,96,.10)); border: 1px solid rgba(212,175,55,.45); }
.g-complete p { margin: 0; flex: 1 1 18rem; }
.g-licences { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.g-licences li { display: grid; grid-template-columns: 1fr auto; gap: .4rem .8rem; align-items: center; padding: .8rem; border-radius: 12px; background: rgba(0,0,0,.04); }
.g-licences li > div { grid-column: 1 / -1; }
.g-lic-cle { font-size: .72rem; word-break: break-all; max-height: 3.6em; overflow: hidden; }
.g-nav-bas span a { color: inherit; }
