  body.carte-spots-page main {
    padding-top: 0;
    margin-bottom: 0;
  }

  #map {
    height: calc(100vh - var(--navbar-height));
    width: 100%;
    min-height: 400px;
  }

  .image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
    background-color: #000;
  }

  .image-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .image-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;

  }

  #image-preview {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 60px);
    width: auto;
    height: auto;
  }

  #image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
  }

  #image-overlay * {
    pointer-events: auto;
  }

  .leaflet-container {
    background: #f2f2f2;
  }

  .leaflet-top.leaflet-left {
    margin-top: 8px;
    margin-left: 8px;
  }

  .leaflet-top.leaflet-left .leaflet-control {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .leaflet-control-zoom a,
  .leaflet-control-geoloc a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .leaflet-control-zoom a:last-child,
  .leaflet-control-geoloc a:last-child {
    border-bottom: none !important;
  }

  .leaflet-control-zoom a:hover,
  .leaflet-control-geoloc a:hover {
    background: rgba(96, 165, 250, 0.2) !important;
    color: #93c5fd !important;
  }

  .leaflet-control-zoom a:focus-visible,
  .leaflet-control-geoloc a:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.95);
    outline-offset: -2px;
  }

  .leaflet-control-zoom-in span,
  .leaflet-control-zoom-out span {
    font-size: 21px;
    font-weight: 700;
  }

  .leaflet-control-geoloc {
    margin-top: 10px !important;
  }

  .leaflet-control-geoloc a i {
    font-size: 16px;
  }

  .map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 400px;
    max-width: 200px;
  }

  .control-card {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .control-card label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .control-card label i {
    color: #60a5fa;
    font-size: 12px;
  }

  .control-card select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .control-card select:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(255, 255, 255, 0.12);
  }

  .control-card select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  }

  .control-card select option {
    background: #1e293b;
    color: #e2e8f0;
  }

  #drop-zone {
    padding: 10px;
    text-align: center;
    border: 2px dashed rgba(96, 165, 250, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(96, 165, 250, 0.05);
  }

  #drop-zone:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
  }

  #drop-zone.highlight {
    background: rgba(96, 165, 250, 0.15);
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
  }

  .drop-zone-text {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    flex-wrap: wrap;
  }

  .drop-zone-text i {
    font-size: 16px;
    color: #60a5fa;
  }

  .drop-zone-text span {
    line-height: 1.3;
  }

  .drop-zone-text:hover {
    color: #e2e8f0;
  }

  #drop-zone-file-input {
    display: none;
  }

  #clear-image-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  #clear-image-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
  }

  #analyze-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0.5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  #analyze-btn.ready {
    opacity: 1;
    pointer-events: auto;
  }

  #analyze-btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
  }

  #analyze-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
  }

  @media (min-width: 768px) {
    .map-controls {
      max-width: 240px;
    }

    .control-card {
      padding: 12px 14px;
    }

    .leaflet-control-zoom a,
    .leaflet-control-geoloc a {
      width: 46px;
      height: 46px;
      line-height: 46px;
    }

    .leaflet-control-zoom-in span,
    .leaflet-control-zoom-out span {
      font-size: 24px;
    }

    .leaflet-control-geoloc a i {
      font-size: 18px;
    }

    .control-card label {
      font-size: 11px;
    }

    .control-card select {
      padding: 9px 12px;
      font-size: 13px;
    }

    #analyze-btn,
    #clear-image-btn {
      padding: 11px 16px;
      font-size: 13px;
    }

    .drop-zone-text {
      font-size: 12px;
    }
  }

  .progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1600;
    background: var(--card-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 30px;
    width: 450px;
    max-width: 90vw;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
  }

  .dark-mode .progress-container {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }

  .progress-container.active {
    display: flex;
  }

  .progress-loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
  }

  .dark-mode .progress-loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--primary);
  }

  @keyframes rotation {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  .progress-content {
    width: 100%;
    text-align: center;
  }

  .progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
  }

  .dark-mode .progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.05);
  }

  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  }

  .progress-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
  }

  .dark-mode .progress-text {
    color: var(--text-dark);
  }

  .progress-subtext {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
  }

  .dark-mode .progress-subtext {
    color: #aaa;
  }

  @media (max-width: 576px) {
    .progress-container {
      width: 85vw;
      padding: 20px;
      gap: 15px;
    }

    .progress-loader {
      width: 40px;
      height: 40px;
    }

    .progress-text {
      font-size: 14px;
    }
  }

  .status-message {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1498;
    background: rgba(30, 136, 229, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    max-width: 85%;
    opacity: 0.95;
  }

  .viewer-toggle {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
    color: #e2e8f0;
    border: none;
    padding: 12px 24px;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
    z-index: 11001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
  }

  .viewer-toggle:hover {
    background: linear-gradient(135deg, #264a6e 0%, #143352 100%);
    padding-bottom: 16px;
  }

  .viewer-toggle.hidden {
    right: 100vw;
    /* Adapte le toggle à la largeur du panneau (plein ecran) */
    transform: translateX(0);
    /* On ne veut pas le remonter */
    opacity: 0;
    pointer-events: none;
  }

  .viewer-toggle i {
    font-size: 16px;
    color: #60a5fa;
  }

  .viewer-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #060d1a 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
  }

  .viewer-panel.open {
    transform: translateY(0);
    z-index: 11000;
  }

  .viewer-panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
  }

  .viewer-panel-header {
    background: linear-gradient(90deg, #0a0f1a 0%, #111827 100%);
    color: #e2e8f0;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  }

  .header-titles h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
  }

  .header-titles p {
    margin: 3px 0 0 0;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }

  .badge-beta {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .viewer-panel-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .viewer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
  }

  .viewer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }

  .viewer-panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }

  .viewer-panel-content::-webkit-scrollbar {
    width: 6px;
  }

  .viewer-panel-content::-webkit-scrollbar-track {
    background: transparent;
  }

  .viewer-panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  /* ===== LAYOUT INTERNE DU PANNEAU ===== */
  .viewer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 0;
  }

  .viewer-3d-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  /* ===== SIDENAV : boutons ronds au centre par dessus 3D ===== */
  .viewer-sidenav {
    position: absolute;
    top: 10px;
    /* Top fixe pour mobile et tablette */
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    z-index: 20;
    gap: 16px;
    background: transparent;
    border: none;
    pointer-events: none;
  }

  .vnav-btn {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
  }

  .vnav-btn i {
    font-size: 20px;
  }

  .vnav-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.9;
  }

  .vnav-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #60a5fa;
    transform: scale(1.05);
  }

  .vnav-btn.active {
    background: rgba(96, 165, 250, 0.8);
    color: #0f172a;
    border-color: #60a5fa;
  }

  .vnav-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #f59e0b;
    color: #0f172a;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
    min-width: 16px;
    text-align: center;
    border: 2px solid #0f172a;
  }

  .vnav-badge.has-data {
    display: block;
  }

  /* ===== DRAWERS (overlay sur la zone 3D) ===== */
  .viewer-drawer {
    position: absolute;
    right: 74px;
    /* A gauche des boutons */
    top: 100px;
    /* Aligné avec top de la side nav sur mobile */
    transform: translateX(20px);
    max-height: calc(100vh - 120px);
    width: calc(100vw - 90px);
    max-width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 15;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .viewer-drawer.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Bottom sheet specific for #drawer-fish on mobile — overridden below in media query */

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    flex-shrink: 0;
  }

  .drawer-header>span {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .drawer-header>span>i {
    color: #60a5fa;
    font-size: 15px;
  }

  .drawer-close {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
    flex-shrink: 0;
  }

  .drawer-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
  }

  .drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    /* Plus compact */
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Plus compact */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  }

  .drawer-body::-webkit-scrollbar {
    width: 4px;
  }

  .drawer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
  }

  .drawer-label {
    font-size: 11px;
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .drawer-label i {
    color: #60a5fa;
  }

  .drawer-hint {
    font-size: 10px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .drawer-waiting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(96, 165, 250, 0.08);
    border-left: 3px solid #60a5fa;
    border-radius: 8px;
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.45;
  }

  .drawer-waiting i {
    color: #60a5fa;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .drawer-empty {
    text-align: center;
    padding: 24px 16px;
    color: #475569;
  }

  .drawer-empty i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.3;
  }

  .drawer-empty p {
    font-size: 12px;
    margin: 0;
    color: #64748b;
  }

  /* Grille météo 2×2 */
  .weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .weather-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .weather-item>i {
    font-size: 18px;
  }

  .weather-label {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .weather-value {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
  }

  /* Carte info plan d'eau */
  .info-card {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-left: 3px solid #60a5fa;
    border-radius: 12px;
    padding: 16px;
  }

  .info-card-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.07em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
  }

  .info-card-label i {
    color: #60a5fa;
  }

  .info-card-value {
    font-size: 26px;
    font-weight: 700;
    color: #60a5fa;
  }

  /* Notice qualité satellite */
  .viewer-quality-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(251, 191, 36, 0.06);
    border-top: 1px solid rgba(251, 191, 36, 0.14);
    font-size: 10px;
    color: #fde68a;
    flex-shrink: 0;
    line-height: 1.4;
  }

  .viewer-quality-notice i {
    color: #fbbf24;
    font-size: 11px;
    margin-top: 1px;
    flex-shrink: 0;
  }

  .fish-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .fish-selector-row select {
    flex: 1;
    min-width: 100px;
    padding: 8px 10px;
    /* Plus fin */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .fish-selector-row select:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(255, 255, 255, 0.12);
  }

  .fish-selector-row select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  }

  .fish-selector-row select option {
    background: #1e293b;
    color: #e2e8f0;
  }

  .btn-calculate-hotspots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    /* Plus compact */
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  }

  .btn-calculate-hotspots:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  }

  .btn-calculate-hotspots:active {
    transform: translateY(0);
  }

  .btn-calculate-hotspots i {
    font-size: 16px;
  }

  .btn-hide-hotspots {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-hide-hotspots.visible {
    display: flex;
  }

  .btn-hide-hotspots:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
  }

  .hotspots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hotspot-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
  }

  .hotspot-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
  }

  .hotspot-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }

  .hotspot-rank {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
  }

  .hotspot-rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
  }

  .hotspot-rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
  }

  .hotspot-rank-badge.silver {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: #0f172a;
  }

  .hotspot-rank-badge.bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
  }

  .hotspot-rank-badge.default {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
  }

  .hotspot-probability {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
  }

  .hotspot-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
  }

  .hotspot-detail {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .hotspot-detail i {
    font-size: 12px;
    opacity: 0.7;
  }



  #viewer3d {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(180deg, #0a0f1a 0%, #111827 100%);
    position: absolute;
    /* Remplir le parent viewer-3d-zone */
    inset: 0;
    cursor: grab;
  }

  #viewer3d:active {
    cursor: grabbing;
  }

  .viewer-3d-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #64748b;
    z-index: 2;
  }

  .viewer-3d-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
  }

  /* Boussole 3D en haut à gauche (octogone) */
  .viewer-compass {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    z-index: 30;
    pointer-events: auto;
    /* Permet le clic pour réorienter */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 800px;
    transition: transform 0.2s ease;
  }

  .viewer-compass:hover {
    transform: none;
  }

  .compass-cube-container {
    width: 40px;
    height: 20px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
    /* Transformation mise à jour par JS selon la caméra */
    transform: rotateX(-30deg) rotateY(0deg);
  }

  .compass-face-top {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 0;
    top: -10px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: rotateX(90deg) translateZ(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    font-size: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 5px rgba(255, 255, 255, 0.2);
    z-index: 4;
    pointer-events: none;
  }

  .compass-face {
    position: absolute;
    width: 17px;
    height: 100%;
    left: 11.5px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
  }

  .compass-face.n {
    transform: rotateY(0deg) translateZ(20px);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
  }

  .compass-face.ne {
    transform: rotateY(45deg) translateZ(20px);
  }

  .compass-face.e {
    transform: rotateY(90deg) translateZ(20px);
  }

  .compass-face.se {
    transform: rotateY(135deg) translateZ(20px);
  }

  .compass-face.s {
    transform: rotateY(180deg) translateZ(20px);
  }

  .compass-face.so {
    transform: rotateY(225deg) translateZ(20px);
  }

  .compass-face.o {
    transform: rotateY(270deg) translateZ(20px);
  }

  .compass-face.no {
    transform: rotateY(315deg) translateZ(20px);
  }

  .compass-face-top i {
    transform: rotate(-45deg);
  }

  #viewer-info-glass-panel {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 800px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
    padding: 16px 24px;
    z-index: 25;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    color: #f8fafc;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }

  #viewer-info-glass-panel.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .glass-info-row {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  .glass-info-label {
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .glass-info-value {
    color: #e2e8f0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  /* Séparateur visuel entre les items sur desktop */
  .glass-info-row:not(:last-child)::after {
    content: '';
    display: block;
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.15);
    margin-left: 20px;
  }

  @media (max-width: 768px) {
    #viewer-info-glass-panel {
      /* Remonter le panneau pour éviter la barre d'URL mobile si nécessaire */
      bottom: calc(50px + env(safe-area-inset-bottom));
      width: calc(100% - 20px);
      padding: 12px 16px;
      border-radius: 16px;
      gap: 8px;
      flex-direction: column;
      align-items: center;
    }

    .glass-info-row {
      font-size: 13px;
      width: 100%;
      justify-content: space-between;
    }

    .glass-info-row:not(:last-child)::after {
      display: none; /* Pas de séparateur en vertical */
    }

    .glass-info-row:not(:last-child) {
      border-bottom: 1px solid rgba(255,255,255,0.06);
      padding-bottom: 8px;
      margin-bottom: 4px;
    }
  }

  /* ===== #drawer-fish — Bottom Sheet sur mobile ===== */
  @media (max-width: 767px) {
    #drawer-fish {
      position: fixed;
      top: auto;
      bottom: 0;
      left: 0;
      right: 0;
      width: 100%;
      max-width: 100%;
      height: 72vh;
      max-height: 72vh;
      border-radius: 20px 20px 0 0;
      transform: translateY(100%);
      opacity: 1;
      pointer-events: none;
      z-index: 12000;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    #drawer-fish.open {
      transform: translateY(0);
      pointer-events: auto;
    }

    #drawer-fish .drawer-header {
      position: relative;
      padding-top: 24px;
    }

    #drawer-fish .drawer-header::before {
      content: '';
      position: absolute;
      top: 8px;
      left: 50%;
      transform: translateX(-50%);
      width: 36px;
      height: 4px;
      background: rgba(255, 255, 255, 0.25);
      border-radius: 2px;
    }

    #drawer-fish .drawer-body {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    #viewer-hotspots-list {
      max-height: none;
    }
  }

  @media (min-width: 768px) {
    .status-message {
      bottom: 20px;
      font-size: 13px;
      padding: 10px 20px;
    }

    .viewer-toggle {
      position: fixed;
      top: 50%;
      right: 0;
      bottom: auto;
      left: auto;
      transform: translateY(-50%) translateX(0);
      writing-mode: vertical-rl;
      text-orientation: mixed;
      padding: 20px 14px;
      border-radius: 16px 0 0 16px;
      box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
      z-index: 11001;
    }


    .viewer-drawer {
      top: 80px;
      max-width: 360px;
    }

    .viewer-toggle:hover {
      padding-right: 18px;
      padding-bottom: 20px;
    }

    .viewer-toggle.hidden {
      right: 100vw;
      /* Masqué quand plein écran */
      bottom: auto;
      transform: translateY(-50%);
    }

    .viewer-toggle i {
      transform: rotate(90deg);
    }

    .viewer-panel {
      transform: translateX(100%);
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .viewer-panel.open {
      transform: translateX(0);
    }
  }

  @media (min-width: 1200px) {

    /* Suppression limite de largeur du panneau 480px inutile en mode plein ecran constant */
    #viewer3d {
      height: 100%;
    }
  }

  .viewer-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 14000 !important;
    animation: fadeIn 0.3s ease;
  }

  .viewer-fullscreen-modal.active {
    display: flex;
    flex-direction: column;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .viewer-fullscreen-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
    color: #e2e8f0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .viewer-fullscreen-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .viewer-fullscreen-header h3 i {
    color: #60a5fa;
  }

  .close-fullscreen {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
  }

  .close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }

  #viewer3d-fullscreen {
    flex: 1;
    background: linear-gradient(180deg, #0a0f1a 0%, #111827 100%);
  }

  #seg-color,
  #seg-tol,
  #seg-auto {
    display: none;
  }

  .custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11500 !important;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 90%;
    text-align: center;
    animation: alertSlideIn 0.3s ease;
  }

  .custom-alert h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .custom-alert p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
  }

  .custom-alert button {
    background: rgba(255, 255, 255, 0.95);
    color: #f57c00;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .custom-alert button:hover {
    background: white;
    transform: scale(1.05);
  }

  @keyframes alertSlideIn {
    from {
      opacity: 0;
      transform: translate(-50%, -60%);
    }

    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }

  @media (max-width: 480px) {
    #map {
      height: calc(100vh - 60px);
      min-height: 300px;
    }

    .status-message {
      font-size: 11px;
      padding: 6px 12px;
      max-width: 90%;
      bottom: 50px;
    }
  }

  @media (max-width: 380px) {
    .status-message {
      bottom: 55px;
    }
  }

  .search-container {
    position: relative;
    width: 100%;
    z-index: 10620 !important;
  }

  .search-box {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    height: 42px;

  }

  .search-input {
    flex: 1;
    padding: 0 12px;
    height: 100%;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    min-width: 0;
  }

  .search-input::placeholder {
    color: #94a3b8;
  }

  .search-button {
    width: 42px;
    height: 100%;
    padding: 0;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .search-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  }

  .search-button i {
    font-size: 14px;
  }

  .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 10630 !important;
  }

  .search-results::-webkit-scrollbar {
    width: 6px;
  }

  .search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  .search-results.show {
    display: block;
  }

  .search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.15s ease;
  }

  .search-result-item:last-child {
    border-bottom: none;
  }

  .search-result-item:hover,
  .search-result-item:focus {
    background: rgba(96, 165, 250, 0.15);
  }

  .search-result-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-result-address {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-loading,
  .search-no-results {
    padding: 12px 14px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* ===== OVERLAY ERREUR SURFACE TROP GRANDE ===== */
  /* ===== TOAST ERREUR SURFACE TROP GRANDE ===== */
  #area-toast {
    position: fixed;
    top: 170px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    z-index: 13500;
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    font-size: 14px;
    font-weight: 600;
    color: #fef3c7;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  #area-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  #area-toast i {
    color: #fbbf24;
    font-size: 16px;
    flex-shrink: 0;
  }


  /* ===== MODAL TUTORIEL CARTE ===== */
  #tuto-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    padding-top: 28px;
    padding-bottom: 28px;
    animation: fadeIn 0.35s ease;
  }

  #tuto-modal-overlay.hidden {
    display: none;
  }

  #tuto-modal {
    background: #f1e5db;
    border: 2px solid var(--navbar-light);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(35, 72, 62, 0.25);
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--text-light);
    position: relative;
    scrollbar-width: none;
  }

  #tuto-modal::-webkit-scrollbar {
    display: none;
  }

  body.dark-mode #tuto-modal-overlay {
    background: rgba(2, 6, 23, 0.88);
  }

  body.dark-mode #tuto-modal {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: var(--text-dark);
  }

  /* En-tête */
  .tuto-header {
    padding: 18px 22px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    background: #f1e5db;
    z-index: 2;
    border-bottom: 2px solid var(--navbar-light);
  }

  .tuto-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .tuto-header-icon {
    width: 44px;
    height: 44px;
    background: #519D88;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 14px rgba(81, 157, 136, 0.35);
  }

  .tuto-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
  }

  #tuto-close-btn {
    background: rgba(81, 157, 136, 0.1);
    border: 2px solid var(--navbar-light);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 13px;
    transition: all 0.2s;
  }

  #tuto-close-btn:hover {
    background: rgba(81, 157, 136, 0.25);
  }

  body.dark-mode .tuto-header {
    background: #0f172a;
    border-bottom-color: rgba(148, 163, 184, 0.28);
  }

  body.dark-mode .tuto-header h2 {
    color: #e2e8f0;
  }

  body.dark-mode #tuto-close-btn {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.4);
    color: #cbd5e1;
  }

  body.dark-mode #tuto-close-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
  }

  /* Corps : fil conducteur */
  .tuto-body {
    padding: 16px 22px 0;
  }

  .tuto-step-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  /* Ligne verticale de connexion entre étapes */
  .tuto-step-block::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 44px;
    bottom: 44px;
    width: 2px;
    background: rgba(81, 157, 136, 0.4);
    z-index: 0;
  }

  .tuto-step-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    padding: 0 0 28px;
    position: relative;
    z-index: 1;
  }

  .tuto-step-item:last-child {
    padding-bottom: 0;
  }

  .tuto-step-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #519D88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(81, 157, 136, 0.35);
    z-index: 1;
  }

  .tuto-step-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tuto-step-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
  }

  .tuto-step-label i {
    color: #519D88;
    font-size: 13px;
  }

  .tuto-step-label strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
  }

  .tuto-step-desc {
    font-size: 0.78rem;
    color: #000000;
    line-height: 1.55;
    margin: 0;
    padding-right: 8px;
  }

  body.dark-mode .tuto-step-label strong,
  body.dark-mode .tuto-no-show {
    color: #e2e8f0;
  }

  body.dark-mode .tuto-step-desc {
    color: #cbd5e1;
  }

  body.dark-mode .tuto-media,
  body.dark-mode .tuto-media video {
    background: #0b1220;
  }

  /* Étape 5 : message horizontal centré */
  .tuto-step-final .tuto-step-label {
    flex-direction: row;
    justify-content: center;
    padding: 18px 0 0;
  }

  .tuto-step-final .tuto-step-label strong {
    font-size: 1rem;
    text-align: center;
  }

  /* Médias (vidéos + images) — format téléphone/portrait pleine largeur SANS BORDURE */
  .tuto-media {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    background: #f1e5db;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
  }

  .tuto-media video,
  .tuto-media img {
    display: block;
    border-radius: 10px;
    max-width: 100%;
  }

  .tuto-media video {
    height: auto;
    object-fit: contain;
    background: #f1e5db;
  }

  .tuto-media img {
    height: auto;
    object-fit: contain;
  }

  /* Deux médias empilés verticalement (étape 4) */
  .tuto-media-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .tuto-media-row .tuto-media {
    margin: 0;
  }

  /* Pied de modal */
  .tuto-footer {
    padding: 12px 22px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 2px solid var(--navbar-light);
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background: #f1e5db;
    z-index: 2;
  }

  .tuto-no-show {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-light);
    user-select: none;
  }

  .tuto-no-show:hover {
    color: var(--primary-dark);
  }

  #tuto-no-show-cb {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #519D88;
    cursor: pointer;
  }

  #tuto-start-btn {
    background: #519D88;
    color: white;
    border: none;
    padding: 10px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(81, 157, 136, 0.3);
  }

  #tuto-start-btn:hover {
    background: #23483E;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(81, 157, 136, 0.45);
  }

  body.dark-mode .tuto-footer {
    background: #0f172a;
    border-top-color: rgba(148, 163, 184, 0.28);
  }

  /* Bouton réouvrir tutoriel */
  #tuto-reopen-btn {
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    z-index: 12500;
    pointer-events: auto;
    background: #519D88;
    border: 2px solid #519D88;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(81, 157, 136, 0.3);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  #tuto-reopen-btn:hover {
    background: #519D88;
    color: white;
    border-color: #519D88;
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(81, 157, 136, 0.4);
  }

  body.dark-mode #tuto-reopen-btn {
    background: #2D443C;
    border-color: #2D443C;
    color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(45, 68, 60, 0.35);
  }

  body.dark-mode #tuto-reopen-btn:hover {
    background: #2D443C;
    border-color: #2D443C;
    color: #f8fafc;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65), 0 0 0 4px rgba(45, 68, 60, 0.35);
  }

  #tuto-reopen-btn.tuto-btn-hidden {
    display: none !important;
  }

  /* Masquer le bouton quand le panneau 3D est ouvert (géré via body class en JS) */
  body.viewer-panel-open #tuto-reopen-btn {
    display: none !important;
  }

  /* Masquer le bouton quand le modal tuto est ouvert */
  body.tuto-modal-open #tuto-reopen-btn {
    display: none !important;
  }

  @media (max-width: 540px) {
    #tuto-modal-overlay {
      padding-top: 18px;
      padding-bottom: 18px;
    }

    #tuto-modal {
      border-radius: 14px;
      max-height: 90vh;
    }

    .tuto-header {
      padding: 14px 16px 10px;
    }

    .tuto-body {
      padding: 14px 16px 0;
    }

    .tuto-footer {
      padding: 12px 16px 14px;
    }

    .tuto-step-block::before {
      left: 18px;
    }

    .tuto-step-item {
      grid-template-columns: 36px 1fr;
      gap: 12px;
      padding-bottom: 22px;
    }

    .tuto-step-badge {
      width: 36px;
      height: 36px;
      font-size: 13px;
    }

    .tuto-media {
      margin: 10px 0;
    }

    .tuto-media-row {
      flex-direction: column;
      gap: 10px;
    }
  }
