    html {
      --batch-border: #d9d4e4;
      overflow-y: scroll;
    }

    .photo-batch-select { position: absolute; top: 4px; right: 4px; z-index: 20; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 2px solid #fff; border-radius: 6px; background: #171120b3; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
    .photo-batch-select.is-selected { background: #db2777; }
    .batch-selected { outline: 3px solid #ec4899; outline-offset: -3px; }
    .photo-batch-bar { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 45; max-width: calc(100vw - 32px); }
    .photo-batch-bar.hidden, .photo-batch-modal.hidden { display: none; }
    .photo-batch-open { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 12px 16px; border-radius: 8px; background: linear-gradient(115deg, #ec4899, #c026d3 52%, #7c3aed); color: white; box-shadow: 0 4px 16px #7c3aed55; font-weight: 700; }
    .photo-batch-open:hover { filter: brightness(1.08); }
    .photo-batch-open[aria-busy="true"] [data-batch-icon] { animation: photo-batch-hourglass 1s ease-in-out infinite; }
    .photo-batch-select.is-processing { animation: photo-batch-hourglass 1s ease-in-out infinite; }
    @keyframes photo-batch-hourglass { 50% { opacity: .55; } }
    .photo-batch-variant-summary { margin: 0 0 14px; color: #64748b; font-size: 11px; line-height: 1.4; }
    html.dark .photo-batch-variant-summary { color: #a1a1aa; }
    .photo-batch-modal:not(.hidden) { position: fixed; inset: 0; z-index: 75; display: flex; align-items: center; justify-content: center; padding: 16px; background: #000b; }
    .photo-batch-panel { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 8px; padding: 20px; background: white; color: #17202a; }
    html.dark .photo-batch-panel { background: #151226; color: #f8fafc; }
    .photo-batch-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .photo-batch-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px; font-size: 12px; font-weight: 700; border-radius: 6px; }
    .photo-batch-actions button:disabled { opacity: .5; }

    #lightboxModal {
      padding-top: calc(16px + env(safe-area-inset-top, 0px));
      padding-right: calc(16px + env(safe-area-inset-right, 0px));
      padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
      padding-left: calc(16px + env(safe-area-inset-left, 0px));
    }
    #lightboxModal > :first-child { flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
    #lightboxModal > .flex-1 { min-height: 0; }
    #lightboxModal button { min-width: 44px; min-height: 44px; }
    .lightbox-photo-tools .photo-badge-top { gap: 6px; pointer-events: auto; }
    #lightboxModal .lightbox-photo-tools .photo-badge-top > *,
    #lightboxModal .lightbox-photo-tools .photo-overlay-info > .flex > * {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      height: 24px;
      min-height: 24px;
      min-width: 24px;
      font-size: 11px;
      line-height: 14px;
      padding: 2px 6px;
    }
    .lightbox-photo-tools .photo-overlay-info { padding: 8px; }
    .lightbox-photo-tools .opacity-0 { opacity: 1; }
    body.hide-photo-labels #lightboxVariantPill { display: none; }

    body.legal-reader-open { overflow: hidden; }
    .legal-reader-panel { max-height: min(900px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)); }
    .legal-reader-frame { border: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
    @media (max-width: 639px) {
      .legal-reader-overlay { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
      .legal-reader-panel { max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px); border-radius: 12px; }
      #legalReaderTitle { font-size: 0.9rem; }
      #legalReaderNewTab { max-width: 88px; white-space: normal; text-align: right; }
    }

    .album-header-tools > * { flex-shrink: 0; }
    .album-header-tools > button,
    #btnAlbumPrintGauge {
      height: 32px;
      min-width: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 6px;
      border-radius: 6px;
    }
    .album-header-tools button svg { width: 18px; height: 18px; }
    .album-header-tools > button.hidden { display: none; }

    @media (max-width: 767px) {
      #mainHeader { padding: 8px; }
      #mainHeader > div:has(#headerAlbumMeta:not(.hidden)) {
        display: grid;
        grid-template-columns: 32px 32px minmax(0, 1fr) auto;
        gap: 6px;
      }
      #headerAlbumMeta:not(.hidden),
      #headerAlbumMeta:not(.hidden) .album-header-content { display: contents; }
      #btnBackToEvents { grid-column: 1; grid-row: 1; padding: 6px; }
      #headerAlbumThumb { grid-column: 2; grid-row: 1; }
      #headerAlbumTitle { grid-column: 3; grid-row: 1; max-width: none; }
      .header-global-actions { grid-column: 4; grid-row: 1; gap: 4px; }
      #btnToggleTheme, #btnHeaderProfile { width: 32px; height: 32px; padding: 4px; }
      .album-header-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
      }
      .album-header-tools::-webkit-scrollbar { display: none; }
      #popoverPrintGauge { position: fixed; top: 90px; left: 8px; max-width: calc(100vw - 16px); }
    }

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      -webkit-tap-highlight-color: transparent;
      transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    html.dark body {
      background-color: #07040D;
      color: #F8FAFC;
    }
    html.dark .glass-nav {
      background: rgba(7, 4, 13, 0.90);
      border-top: 1px solid rgba(124, 58, 237, 0.2);
    }
    html.dark .glass-header {
      background: rgba(7, 4, 13, 0.90);
      border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    }
    html.dark .glass-card {
      background: #130E20;
      border: 1px solid #261B3D;
    }
    html.dark .glass-card:hover {
      border-color: rgba(168, 85, 247, 0.4);
    }
    html.dark .inner-box {
      background: #0B0714;
      border: 1px solid #1E1530;
    }

    html:not(.dark) body {
      background-color: #F8FAFC;
      color: #0F172A;
    }
    html:not(.dark) .glass-nav {
      background: rgba(255, 255, 255, 0.94);
      border-top: 1px solid rgba(124, 58, 237, 0.15);
    }
    html:not(.dark) .glass-header {
      background: rgba(255, 255, 255, 0.94);
      border-bottom: 1px solid rgba(124, 58, 237, 0.15);
    }
    html:not(.dark) .glass-card {
      background: #FFFFFF;
      border: 1px solid #E2E8F0;
      box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    }
    html:not(.dark) .glass-card:hover {
      border-color: rgba(124, 58, 237, 0.3);
    }
    html:not(.dark) .inner-box {
      background: #F1F5F9;
      border: 1px solid #E2E8F0;
    }

    .glass-nav, .glass-header {
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    
    .gradient-brand {
      background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
    }
    .hide-scrollbar::-webkit-scrollbar { display: none; }
    .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

    .lang-btn.active {
      background: rgba(124, 58, 237, 0.25);
      border-color: rgba(124, 58, 237, 0.5);
      opacity: 1;
      filter: saturate(1.2);
    }
    .lang-btn:not(.active) {
      opacity: 0.5;
    }
    .lang-btn:not(.active):hover {
      opacity: 0.85;
    }

    .btn-choice-active {
      border: 2px solid #A855F7 !important;
      background: rgba(124, 58, 237, 0.28) !important;
      color: #FFFFFF !important;
      box-shadow: 0 0 16px rgba(168, 85, 247, 0.35) !important;
    }
    .btn-choice-inactive {
      border: 1px solid rgba(124, 58, 237, 0.15) !important;
      background: #0B0714;
      color: #94A3B8;
    }

    body.hide-photo-labels .photo-overlay-info,
    body.hide-photo-labels .photo-badge-top,
    body.hide-photo-labels .homo-pending-overlay {
      display: none !important;
    }

    /* Style de la visionneuse allégée (une page à la fois, transition fondu/glissement) */
    .flipbook-wrapper {
      position: relative;
    }
    #flipbookContainer {
      position: relative;
      width: 100%;
      height: 100%;
    }
    .flipbook-page {
      position: absolute;
      top: 50%;
      left: 50%;
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
      border-radius: 4px;
      background-color: #ffffff;
      box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.16);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.97);
      transition: opacity 0.32s ease, transform 0.32s ease;
      pointer-events: none;
    }
    .flipbook-page.flipbook-active {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    .flipbook-page.flipbook-exit-next {
      opacity: 0 !important;
      transform: translate(-50%, -50%) translateX(-30px) scale(0.97) !important;
    }
    .flipbook-page.flipbook-exit-prev {
      opacity: 0 !important;
      transform: translate(-50%, -50%) translateX(30px) scale(0.97) !important;
    }
    .flipbook-photo-page {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 18px;
      color: #334155;
      background: #ffffff;
    }
    .flipbook-photo-page > img {
      max-width: 100%;
      max-height: 82%;
      object-fit: contain;
    }
    .flipbook-photo-page h2 {
      max-width: 90%;
      color: #0f172a;
      font-size: clamp(0.9rem, 2vw, 1.35rem);
      text-align: center;
      overflow-wrap: anywhere;
    }
    .flipbook-photo-page p {
      max-width: 88%;
      color: #475569;
      font-size: 0.9rem;
      line-height: 1.5;
      text-align: center;
      white-space: pre-wrap;
    }
    .flipbook-photo-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      width: 100%;
      height: 100%;
      align-items: center;
    }
    .flipbook-photo-grid.two {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .flipbook-photo-grid figure {
      display: flex;
      min-width: 0;
      height: 100%;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin: 0;
    }
    .flipbook-photo-grid img {
      display: block;
      max-width: 100%;
      max-height: 92%;
      object-fit: contain;
    }
    .flipbook-photo-grid figcaption {
      max-width: 100%;
      overflow: hidden;
      color: #64748b;
      font-size: 0.65rem;
      text-align: center;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Styles d'impression dédiés au flyer d'invitation */
    @media print {
      body {
        background-color: #FFFFFF !important;
        color: #0F172A !important;
        padding-bottom: 0 !important;
      }
      header, main, nav, .fixed, input[type="file"] {
        display: none !important;
      }
      #printFlyerContainer {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 24px !important;
        margin: 0 auto !important;
      }
    }