/* RESET */
body {
    margin:0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f7fb;
}

/* CONTAINER */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
}
.logo {
  margin-left: 45px;
}

/* HEADER */
.main-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 900;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo a {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    color: #111;
}
.logo img {
    height:50px;
}
.nav-menu a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
}
.nav-menu a:hover {
    color: #ff6b00;
}
/* BOUTONS RECTILIGNES AVEC MARGE */
.btn-login {
    background-color: #93B18A; /* bleu */
    color: white;
    padding: 10px 18px;        /* taille du bouton */
    border: none;
    border-radius: 0;           /* angles droits */
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin: 10px;               /* marge autour du bouton */
}

.btn-login:hover {
    background-color: #77946F;  /* bleu foncé au hover */
}
.nav-menu a.btn-login{
    color: #fff !important;
}
.reserve-btn {
    display: inline-block;      /* obligatoire pour <a> */
    text-align: center;
    text-decoration: none;      /* supprime le souligné */
    background-color: #007bff;
    color: white;
    padding: 10px 18px;
    border-radius: 0;           /* angles droits */
    font-weight: bold;
    margin: 10px;
    transition: background 0.3s;
}

.reserve-btn:hover {
    background-color: #77946F;
}



/* OFFRES */
.offers-container {
    padding: 30px 15px; /* espace haut/bas et 15px latéral */
}
/*.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; 
    margin: 0 15px;
}*/
.offer-card {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.offer-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.offer-card h2 {
    margin: 12px;
    font-size: 16px;
    color: #111;
}
.offer-card p {
    margin: 0 12px 10px 12px;
    font-size: 14px;
    color: #555;
}

.reservation-container {
    padding: 30px 15px;
    max-width: 600px;
    margin: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.offer-details img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.offer-details h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #111;
}

.offer-details p {
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

.reservation-form {
    display: flex;
    flex-direction: column;
}

.reservation-form label {
    margin: 10px 0 5px 0;
    font-weight: bold;
}

.reservation-form input {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.reservation-form .reserve-btn {
    margin: 10px 0;
    background-color: #007bff;
    border-radius: 0;   /* angles droits */
    color: #fff;
    padding: 10px 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.reservation-form .reserve-btn:hover {
    background-color: #0056b3;
}

#commerceRegisterForm input{
  display: block;
  width: calc(100% - 20px);
  margin: 10px 0;
  padding: 10px;
  font-size: 1em;
}

@media(max-width:768px){
    .reservation-container {
        padding: 20px 15px;
    }
}

.confirmation-container {
    max-width: 600px;
    margin: 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.confirmation-container h1 {
    font-size: 22px;
    margin-bottom: 20px;
}

.confirmation-container p {
    font-size: 16px;
    margin-bottom: 20px;
}

.confirmation-container .reserve-btn {
    display: inline-block;
    text-decoration: none;
    padding: 10px 18px;
    background-color: #007bff;
    color: #fff;
    border-radius: 0;
    font-weight: bold;
    margin: 10px;
    transition: background 0.3s;
}

.confirmation-container .reserve-btn:hover {
    background-color: #0056b3;
}

.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #111;
}

.login-container label {
    display: block;
    margin: 10px 0 5px 0;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-container .reserve-btn {
    width: 100%;
    padding: 10px;
    background-color: #93B18A;
    color: #fff;
    font-weight: bold;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container .reserve-btn:hover {
    background-color: #77946F;
}

.error-msg {
    background: #f8d7da;
    color: #842029;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.dashboard-container {
    max-width:1100px;
    margin:auto;
    padding:20px;
}

/*.offers-grid {
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:30px;
}*/

.dash-offer-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
    margin-top:25px;
}

.dash-offer-card{
    background:white;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 6px 20px rgba(0,0,0,0.08);
    transition:0.25s;
}

.dash-offer-card:hover{
    transform:translateY(-6px);
}

.dash-offer-image{
    position:relative;
}

.dash-offer-image img{
    width:100%;
    height:170px;
    object-fit:cover;
}

.dash-offer-badge{
    position:absolute;
    top:10px;
    left:10px;
    background:#ff3d00;
    color:white;
    padding:5px 8px;
    font-size:13px;
    border-radius:6px;
    font-weight:bold;
}

.dash-offer-content{
    padding:18px;
}

.dash-offer-title{
    font-size:18px;
    margin-bottom:6px;
}

.dash-offer-description{
    font-size:14px;
    color:#666;
    margin-bottom:10px;
}

.dash-offer-meta{
    font-size:13px;
    color:#777;
    margin-bottom:12px;
}

.dash-offer-price{
    margin-bottom:14px;
}

.dash-price-old{
    text-decoration:line-through;
    color:#999;
    margin-right:6px;
}

.dash-price-new{
    font-size:20px;
    font-weight:bold;
    color:#e53935;
}

.dash-offer-actions{
    display:flex;
    gap:10px;
}

.dash-btn-edit{
    background:#3498db;
    color:white;
    padding:7px 12px;
    border-radius:6px;
    text-decoration:none;
}

.dash-btn-delete{
    background:#e74c3c;
    color:white;
    padding:7px 12px;
    border-radius:6px;
    text-decoration:none;
}

.dash-reservations-table{
    width:100%;
    border-collapse:collapse;
    margin-top:15px;
}

.dash-reservations-table th,
.dash-reservations-table td{
    padding:10px;
    border-bottom:1px solid #eee;
}

.dash-total-reservations{
    margin-top:15px;
    font-weight:bold;
}

/* Swipe container moderne */
#swipeContainer {
    margin-top: 15px;
    width: 100%;
    height: 50px;
    border-radius: 30px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 100%);
    position: relative;
    user-select: none;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}

#swipeFill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #28a745, #53c76a);
    border-radius: 30px;
    z-index: 0;
    transition: width 0.1s ease-out;
}

#swipeText {
    position: absolute;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: #555;
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease;
}

