/* ══════════════════════════════════════════════════════════════
   L'atelier de Camille — Styles Mode Édition Admin
   ══════════════════════════════════════════════════════════════ */

/* ── Décalage du corps quand la barre admin est visible ──── */
body.admin-mode { padding-top: 54px; }

/* ── Barre admin ─────────────────────────────────────────── */
#admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 20px rgba(0,0,0,.45);
  font-family: 'Lato', system-ui, sans-serif;
  font-size: .84rem;
}

.admin-bar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.admin-bar-indicator {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: #4ade80;
  white-space: nowrap;
}
.admin-bar-indicator svg { width: .95rem; height: .95rem; }

.admin-bar-hint {
  color: rgba(255,255,255,.45);
  font-size: .76rem;
}

.admin-bar-right {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .85rem;
  border: none;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}
.admin-btn:hover { opacity: .82; transform: translateY(-1px); }
.admin-btn svg { width: .85rem; height: .85rem; flex-shrink: 0; }

.admin-btn-save   { background: #4ade80; color: #14532d; }
.admin-btn-reset  { background: rgba(255,255,255,.12); color: #fff; }
.admin-btn-maint  { background: #f59e0b; color: #fff; }
.admin-btn-logout { background: #ef4444; color: #fff; }

/* ── Texte éditable ──────────────────────────────────────── */
body.admin-mode .editable-text {
  cursor: text;
  border-radius: 3px;
  outline: 2px dashed transparent;
  outline-offset: 2px;
  transition: outline-color .2s, background .2s;
}
body.admin-mode .editable-text:hover {
  outline-color: rgba(74,222,128,.55);
  background: rgba(74,222,128,.06);
}
body.admin-mode .editable-text.is-editing {
  outline-color: #4ade80;
  outline-style: solid;
  background: rgba(74,222,128,.1);
}

/* ── Image éditable ──────────────────────────────────────── */
body.admin-mode img.admin-editable-img {
  cursor: pointer;
  transition: filter .2s, outline .2s;
  outline: 2px dashed transparent;
  outline-offset: 3px;
}
body.admin-mode img.admin-editable-img:hover {
  filter: brightness(.82) saturate(.9);
  outline-color: rgba(74,222,128,.75);
}

/* ── Toast ───────────────────────────────────────────────── */
#admin-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  background: #0f172a;
  color: #4ade80;
  padding: .7rem 1.4rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  font-family: 'Lato', system-ui, sans-serif;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  pointer-events: none;
}
#admin-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── Modal connexion admin ───────────────────────────────── */
#admin-login-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(7, 7, 20, .78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .2s ease;
}

.admin-login-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  text-align: center;
  animation: slideUp .25s ease;
}

.admin-login-close {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 30px; height: 30px;
  background: #f1f5f9;
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #64748b;
  transition: background .2s;
}
.admin-login-close:hover { background: #e2e8f0; }
.admin-login-close svg { width: .85rem; height: .85rem; }

.admin-login-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
  color: #4ade80;
}
.admin-login-icon svg { width: 1.5rem; height: 1.5rem; }

.admin-login-box h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  color: #0f172a;
  margin-bottom: .3rem;
}
.admin-login-box > p {
  font-size: .82rem;
  color: #94a3b8;
  margin-bottom: 1.6rem;
  font-family: 'Lato', system-ui, sans-serif;
}

.admin-form-group {
  text-align: left;
  margin-bottom: .9rem;
}
.admin-form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: .3rem;
  font-family: 'Lato', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-form-group input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .92rem;
  font-family: 'Lato', system-ui, sans-serif;
  outline: none;
  color: #0f172a;
  transition: border-color .2s, box-shadow .2s;
}
.admin-form-group input:focus {
  border-color: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.18);
}

.admin-login-error {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: .5rem .75rem;
  font-size: .8rem;
  font-family: 'Lato', system-ui, sans-serif;
  margin-bottom: .9rem;
  text-align: left;
}

.admin-login-btn {
  width: 100%;
  padding: .72rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Lato', system-ui, sans-serif;
  margin-top: .75rem;
  transition: opacity .2s, transform .15s;
  letter-spacing: .04em;
}
.admin-login-btn:hover { opacity: .88; transform: translateY(-1px); }

.admin-btn-add {
  background: rgba(99,179,237,.18);
  color: #90cdf4;
  border: 1px solid rgba(99,179,237,.3);
}
.admin-btn-add:hover { background: rgba(99,179,237,.28); opacity: 1; }

