    :root {
        --bg: #cf8e3d;
        --fg: #273d2c;
        --muted: #2b3f2e;
        --accent: #9b410a;
        --card: #f8f2cf;
        --chip: #ffdd95;
        --danger: #ef4444;
    }
    * {
        box-sizing: border-box;
    }
    body {
        margin: 0;
        font-family:
            system-ui,
            -apple-system,
            Segoe UI,
            Roboto,
            Inter,
            Arial;
        background: var(--bg);
        color: var(--fg);
    }
    header {
        padding: 28px 16px 8px;
        text-align: center;
    }
    h1 {
        margin: 0;
        font-size: clamp(28px, 4vw, 40px);
    }
    p.baseline {
        margin: 8px auto 0;
        max-width: 950px;
        line-height: 1.5;
        color: var(--muted);
    }
    .searchbar {
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr auto;
        max-width: 900px;
        margin: 18px auto;
        padding: 10px;
    }
    .searchbar input {
        width: 100%;
        padding: 14px 16px;
        border-radius: 12px;
        border: 0;
        background: #f7f3d0;
        color: var(--fg);
        box-shadow: #00000069 2px 2px 6px;
    }
    .searchbar button {
        padding: 14px 18px;
        border: 0;
        border-radius: 12px;
        background: var(--accent);
        color: #fff;
        font-weight: 700;
        cursor: pointer;
    }
    .layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 12px 18px;
    }
    @media (min-width: 960px) {
        .layout {
            grid-template-columns: 1fr;
        }
    }
    #map {
        height: 420px;
        border-radius: 16px;
        overflow: hidden;
        border: 0;
        box-shadow: #00000069 2px 2px 6px;
    }
    .panel {
        background: none;
        border: 0;
        border-radius: 16px;
        padding: 12px;
    }

    .result {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      background: #f7f3d0;
      padding: 14px;
      border-radius: 12px;
      box-shadow: #00000069 2px 2px 6px;
      flex-direction: row;
      flex-wrap: wrap;
    }

    .result img {
      width: 80px;
      height: 80px;
      object-fit: cover;
      border-radius: 10px;
      border: 1px solid #253043;
      background: #0b1220;
      flex-shrink: 0;
    }

    .result-content {
      flex: 1;
      min-width: 160px;
    }

    .result h3 {
      margin: 0 0 4px 0;
      font-size: 18px;
    }

    .result-header {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0;
    }

    .result-header h3 {
      margin: 0;
      font-size: 18px;
      flex: 1 1 auto;
      min-width: 100px;
    }

    .result-header .status {
      font-weight: 700;
      flex-shrink: 0;
    }

    .result p {
      margin: 0 0 6px 0;
      color: var(--muted);
      font-size: 14px;
    }

    .badges {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .cta {
      display: block;
      text-align: center;
      text-decoration: none;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      padding: 10px 14px;
      border-radius: 10px;
      margin-top: 10px;
      width: 100%;
    }

    .badges {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-top: 6px;
    }
    .badge {
        background: var(--chip);
        color: #000;
        border: 1px solid #334155;
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 12px;
    }
    .cta {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      text-decoration: none;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      padding: 10px 14px;
      border-radius: 10px;
      margin-top: 10px;
      width: 100%;
      transition: filter 0.2s ease;
    }

    .cta:hover,
    .cta:focus {
      filter: brightness(1.5);
    }
    .empty {
      grid-column: 1 / -1;         /* Étend sur toute la largeur de la grille */
      text-align: center;
      border-radius: 10px;
      padding: 10px;
      color: var(--muted);
      font-weight: 600;
      white-space: nowrap;         /* Empêche le retour à la ligne */
      overflow: hidden;
      text-overflow: ellipsis;     /* Coupe si trop long */
      margin-bottom: 20px;
    }
    .status {
        font-weight: 700;
    }
    .open {
        color: #22c55e;
    }
    .closed {
        color: #ef4444;
    }
    .filters {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin: 8px 0;
    }
    
    /* Chips de jours au-dessus de la barre de recherche */
    .day-filters {
        justify-content: center;
        margin: 8px auto 0;
        padding: 0 12px;
    }

    .results-title {
        margin: 4px 0 8px;
        font-size: 18px;
        font-weight: 700;
    }

    .map-block {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .map-note {
        font-size: 13px;
        color: var(--muted);
        margin: 4px 2px 0;
    }

    .chip-btn {
        background: #d3d3d3;
        border: 0;
        color: #7d7d7d;
        border-radius: 999px;
        padding: 6px 10px;
        cursor: pointer;
        box-shadow: #00000069 1px 1px 3px;
    }

    .chip-btn.active {
        background: #7c421d;
        color: #fff;
        box-shadow: #00000069 1px 1px 3px;
    }

    footer {
        color: #8f480f;
        text-align: center;
        font-size: 12px;
        padding: 20px;
    }
    .soon {
        color: #f59e0b;
    }
    .logo-main {
        width: 100px;
    }

    /* Grille responsive des établissements */
    #results{
      display:grid;
      gap:12px;
      grid-template-columns: 1fr;           /* mobile: 1 */
      margin-top: 20px;
    }
    @media (min-width: 640px){
      #results{ grid-template-columns: repeat(2, minmax(0,1fr)); } /* tablette: 2 */
    }
    @media (min-width: 1024px){
      #results{ grid-template-columns: repeat(3, minmax(0,1fr)); } /* desktop: 3 */
    }

    .scan-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 18px;
        border: 0;
        border-radius: 12px;
        background: var(--accent);
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
        justify-content: center;
        box-shadow: #00000069 2px 2px 6px;
    }

    .scan-btn img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .scan-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    margin-bottom: 8px;
}

    .scan-round-btn {
        width: 64px;
        height: 64px;
        border-radius: 999px;
        border: 0;
        background: #f7f3d0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: #00000069 2px 2px 6px;
    }

    .scan-round-btn img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

    .scan-caption {
        margin-top: 6px;
        font-size: 14px;
        color: var(--muted);
    }


    /* --- MODAL QR --- */
    .qr-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.65);
        display: none; /* caché par défaut */
        justify-content: center;
        align-items: center;
        padding: 20px;
        z-index: 9999;
    }

    .qr-modal-content {
        background: #fff;
        padding: 20px;
        border-radius: 16px;
        max-width: 360px;
        width: 100%;
        box-shadow: #00000095 0px 4px 16px;
    }

    #qr-reader {
        width: 100%;
    }

    .close-qr-btn {
        margin-top: 14px;
        width: 100%;
        background: var(--accent);
        border: 0;
        color: #fff;
        padding: 10px;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
    }

    /* Montrer le scan uniquement sur mobile/tablette */
    .scan-zone {
        display: none; /* caché par défaut */
    }

    @media (max-width: 1024px) {
        .scan-zone {
            display: flex;       /* visible sur mobile & tablette */
        }
    }

    /* Modal QR : accessible uniquement mobile/tablette */
    @media (min-width: 1025px) {
        #qr-modal {
            display: none !important;
        }
    }