#swipeHandle {
    width: 50px;
    height: 50px;
    background: #28a745;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: grab;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
    z-index: 2;
    font-size: 1.2rem;
}

#swipeHandle:active {
    cursor: grabbing;
    transform: scale(1.1);
}

#swipeMessage {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: green;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Swipe container moderne */
#swipeContainer {
    margin-top: 15px;
    width: 100%;
    height: 50px;
    border-radius: 30px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 100%);
    position: relative;
    user-select: none;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}

#swipeFill {
    position:absolute;
    left:0;
    top:0;
    height:100%;
    width:0%;
    background: linear-gradient(90deg, #28a745, #a0ff8b);
    border-radius:30px;
    z-index:0;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}
#swipeHandle {
    width:50px;
    height:50px;
    background:#28a745;
    border-radius:50%;
    position:absolute;
    left:0;
    top:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-weight:bold;
    cursor:pointer;
    transition: transform 0.2s;
    z-index:2;
    pointer-events:none; /* pour laisser le swipe suivre le doigt sur toute la barre */
}

#swipeText {
    position: absolute;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: #555;
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease;
}

/* Flèche fixe sur la gauche, sans carré */
#swipeArrow {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: white;
    z-index: 2;
    pointer-events: none;
}

/* Message final */
#swipeMessage {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: green;
    opacity: 0;
    transition: opacity 0.4s ease;
}

@media (max-width:1100px){

.dash-offer-grid{
    grid-template-columns:repeat(2,1fr);
}

}

@media (max-width:650px){

.dash-offer-grid{
    grid-template-columns:1fr;
}

}
.offer-card {
    background:#f7f7f7;
    padding:15px;
    width:calc(33.333% - 10px);
    box-sizing:border-box;
    border-radius:6px;
    text-align:center;
}

.offer-card img {
    max-width:100%;
    height:150px;
    object-fit:cover;
    margin-bottom:10px;
}

