/* DiaspoRelais – publication vidéo. Charte « Encre & or » : encre = action, or = rare (ici : l'anneau d'enregistrement). */
html.drv-open, html.drv-open body { overflow: hidden !important; }
/* Éléments flottants du site masqués pendant la publication (barre de navigation mobile, bouton +, chat, retour en haut). */
html.drv-open .dr-mobile-nav,
html.drv-open .dr-mobile-fab,
html.drv-open #wpadminbar { display: none !important; }

.drv {
	--ink: #101020;
	--ink-2: #24244A;
	--gold: #FFC000;
	--gold-dk: #9A6D0B;
	--sand: #F4EFE9;
	--paper: #FFFFFF;
	--muted: #6B6878;
	--line: #E6E1DA;
	--danger: #B3261E;

	position: fixed;
	inset: 0;
	z-index: 2147483000; /* au-dessus de tout élément du thème ou d'un plugin */
	background: var(--ink);
	color: var(--ink);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}
.drv *, .drv *::before, .drv *::after { box-sizing: border-box; }
.drv button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.drv h1, .drv h2, .drv h3, .drv p { margin: 0; }
.drv svg { display: block; }
.drv :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Icônes rondes translucides */
.drv-icon {
	width: 44px; height: 44px; flex: none;
	display: grid; place-items: center;
	border: 0; border-radius: 50%;
	background: rgba(16, 16, 32, 0.45);
	color: #fff; padding: 0;
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.drv-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drv-icon--dark { background: transparent; color: var(--ink); backdrop-filter: none; }

/* =================================================================== */
/* Écran 1 : caméra                                                    */
/* =================================================================== */
.drv-cam { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.drv-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.drv-cam.is-ready .drv-preview { opacity: 1; }
.drv-cam.is-front .drv-preview { transform: scaleX(-1); }

.drv-top {
	position: absolute; top: 0; left: 0; right: 0;
	display: flex; align-items: center; justify-content: space-between;
	padding: max(14px, env(safe-area-inset-top)) 16px 14px;
}
.drv-timer {
	padding: 6px 12px; border-radius: 999px;
	background: rgba(16, 16, 32, 0.45); color: #fff;
	font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
	opacity: 0; transition: opacity 0.2s;
}
.drv-cam.is-rec .drv-timer { opacity: 1; }
.drv-cam.is-rec .drv-top .drv-icon { opacity: 0; pointer-events: none; }

.drv-hint {
	position: absolute; left: 24px; right: 24px; bottom: calc(168px + env(safe-area-inset-bottom));
	text-align: center; color: #fff;
	font-size: 17px; font-weight: 500; line-height: 1.4;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
	transition: opacity 0.25s;
}
.drv-hint.is-alert { color: var(--gold); }
.drv-cam.is-rec .drv-hint { opacity: 0; }

.drv-bottom {
	position: absolute; left: 0; right: 0; bottom: 0;
	display: flex; flex-direction: column; align-items: center; gap: 12px;
	padding: 0 16px calc(28px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgba(16, 16, 32, 0.55), transparent);
	padding-top: 40px;
}
.drv-limit { color: rgba(255, 255, 255, 0.8); font-size: 13px; }
.drv-cam.is-rec .drv-limit { opacity: 0; }

/* Le bouton d'enregistrement : l'élément fort de la page */
.drv-rec { position: relative; width: 88px; height: 88px; border: 0; padding: 0; background: transparent; }
.drv-rec svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.drv-rec-track { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 6; }
.drv-rec-ring { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.drv-cam.is-rec .drv-rec-track { stroke: rgba(255, 255, 255, 0.3); }
.drv-rec-core {
	position: absolute; inset: 14px; border-radius: 50%;
	background: var(--gold);
	transition: inset 0.2s, border-radius 0.2s;
}
.drv-cam.is-rec .drv-rec-core { inset: 29px; border-radius: 6px; }
.drv-rec:active .drv-rec-core { transform: scale(0.94); }

/* Caméra indisponible */
.drv-blocked { display: grid; place-items: center; padding: 24px; }
.drv-blocked-close { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; }
.drv-blocked-box { max-width: 320px; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.drv-blocked-box p { font-size: 18px; line-height: 1.45; }

/* =================================================================== */
/* Écran 2 : vérification                                              */
/* =================================================================== */
.drv-review {
	position: absolute; inset: 0;
	overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
	background: var(--sand);
	padding-bottom: calc(120px + env(safe-area-inset-bottom));
}
.drv-rv-head {
	position: sticky; top: 0; z-index: 2;
	display: flex; align-items: center; gap: 4px;
	padding: max(8px, env(safe-area-inset-top)) 8px 8px;
	background: var(--sand);
}
.drv-rv-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

.drv-rv-top { display: flex; gap: 10px; padding: 4px 16px 0; align-items: flex-end; }
.drv-media {
	position: relative; flex: none;
	width: min(46vw, 210px); aspect-ratio: 9 / 16;
	border-radius: 18px; overflow: hidden; background: var(--ink);
}
.drv-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.drv-sound {
	position: absolute; right: 10px; bottom: 14px;
	width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
	display: grid; place-items: center;
	background: rgba(16, 16, 32, 0.6); color: #fff;
}
.drv-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drv-sound svg path:first-child { fill: currentColor; }
.drv-sound.is-muted { background: var(--gold); color: var(--ink); animation: drv-nudge 1.6s ease-in-out 2; }
@keyframes drv-nudge { 50% { transform: scale(1.12); } }
.drv-upbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.25); transition: opacity 0.4s 0.6s; }
.drv-upbar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.25s; }
.drv-upbar.is-done { opacity: 0; }
.drv-upbar.is-error i { background: var(--danger); }

.drv-thumbs { display: flex; flex-direction: column; gap: 8px; }
.drv-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }

