/* ==========================================================================
   DDiapo - Mon Premier Diaporama pour Enfants
   Ecole de l'Enfant-Jésus Morlanwelz
   ========================================================================== */

:root {
  --ddiapo-primary: #2563eb;
  --ddiapo-primary-hover: #1d4ed8;
  --ddiapo-accent: #f59e0b;
  --ddiapo-accent-hover: #d97706;
  --ddiapo-desk: #1e293b;
  --ddiapo-desk-stage: #334155;
  --ddiapo-border: #cbd5e1;
  --ddiapo-toolbar-bg: #f8fafc;
  --ddiapo-text: #1e293b;
  --ddiapo-canvas-w: 960px;
  --ddiapo-canvas-h: 540px;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--ddiapo-desk);
  font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ddiapo-text);
  user-select: none;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Application Wrapper */
.ddiapo-wrapper {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--ddiapo-desk);
}

/* --------------------------------------------------------------------------
   Bouton Retour au site
   -------------------------------------------------------------------------- */
.btn-back-site {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #b91c1c !important;
  font-weight: 800 !important;
  border: 1px solid white !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-back-site:hover {
  background: white !important;
  color: #991b1b !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Bannière supérieure (Top Bar - Rouge PowerPoint)
   -------------------------------------------------------------------------- */
.ddiapo-top-bar {
  flex-shrink: 0;
  background: linear-gradient(135deg, #b91c1c 0%, #c2410c 50%, #d24726 100%);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.ddiapo-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.ddiapo-logo-badge {
  background: #facc15;
  color: #1e293b;
  font-weight: 900;
  font-size: 15px;
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ddiapo-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  vertical-align: middle;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ddiapo-doc-name-input {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  min-width: 220px;
  max-width: 380px;
  transition: all 0.2s;
}

.ddiapo-doc-name-input:focus {
  background: white;
  color: #1e293b;
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
}

.ddiapo-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ddiapo-pill-btn {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  user-select: none;
}

.ddiapo-pill-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.ddiapo-pill-btn.btn-play-slideshow {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: white;
  font-size: 14px;
  padding: 7px 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.ddiapo-pill-btn.btn-play-slideshow:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

.ddiapo-pill-btn.btn-accent {
  background: #facc15;
  color: #1e293b;
  border-color: #facc15;
}

.ddiapo-pill-btn.btn-accent:hover {
  background: #fde047;
}

.ddiapo-pill-btn.btn-save {
  background: #f8fafc;
  color: #b91c1c;
  border-color: white;
}

.ddiapo-pill-btn.btn-save:hover {
  background: white;
  color: #991b1b;
}

/* --------------------------------------------------------------------------
   Barre d'outils (Toolbar)
   -------------------------------------------------------------------------- */
.ddiapo-toolbar {
  flex-shrink: 0;
  background: var(--ddiapo-toolbar-bg);
  border-bottom: 1px solid var(--ddiapo-border);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  z-index: 90;
}

.ddiapo-tool-group {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px 4px;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ddiapo-tool-separator {
  width: 1px;
  height: 28px;
  background: #cbd5e1;
  margin: 0 4px;
}

.ddiapo-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #1e293b;
  height: 34px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.12s ease;
}

.ddiapo-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ddiapo-btn:active {
  background: #dbeafe;
  transform: translateY(1px);
}

.ddiapo-btn.active {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

.ddiapo-btn.btn-danger-hover:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.tool-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
}

.tool-label {
  font-size: 13px;
  font-weight: 700;
}

.ddiapo-select {
  height: 32px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  cursor: pointer;
}

.ddiapo-select:focus {
  border-color: var(--ddiapo-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.ddiapo-size-control {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
}

.ddiapo-btn-mini {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 24px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ddiapo-btn-mini:hover {
  background: #e2e8f0;
}

.font-size-display {
  font-size: 12px;
  font-weight: 800;
  padding: 0 4px;
  min-width: 22px;
  text-align: center;
  color: #1e293b;
}

.ddiapo-color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.ddiapo-color-picker-wrapper:hover {
  background: #f1f5f9;
}

.color-circle-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #94a3b8;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.color-circle-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-circle-input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-indicator-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

/* --------------------------------------------------------------------------
   Menus Popovers (Export, Formes)
   -------------------------------------------------------------------------- */
.ddiapo-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.ddiapo-dropdown-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 500;
  min-width: 240px;
}

.ddiapo-dropdown-popover.active {
  display: block;
}

.export-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.export-option-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.export-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
  color: white;
  min-width: 48px;
}

.html-badge { background: linear-gradient(135deg, #ea580c, #f97316); }
.odp-badge { background: linear-gradient(135deg, #185abd, #0284c7); }
.ddiapo-badge { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.print-badge { background: linear-gradient(135deg, #475569, #64748b); }

.export-text strong {
  display: block;
  font-size: 13px;
  color: #1e293b;
}

.export-text small {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.shapes-popover {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  min-width: 260px;
}

.shapes-popover.active {
  display: grid;
}

.shape-item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  transition: all 0.15s;
}

.shape-item-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.shape-preview {
  display: inline-block;
  font-size: 16px;
}

.shape-rect {
  width: 16px;
  height: 12px;
  background: #3b82f6;
  border-radius: 2px;
}

.shape-circle {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Espace de travail principal
   -------------------------------------------------------------------------- */
.ddiapo-main-area {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--ddiapo-desk);
  overflow: hidden;
  position: relative;
}

/* Volet latéral gauche : Miniatures des diapositives */
.ddiapo-sidebar {
  width: 210px;
  background: #0f172a;
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
}

.sidebar-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-sidebar-add {
  background: #2563eb;
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s;
}

.btn-sidebar-add:hover {
  background: #1d4ed8;
}

.slides-thumbnails-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Carte miniature de diapositive */
.slide-thumb-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}

.slide-thumb-card:hover {
  transform: translateY(-1px);
}

.slide-thumb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
}

.slide-thumb-preview {
  aspect-ratio: 16 / 9;
  background: white;
  border-radius: 6px;
  border: 2px solid #475569;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: border-color 0.15s;
}

.slide-thumb-card.active .slide-thumb-preview {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.slide-thumb-card.active .slide-thumb-header {
  color: #38bdf8;
  font-weight: 900;
}

.slide-thumb-inner {
  width: 100%;
  height: 100%;
  position: relative;
  pointer-events: none;
  transform-origin: top left;
}

/* --------------------------------------------------------------------------
   Scène centrale (Bureau de création 16:9)
   -------------------------------------------------------------------------- */
.ddiapo-stage-container {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  position: relative;
  background: radial-gradient(circle at center, #334155 0%, #1e293b 100%);
}

.slide-aspect-scaler {
  width: 100%;
  max-width: 1060px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Le Canvas Diapositive 16:9 */
.ddiapo-slide-canvas {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Éléments sur la diapositive (Texte, Formes, Images)
   -------------------------------------------------------------------------- */
.ddiapo-element {
  position: absolute;
  cursor: move;
  box-sizing: border-box;
  touch-action: none;
}

.ddiapo-element.selected {
  outline: 2px solid #2563eb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(37, 99, 235, 0.2);
  z-index: 1000 !important;
}

/* Poignées de redimensionnement */
.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border: 2px solid #2563eb;
  border-radius: 50%;
  z-index: 1001;
  display: none;
}

.ddiapo-element.selected .resize-handle {
  display: block;
}

.resize-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.resize-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.resize-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.resize-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resize-handle.n { top: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.resize-handle.s { bottom: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.resize-handle.e { top: calc(50% - 5px); right: -5px; cursor: ew-resize; }
.resize-handle.w { top: calc(50% - 5px); left: -5px; cursor: ew-resize; }

/* Contenu des éléments */
.element-content {
  width: 100%;
  height: 100%;
  outline: none;
  word-break: break-word;
  overflow: hidden;
  box-sizing: border-box;
}

.element-text {
  padding: 8px 12px;
  cursor: text;
  line-height: 1.35;
}

.element-text:empty::before {
  content: 'Écris ton texte ici...';
  color: #94a3b8;
  font-style: italic;
}

.element-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.element-shape svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Barre d'état inférieure (Status Bar)
   -------------------------------------------------------------------------- */
.ddiapo-status-bar {
  flex-shrink: 0;
  background: white;
  border-top: 1px solid var(--ddiapo-border);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  z-index: 80;
}

.status-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-school-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  user-select: none;
}

.status-school-logo {
  height: 20px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
  vertical-align: middle;
}

.status-school-copy {
  letter-spacing: 0.2px;
  font-weight: 700;
  color: #475569;
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-status-text {
  font-size: 12px;
  color: #10b981;
  font-weight: 700;
}

.btn-fullscreen-toggle {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.btn-fullscreen-toggle:hover {
  background: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Modales d'aide, thèmes et cliparts
   -------------------------------------------------------------------------- */
.ddiapo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.ddiapo-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ddiapo-modal-card {
  background: white;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.94);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.ddiapo-modal-overlay.active .ddiapo-modal-card {
  transform: scale(1);
}

.ddiapo-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 16px 16px 0 0;
}

.ddiapo-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.ddiapo-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.ddiapo-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ddiapo-modal-body {
  padding: 20px;
}

.modal-intro-text {
  color: #64748b;
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Grille des Thèmes */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.theme-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.theme-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.theme-preview {
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  text-align: center;
}

.theme-name {
  padding: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: #1e293b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Onglets & Grille de Cliparts */
.clipart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  overflow-x: auto;
}

.clipart-tab {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.clipart-tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.clipart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}

.clipart-item {
  aspect-ratio: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.15s;
}

.clipart-item:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: scale(1.1);
}

/* Nuancier de fond */
.bg-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.bg-swatch {
  height: 42px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.bg-swatch:hover {
  transform: scale(1.08);
  border-color: #2563eb;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Modèles de Diaporamas */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.template-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.12);
}

.template-card-title {
  font-weight: 800;
  font-size: 15px;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.template-card-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   MODE DIAPORAMA PLEIN ÉCRAN (Présentation au TBI / Grand Écran)
   -------------------------------------------------------------------------- */
.slideshow-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slideshow-overlay.active {
  display: flex;
}

.slideshow-slide-wrapper {
  width: 96vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-active-slide {
  width: 100%;
  max-width: 1300px;
  aspect-ratio: 16 / 9;
  background: white;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.slideshow-controls {
  position: fixed;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  z-index: 10001;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.slideshow-controls:hover {
  opacity: 1;
}

.slideshow-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.slideshow-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.slideshow-btn.btn-exit {
  background: #dc2626;
  border-color: #ef4444;
}

.slideshow-btn.btn-exit:hover {
  background: #b91c1c;
}

.slideshow-counter {
  font-size: 14px;
  font-weight: 800;
  padding: 0 8px;
}

/* Toast de notification */
.ddiapo-toast {
  position: fixed;
  bottom: 60px;
  right: 24px;
  background: #0f172a;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.ddiapo-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Impression / Export PDF
   -------------------------------------------------------------------------- */
@media print {
  @page {
    size: landscape;
    margin: 0;
  }

  body, html {
    background: white !important;
    overflow: visible !important;
  }

  .ddiapo-top-bar, .ddiapo-toolbar, .ddiapo-sidebar, .ddiapo-status-bar, .slideshow-controls, .ddiapo-modal-overlay, .ddiapo-toast {
    display: none !important;
  }

  .ddiapo-wrapper, .ddiapo-main-area, .ddiapo-stage-container {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    background: white !important;
    padding: 0 !important;
  }

  .slide-aspect-scaler {
    max-width: 100% !important;
    page-break-after: always;
  }
}