.reserve-btn {
    display:inline-block;
    background:#0044cc;
    color:#fff;
    padding:10px 15px;
    text-decoration:none;
    margin:5px 0;
    border:none;
    cursor:pointer;
    text-align:center;
}

.reservations-table {
    width:100%;
    border-collapse:collapse;
    margin-top:15px;
}

.reservations-table th, .reservations-table td {
    border:1px solid #ddd;
    padding:10px;
    text-align:left;
}

.restaurant-stats {
    display:flex;
    gap:15px;
    flex-wrap:wrap;
    margin-bottom:30px;
}
.stat-card {
    background:#f7f7f7;
    flex:1;
    text-align:center;
    padding:20px;
    border-radius:6px;
}
.stat-card h3 {
    margin-bottom:10px;
}
.stat-card p {
    font-size:22px;
    font-weight:bold;
}

/* ======================
   CONTAINER
====================== */

.offers-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

.offers-wrapper {
    position: relative;
    align-items: center;
    margin-bottom: 50px;
}

.offers-slider {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 20px;
    padding: 0 15px;
}

.offer-card {
    flex: 0 0 calc((100% / 3) - 13.33px);
    background: white;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    scroll-snap-align: start;
}

.last-places-badge {
    margin: 10px 0;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 5px;
    display: inline-block;
}

.badge-critical { background-color: #ff4c4c; color: white; }
.badge-warning { background-color: #ffa500; color: white; }
.badge-hot     { background-color: #ff6b00; color: white; }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    font-size: 28px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 10;
}
.slider-arrow.left { left: 0; }
.slider-arrow.right { right: 0; }

@media (max-width: 900px) { .offer-card { flex: 0 0 70%; } }
@media (max-width: 600px) { .offer-card { flex: 0 0 85%; } }

.offers-title{
    text-align:center;
    font-size:32px;
    margin-bottom:25px;
}

.blue{
    color:#007bff;
}

/* filtres */
.category-filters{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-bottom:30px;
}

.filter-btn{
    padding:10px 18px;
    border:none;
    border-radius:25px;
    background:#f1f1f1;
    cursor:pointer;
    font-weight:600;
}

.filter-btn.active{
    background:#007bff;
    color:white;
}

/* badge categorie */
.offer-card{
    position:relative;
}

.category-badge{
    position:absolute;
    top:10px;
    left:10px;
    background:#007bff;
    color:white;
    padding:5px 12px;
    border-radius:20px;
    font-size:12px;
}


/* ======================
   BADGE DERNIERES PLACES
====================== */

.last-places-badge {
  color: black;
  font-weight: bold;
  padding: 6px 10px;
  margin: 8px 0;
  font-size: 14px;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

/* petit effet vivant */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ======================
   CARTOGRAPHIE
====================== */
#map{
    height:500px;
    border-radius:15px;
    margin:20px auto;
    width:90%;
}

.page-title{
    text-align:center;
    margin-top:20px;
}

.radius-control{
    text-align:center;
    margin:20px;
}

.save-location{
    display:block;
    margin:20px auto;
    padding:12px 25px;
    background:#00AEEF;
    color:white;
    border:none;
    border-radius:10px;
    font-size:16px;
    cursor:pointer;
}


/* FOOTER */
.main-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    font-size: 14px;
    color: #555;
    margin-top: 40px;
}
.main-footer .container {
  box-shadow: none;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.footer-logo {
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #111;
}
.footer-nav a {
    text-decoration: none;
    color: #555;
    margin-left: 15px;
}
.footer-nav a:hover {
    color: #ff6b00;
}

/* RESPONSIVE */
@media(max-width:768px){
    /*.offers-grid { grid-template-columns: 1fr; }*/
    .offer-card img { height: 180px; }
    .footer-content { flex-direction: column; text-align:center; }
    .footer-nav a { margin: 5px; }
    .footer-left { margin-bottom:15px; }
}