/* ── Lien éditable ───────────────────────────────────────── */
body.admin-mode a.admin-editable-link {
  position: relative;
  outline: none;
}
body.admin-mode a.admin-editable-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg, rgba(74,222,128,.7) 0 4px, transparent 4px 8px
  );
  border-radius: 1px;
  opacity: 0;
  transition: opacity .2s;
}
body.admin-mode a.admin-editable-link:hover::after { opacity: 1; }

/* ── Popup flottant ──────────────────────────────────────── */
#admin-popup {
  position: fixed;
  z-index: 10002;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  padding: 1rem 1rem .9rem;
  min-width: 265px;
  max-width: 300px;
  font-family: 'Lato', system-ui, sans-serif;
  font-size: .85rem;
  animation: slideUp .18s ease;
}
#admin-popup input:focus, #admin-popup select:focus {
  border-color: #4ade80 !important;
  box-shadow: 0 0 0 3px rgba(74,222,128,.15);
}
#admin-popup strong { font-family: 'Lato', system-ui, sans-serif; }

/* ── SVG icône éditable ──────────────────────────────────── */
body.admin-mode [data-icon-id] {
  outline: 2px dashed transparent;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color .2s;
}
body.admin-mode [data-icon-id]:hover {
  outline-color: rgba(74,222,128,.65);
}

/* ─── Galerie créations — bouton ajout + contrôles ──────── */
.gal-add-btn {
  display: none;
  align-items: center;
  gap: .5rem;
  margin: 1.75rem auto 0;
  padding: .62rem 1.5rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: .82rem;
  font-weight: 700;
  font-family: 'Lato', system-ui, sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
}
.gal-add-btn svg { width: .82rem; height: .82rem; }
.gal-add-btn:hover { opacity: .88; transform: translateY(-1px); }
body.admin-mode .gal-add-btn { display: flex; }