.drv-sheet {
	margin-top: 16px;
	background: var(--paper);
	border-radius: 24px 24px 0 0;
	padding: 18px 16px 8px;
	min-height: 60vh;
}
.drv .drv-status { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); margin-bottom: 22px; }
.drv-status > span { flex: 1; }
.drv-status svg { margin-top: 2px; }
.drv-status svg { width: 16px; height: 16px; fill: var(--gold); flex: none; }
.drv-status.is-ai svg, .drv-status.is-busy svg { animation: drv-pulse 1.2s ease-in-out infinite; }
/* Bandeau « remplissage en cours » : bien visible, fond doré animé + barre de progression continue */
.drv .drv-status.is-ai, .drv .drv-status.is-busy {
	position: relative; overflow: hidden; align-items: center; flex-wrap: wrap;
	padding: 14px 16px 18px; border-radius: 16px; border: 1px solid #F2D27A;
	background: linear-gradient(110deg, #FFF8E1 20%, #FFE8A3 40%, #FFF8E1 60%) 0 0 / 250% 100%;
	animation: drv-glow 2.2s linear infinite;
	color: var(--ink); font-size: 15px; font-weight: 600;
	box-shadow: 0 8px 22px -14px rgba(154, 109, 11, 0.7);
}
.drv .drv-status.is-ai svg, .drv .drv-status.is-busy svg { width: 22px; height: 22px; margin-top: 0; fill: var(--gold-dk); }
.drv-status-bar { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 4px; border-radius: 4px; background: rgba(154, 109, 11, 0.15); overflow: hidden; }
.drv-status-bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 4px; background: var(--gold-dk); animation: drv-indet 1.3s ease-in-out infinite; }
.drv-status.is-done { animation: drv-flash 1.2s ease-out 1; border-radius: 12px; }
.drv .drv-btn.is-busy:disabled { opacity: 1; background: linear-gradient(110deg, var(--ink) 30%, #3A3A66 50%, var(--ink) 70%) 0 0 / 250% 100%; color: var(--gold); animation: drv-glow 1.6s linear infinite; }
@keyframes drv-glow { to { background-position: -250% 0; } }
@keyframes drv-indet { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes drv-flash { 0% { background: #FFE8A3; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
	.drv .drv-status.is-ai, .drv .drv-status.is-busy, .drv .drv-btn.is-busy:disabled, .drv-status-bar::after, .drv-status.is-done { animation: none; }
	.drv-status-bar::after { left: 30%; }
}
.drv-status.is-done { color: var(--ink); }
.drv-status.is-error { color: var(--danger); }
@keyframes drv-pulse { 50% { opacity: 0.3; transform: scale(0.8); } }
.drv-inline { border: 0; background: none; padding: 0; color: var(--ink); font-weight: 600; text-decoration: underline; font-size: 14px; }

.drv-form { display: flex; flex-direction: column; gap: 18px; }
.drv-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.drv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drv-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.drv-help { font-size: 13px; color: var(--muted); }

.drv .drv-input,
.drv .drv-row {
	width: 100%; min-height: 52px;
	padding: 0 14px;
	border: 1.5px solid var(--line) !important;
	border-radius: 14px !important;
	background: var(--paper) !important;
	box-shadow: none !important;
	color: var(--ink);
	font: inherit; font-size: 17px;
	outline: none;
	transition: border-color 0.15s;
	margin: 0;
}
.drv .drv-input:focus, .drv .drv-row:focus-visible { border-color: var(--ink) !important; }
.drv .drv-area { min-height: 92px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.drv .drv-select { appearance: none; -webkit-appearance: none; padding-right: 36px;
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101020' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px !important; }
.drv .drv-row { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.drv-row svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; flex: none; }
.drv-cat-value { font-weight: 600; }
.drv-cat-value.is-empty { color: var(--muted); font-weight: 400; }

.drv-price { position: relative; }
.drv-price .drv-input { padding-right: 96px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.drv-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }

/* Champ rempli par l'IA : une petite étincelle d'or après le libellé (l'or reste rare). Chargement : léger reflet. */
.drv-field.is-auto .drv-label::after {
	content: ''; display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: 1px;
	background: var(--gold);
	clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.drv .is-loading { color: transparent !important; background: linear-gradient(90deg, #F6F3EF 25%, #ECE6DE 50%, #F6F3EF 75%) 0 0 / 200% 100% !important; animation: drv-shimmer 1.3s linear infinite; }
.drv .is-loading::placeholder { color: transparent; }
.drv .drv-row.is-loading * { visibility: hidden; }
@keyframes drv-shimmer { to { background-position: -200% 0; } }

.drv-field.is-invalid .drv-input, .drv-field.is-invalid .drv-row { border-color: var(--danger) !important; }
.drv-field.is-invalid .drv-label { color: var(--danger); }

.drv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Barre d'action */
.drv-actions {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
	padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid var(--line);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.drv-actions-row { display: flex; gap: 10px; }
.drv .drv-error { color: var(--danger); font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.drv .drv-error:empty { display: none; }

.drv-btn {
	min-height: 54px; padding: 0 20px;
	border-radius: 999px; border: 0;
	font-size: 17px; font-weight: 600;
	display: inline-flex; align-items: center; justify-content: center;
	text-decoration: none;
	transition: background 0.15s, transform 0.1s;
}
.drv-btn:active { transform: scale(0.98); }
.drv-btn--ink { flex: 1; background: var(--ink); color: #fff; }
.drv-btn--ink:hover { background: var(--ink-2); }
.drv-btn--ink:disabled { background: #C9C6CF; color: #fff; cursor: default; transform: none; }
.drv-btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.drv-btn--light { background: #fff; color: var(--ink); min-width: 240px; }
.drv-btn--wa { background: #25D366; color: #073b1c; min-width: 240px; text-decoration: none; }
.drv-btn--wa:hover { background: #1fbd5b; }
.drv-done .drv-later { margin-top: 18px; font-size: 15px; }
.drv-link { color: rgba(255, 255, 255, 0.85); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

/* Panneau des catégories */
.drv-shade { position: absolute; inset: 0; z-index: 4; background: rgba(16, 16, 32, 0.45); opacity: 0; transition: opacity 0.2s; }
.drv-shade.is-open { opacity: 1; }
.drv-panel {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
	max-height: 82vh; display: flex; flex-direction: column;
	background: var(--paper); border-radius: 24px 24px 0 0;
	transform: translateY(100%); transition: transform 0.22s ease-out;
	padding-bottom: env(safe-area-inset-bottom);
}
.drv-panel.is-open { transform: none; }
.drv-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px 20px; }
.drv-panel-head h2 { font-size: 18px; font-weight: 600; }
.drv-panel-body { overflow-y: auto; padding: 4px 20px 24px; }
.drv-group + .drv-group { margin-top: 18px; }
.drv-group h3 { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.drv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.drv-chip {
	min-height: 42px; padding: 0 16px;
	border-radius: 999px; border: 1.5px solid var(--line);
	background: var(--paper); color: var(--ink);
	font-size: 15px; font-weight: 500;
}
.drv-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* « Autre » : ce que c'est */
.drv-other { padding-top: 16px; border-top: 1px solid var(--line); }
.drv-other-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.drv-other-form[hidden] { display: none; }
.drv .drv-input.is-invalid { border-color: var(--danger) !important; }

/* =================================================================== */
/* Écran 3 : confirmation (le seul moment animé)                        */
/* =================================================================== */
.drv-done {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
	padding: 24px; text-align: center; color: #fff;
}
.drv-check { width: 112px; height: 112px; margin-bottom: 6px; }
.drv-check circle { fill: none; stroke: var(--gold); stroke-width: 5; stroke-dasharray: 327; stroke-dashoffset: 327; animation: drv-draw 0.6s ease-out forwards; }
.drv-check path { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: drv-draw 0.35s 0.5s ease-out forwards; }
@keyframes drv-draw { to { stroke-dashoffset: 0; } }
.drv-done h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.drv-done p { max-width: 320px; font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, 0.8); }
.drv-done .drv-btn { margin-top: 10px; }

/* Grand écran : la page reste un téléphone centré */
@media (min-width: 720px) {
	.drv-cam, .drv-review, .drv-done { left: 50%; right: auto; width: 480px; transform: translateX(-50%); }
	.drv-actions, .drv-panel { left: 50%; right: auto; width: 480px; margin-left: -240px; }
	.drv-panel { transform: translateY(100%); }
	.drv-panel.is-open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.drv *, .drv *::before, .drv *::after { animation: none !important; transition: none !important; }
	.drv-check circle, .drv-check path { stroke-dashoffset: 0; }
}

/* « Agdal, dans quelle ville ? » : quartier présent dans plusieurs villes */
.drv-citypick { background: #FFF6D6; border: 1px solid #F2D27A; border-radius: 14px; padding: 12px 14px; margin: 4px 0 12px; }
.drv-citypick-q { margin: 0 0 8px; font-weight: 600; font-size: 15px; color: var(--ink); }

/* =================================================================== */
/* Mode photos (/publier-photos) : grille de photos façon Avito         */
/* =================================================================== */
.drv-photos { padding: 4px 16px 0; }
.drv-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drv-ptile, .drv-padd { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; }
.drv-ptile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drv-ptile.is-main::after { content: "Principale"; position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.drv-pdel { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(16, 16, 32, 0.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.drv-pdel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.drv-padd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #CFC8BE; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; padding: 6px; }
.drv-padd:only-child { grid-column: 1 / -1; aspect-ratio: auto; min-height: 150px; border-color: var(--gold-dk); background: #FFF8E1; font-size: 15px; }
/* Android : « Prendre une photo » + « Galerie ». Sans photo encore : deux grands boutons côte à côte. */
.drv-padd--cam { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.drv-pgrid:not(:has(.drv-ptile)) { grid-template-columns: 1fr 1fr; }
.drv-pgrid:not(:has(.drv-ptile)) .drv-padd { aspect-ratio: auto; min-height: 130px; font-size: 14.5px; }
.drv-pgrid:not(:has(.drv-ptile)) .drv-padd--gal { border-color: var(--gold-dk); background: #FFF8E1; }
.drv-padd svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.drv-padd input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drv-padd.is-loading { opacity: 0.5; pointer-events: none; }
.drv-photos.is-invalid .drv-padd { border-color: var(--danger); }
.drv-photos > .drv-help { margin-top: 8px; }
.drv .drv-step { font-size: 17px; font-weight: 600; color: var(--ink); margin: 10px 0 -4px; padding-top: 16px; border-top: 1px solid var(--line); }
.drv .drv-noaccount { margin-top: -6px; }
.drv-actions-row .drv-btn--ink { flex: 1; }