/* Contrôles par item (✎ description · ⤢ format · ✕ supprimer) */
.gal-ctrl {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 5;
  display: flex;
  gap: .35rem;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
body.admin-mode .gallery-item:hover .gal-ctrl {
  opacity: 1;
  pointer-events: all;
}
.gal-ctrl-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(15,23,42,.76);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.gal-ctrl-btn:hover { background: rgba(15,23,42,.96); transform: scale(1.1); }
.gal-ctrl-btn.gal-ctrl-del:hover { background: #dc2626; }
.gal-ctrl-btn svg { width: .8rem; height: .8rem; pointer-events: none; }

/* ── Glisser-déposer ────────────────────────────────────── */
body.admin-mode .admin-draggable {
  cursor: grab;
}
body.admin-mode .admin-draggable:active {
  cursor: grabbing;
}
body.admin-mode .admin-draggable.drag-source {
  opacity: .35;
  outline: 2px dashed rgba(74,222,128,.6);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .admin-bar-hint { display: none; }
  .admin-btn span { display: none; }
}

/* ─── Bouton Bandeau info dans la barre admin ──────────── */
.admin-btn-banner { background: linear-gradient(135deg, var(--brown-mid,#8B6340), var(--brown,#5C3D2E)) !important; }
.admin-btn-banner:hover { background: linear-gradient(135deg, var(--brown,#5C3D2E), var(--brown-mid,#8B6340)) !important; }

/* ─── Modal bandeau info (admin) ───────────────────────── */
#admin-banner-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(5,5,10,.62);
  backdrop-filter: blur(5px);
}
.abp-panel {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  animation: popIn .22s ease;
}
@keyframes popIn {
  from { transform: scale(.94) translateY(12px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

/* ── En-tête ── */
.abp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; gap: .5rem; }
.abp-title  { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0; }
.abp-close-x { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: #64748b; line-height: 1; padding: 2px 6px; }
.abp-close-x:hover { color: #0f172a; }

/* ── Rangée toggle ── */
.abp-row-toggle { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; background: #f8fafc; border-radius: 10px; margin-bottom: 1.2rem; }
.abp-label-main { font-weight: 700; font-size: .88rem; color: #0f172a; }
.abp-label-sub  { font-size: .75rem; color: #64748b; margin-top: 2px; }

/* ── Libellés de section ── */
.abp-section-lbl {
  margin: .9rem 0 .3rem;
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.abp-optional { font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; }

/* ── Sélection du type de bandeau ── */
.abp-type-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding: .65rem .5rem;
  border-radius: 9px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  background: #f8fafc;
  color: #334155;
  text-align: center;
  transition: border-color .18s, background .18s;
  line-height: 1.25;
}
.abp-type-opt:hover { border-color: var(--brown-light,#C4A882); background: var(--cream,#FAF7F2); }
.abp-type-opt.abp-sel { border-color: var(--brown-mid,#8B6340); background: var(--brown-pale,#EDE0CD); color: var(--brown,#5C3D2E); }
.abp-type-icon  { font-size: 1.3rem; display: block; margin-bottom: .2rem; }
.abp-type-label { font-size: .72rem; font-weight: 700; }

/* ── Date pickers ── */
.abp-dates-row { display: flex; align-items: flex-end; gap: .65rem; margin-bottom: .2rem; }
.abp-date-grp  { flex: 1; }
.abp-date-lbl  { display: block; font-size: .72rem; font-weight: 700; color: #64748b; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .06em; }
.abp-date-in   { width: 100%; padding: .5rem .7rem; border: 1.5px solid #e2e8f0; border-radius: 7px; font-size: .85rem; font-family: inherit; color: #0f172a; box-sizing: border-box; }
.abp-date-in:focus { outline: none; border-color: var(--brown-mid,#8B6340); box-shadow: 0 0 0 2px rgba(139,99,64,.15); }
.abp-date-sep  { color: #94a3b8; font-size: 1.1rem; flex-shrink: 0; padding-bottom: .55rem; }

/* ── Bouton regénérer ── */
.abp-regen-btn { background: none; border: none; cursor: pointer; font-size: .74rem; color: var(--brown-mid,#8B6340); font-weight: 700; padding: 0; font-family: inherit; }
.abp-regen-btn:hover { color: var(--brown,#5C3D2E); text-decoration: underline; }

/* ── Textarea + input texte ── */
.abp-textarea { width: 100%; padding: .5rem .75rem; border: 1.5px solid #e2e8f0; border-radius: 7px; font-size: .88rem; resize: vertical; font-family: inherit; color: #0f172a; min-height: 68px; box-sizing: border-box; margin-top: .2rem; }
.abp-textarea:focus { outline: none; border-color: var(--brown-mid,#8B6340); box-shadow: 0 0 0 2px rgba(139,99,64,.15); }
.abp-text-in { width: 100%; padding: .5rem .7rem; border: 1.5px solid #e2e8f0; border-radius: 7px; font-size: .85rem; font-family: inherit; color: #0f172a; box-sizing: border-box; margin-top: .2rem; }
.abp-text-in:focus { outline: none; border-color: var(--brown-mid,#8B6340); box-shadow: 0 0 0 2px rgba(139,99,64,.15); }

/* ── Aperçu du bandeau ── */
.abp-preview-banner {
  padding: .65rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1.5;
  font-family: inherit;
  border: 1.5px solid transparent;
  margin-bottom: 1.3rem;
  min-height: 2.5rem;
}
.abp-preview-banner.info-banner--fermeture { background: var(--rose-light,#F5E8E4);  color: var(--brown,#5C3D2E);     border-color: var(--rose,#D4A5A5); }
.abp-preview-banner.info-banner--ouverture { background: #edf3eb;                    color: var(--green,#687B64);     border-color: var(--green-light,#A8B89E); }
.abp-preview-banner.info-banner--vacances  { background: var(--brown-pale,#EDE0CD);  color: var(--brown-mid,#8B6340); border-color: var(--brown-light,#C4A882); }
.abp-preview-banner.info-banner--info      { background: var(--cream-dark,#F0EBE3);  color: var(--brown,#5C3D2E);     border-color: var(--brown-pale,#EDE0CD); }

/* ── Boutons action ── */
.abp-actions { display: flex; gap: .55rem; }
.abp-btn-apply { flex: 3; padding: .62rem 1rem; background: var(--brown,#5C3D2E); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: .88rem; font-family: inherit; transition: background .18s; }
.abp-btn-apply:hover { background: var(--brown-mid,#8B6340); }
.abp-btn-off   { flex: 1; padding: .62rem 1rem; background: var(--rose-light,#F5E8E4); color: var(--brown,#5C3D2E); border: 1.5px solid var(--rose,#D4A5A5); border-radius: 8px; cursor: pointer; font-weight: 700; font-size: .82rem; font-family: inherit; transition: background .18s; }
.abp-btn-off:hover { background: var(--rose,#D4A5A5); }

/* Toggle switch */
.abp-toggle input { position:absolute; opacity:0; width:0; height:0; }
.abp-toggle { position:relative; display:inline-flex; cursor:pointer; user-select:none; }
.abp-toggle-track {
  width: 44px; height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  transition: background .22s;
  position: relative;
}
.abp-toggle input:checked + .abp-toggle-track { background: var(--brown-mid,#8B6340); }
.abp-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .22s;
}
.abp-toggle input:checked + .abp-toggle-track .abp-toggle-thumb { transform: translateX(20px); }

/* ═════════════════════════════════════════
   BOUTON AVIS + PANNEAU MODÉRATION
═════════════════════════════════════════ */
.admin-btn-reviews {
  background: linear-gradient(135deg, var(--green,#687B64), #4a5e46) !important;
  color: #fff !important;
}
.admin-btn-reviews:hover { filter: brightness(1.12); }

.admin-btn-hero-photo {
  background: linear-gradient(135deg, #8B6340, #5C3D2E) !important;
  color: #EDE0CD !important;
}
.admin-btn-hero-photo:hover { filter: brightness(1.15); }

/* Modal modération */
.arv-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.arv-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  padding: 1.75rem;
}
.arv-section-lbl {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #888;
  border-bottom: 1.5px solid #eee;
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.arv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0c040;
  color: #7a5200;
  font-size: .7rem;
  font-weight: 800;
  border-radius: 50px;
  padding: .1rem .5rem;
  min-width: 1.4rem;
}
.arv-badge--green { background: #c6ebc6; color: #2a6e2a; }
.arv-card {
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .75rem;
  border-left: 4px solid #e0cdb0;
}
.arv-card--approved { border-left-color: #56a356; }
.arv-card-stars { color: #D4A017; font-size: 1rem; letter-spacing: .08em; margin-bottom: .25rem; }
.arv-card-name { font-size: .8rem; font-weight: 700; color: #5C3D2E; margin-bottom: .35rem; }
.arv-card-date { font-weight: 400; color: #aaa; font-size: .72rem; margin-left: .4rem; }
.arv-card-text { font-size: .88rem; color: #555; font-style: italic; margin: 0 0 .75rem; line-height: 1.6; }
.arv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.arv-btn {
  padding: .35rem .85rem;
  border-radius: 50px;
  border: none;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.arv-btn:hover { opacity: .82; }
.arv-btn-approve { background: #56a356; color: #fff; }
.arv-btn-reject  { background: #e05555; color: #fff; }
.arv-empty { font-size: .85rem; color: #aaa; font-style: italic; padding: .5rem 0; }

/* ── Stats panel ─────────────────────────────────────────── */
.admin-btn-stats { background: #e8f3e8; color: #2d6a2d; }
.admin-btn-stats:hover { background: #d0ebd0; }
.ast-kpis { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.ast-kpi { flex: 1; min-width: 120px; background: #f8f4f0; border-radius: 10px; padding: .9rem 1rem; text-align: center; }
.ast-kpi-n { font-size: 2rem; font-weight: 800; color: #5C3D2E; line-height: 1; }
.ast-kpi-lbl { font-size: .72rem; color: #888; margin-top: .3rem; text-transform: uppercase; letter-spacing: .04em; }
.ast-section-lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9a8070; border-bottom: 1px solid #eee; padding-bottom: .4rem; margin-bottom: .75rem; }
.ast-chart { display: flex; align-items: flex-end; gap: 4px; height: 100px; margin-bottom: 1rem; }
.ast-col { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; }
.ast-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.ast-bar { width: 100%; background: #A8C5A0; border-radius: 3px 3px 0 0; min-height: 3px; transition: height .3s; }
.ast-lbl { font-size: .58rem; color: #aaa; margin-top: 3px; white-space: nowrap; }
.ast-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-bottom: .75rem; }
.ast-table th { text-align: left; color: #9a8070; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; padding: .3rem .5rem; border-bottom: 1px solid #eee; }
.ast-td-url { padding: .4rem .5rem; color: #5C3D2E; word-break: break-all; }
.ast-td-n { padding: .4rem .5rem; text-align: right; font-weight: 700; color: #5C3D2E; width: 60px; }
.ast-table tr:nth-child(even) { background: #faf8f6; }
.ast-note { font-size: .68rem; color: #bbb; text-align: center; margin-top: .5rem; }
