/* ---------------------------
   STYLE GLOBAL
---------------------------- */

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
}

/* Images/iframes always fit the screen */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 10px;
}

/* ---------------------------
   CONTAINERS
---------------------------- */

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

/* ---------------------------
   BUTTONS
---------------------------- */

.btn {
    display: inline-block;
    padding: 10px 18px;
    background: #1c1c1c; /* noir/gris */
    color: white;
    border-radius: 5px;
    text-decoration: none;
    margin: 5px;
}

.btn:hover {
    background: #d4af37; /* doré */
    color: #111;
}

.btn-danger {
    background: #7a0b0b;
}

.btn-danger:hover {
    background: #b00000;
    color: #fff;
}

.btn-success {
    background: #d4af37;
    color: #111;
}

.btn-success:hover {
    background: #c9a634;
    color: #111;
}

/* ---------------------------
   CARDS
---------------------------- */

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* ---------------------------
   GRID (LISTES)
---------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ---------------------------
   ACCÈS RAPIDE (ADMIN)
   - Design premium (noir/gris + doré)
---------------------------- */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: #1c1c1c;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.10);
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.quick-btn:hover {
    background: #d4af37;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(0,0,0,0.14);
}

.quick-btn.logout {
    background: #7a0b0b;
    border-color: rgba(255,255,255,0.10);
}

.quick-btn.logout:hover {
    background: #b00000;
    color: #fff;
}

/* ---------------------------
   NAVIGATION ADMIN
---------------------------- */

.admin-menu {
    background: #111 !important;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.admin-logo {
    height: 52px !important;
    width: auto !important;
    display: block;
}

.admin-brand-name {
    color: #d4af37;
    font-weight: 900;
    font-size: 18px;
    white-space: nowrap;
}

.admin-menu-checkbox {
    display: none;
}

.admin-menu-toggle {
    display: none; /* shown on mobile */
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.admin-menu-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin-top: 8px;
}

.admin-menu-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
}

.admin-menu-links a:hover {
    background: #d4af37;
    color: #111;
}

.admin-menu-links a.logout {
    color: #ffdfdf;
}

/* ---------------------------
   TABLES
---------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

table th {
    background: #111;
    color: #d4af37;
    padding: 12px;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

table tr:nth-child(even) {
    background: #f7f7f7;
}

/* ---------------------------
   FORMS
---------------------------- */

input, textarea, select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 8px;
}

/* ---------------------------
   RESPONSIVE (MOBILE)
---------------------------- */

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

    /* Admin menu collapses */
    .admin-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-menu-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 10px;
    }

    .admin-menu-checkbox:checked + .admin-menu-links {
        display: flex;
    }

    .admin-menu-links a {
        background: rgba(255, 255, 255, 0.12);
    }

    /* Tables: allow horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Buttons stack nicely */
    .btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        margin: 6px 0;
    }
}

button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #1c1c1c;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #d4af37;
    color: #111;
}

/* ---------------------------
   RESIDENCE INDISPONIBLE
---------------------------- */

.card-indisponible {
    opacity: 0.55;
    filter: grayscale(1);
}

.btn-disabled {
    background: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-retour {
    background: #444;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    transition: 0.3s;
}

.btn-retour:hover {
    background: #222;
}

/* ===========================
   APPARTEMENT OCCUPE
=========================== */

.card-grise {
    opacity: 0.55;
    filter: grayscale(1);
}

.btn-occupe {
    background: #dc3545;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    display: inline-block;
    font-weight: bold;
    cursor: not-allowed;
}

/* ====== Utilisateurs: table responsive mobile ====== */
.table-responsive{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
}

.table{
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 720px; /* force scroll horizontal sur mobile */
}

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

.table thead th{
  background: #111;
  color: #d4af37;
}

/* Actions alignées et propres */
.table td.actions{
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Petit format pour boutons dans tableaux */
.btn-sm{
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 600px){
  .table th, .table td{
    padding: 8px;
  }
}


/* ===========================
   PAGE ACCUEIL CLIENT (RAY'PO)
=========================== */

.raypo-home-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(900px 500px at 15% 10%, rgba(212, 175, 55, 0.18), transparent 60%),
                radial-gradient(900px 500px at 90% 10%, rgba(255, 255, 255, 0.20), transparent 60%),
                #0f1115;
    color: #f2f2f2;
}

.raypo-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
}

.raypo-home-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.raypo-home-logo {
    height: 48px;
    width: auto;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.raypo-home-title {
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #d4af37;
    font-size: 18px;
    line-height: 1.1;
}

.raypo-home-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-top: 2px;
}

.raypo-home-admin-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(212,175,55,0.35);
    background: rgba(212,175,55,0.12);
}

.raypo-home-admin-link:hover {
    background: rgba(212,175,55,0.22);
}

.raypo-home-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 34px 18px 50px;
}

.raypo-home-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 26px 22px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.25);
    text-align: center;
}

.raypo-home-card h1 {
    color: #ffffff;
    margin: 6px 0 6px;
    font-size: 34px;
}

.raypo-home-lead {
    margin: 0 0 18px;
    color: rgba(255,255,255,0.78);
}

.raypo-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.raypo-home-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    padding: 16px 16px;
    border-radius: 14px;
    border: 1px solid rgba(212,175,55,0.35);
    background: linear-gradient(180deg, rgba(212,175,55,0.18), rgba(255,255,255,0.04));
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.raypo-home-action:hover {
    transform: translateY(-2px);
    border-color: rgba(212,175,55,0.60);
    background: linear-gradient(180deg, rgba(212,175,55,0.26), rgba(255,255,255,0.06));
}

.raypo-home-action-outline {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.04);
}

.raypo-home-action-outline:hover {
    border-color: rgba(212,175,55,0.55);
}

.raypo-home-emoji {
    font-size: 26px;
    width: 38px;
    text-align: center;
}

.raypo-home-action-title {
    font-weight: 900;
    font-size: 16px;
    text-align: left;
}

.raypo-home-action-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
    text-align: left;
}

.raypo-home-go {
    font-size: 22px;
    color: rgba(255,255,255,0.85);
}

.raypo-home-footer {
    margin-top: 18px;
    color: rgba(255,255,255,0.70);
    font-size: 13px;
}

.raypo-home-dot {
    margin: 0 8px;
    color: rgba(212,175,55,0.85);
}

/* ===== CONTACTS (CLIENT) ===== */
.raypo-home-contact {
    margin-top: 18px;
    padding: 16px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    text-align: left;
}

.raypo-home-contact-title {
    font-weight: 900;
    color: #d4af37;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.raypo-home-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.raypo-home-contact-item {
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(212,175,55,0.25);
    background: rgba(0,0,0,0.22);
}

.raypo-home-contact-label {
    font-size: 13px;
    color: rgba(255,255,255,0.78);
    margin-bottom: 6px;
}

.raypo-home-contact-item a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-weight: 650;
    font-size: 13px;
    margin: 6px 0;
    word-break: break-word;
}

.raypo-home-contact-item a:hover {
    color: #d4af37;
    text-decoration: underline;
}

@media (max-width: 760px) {
    .raypo-home-grid {
        grid-template-columns: 1fr;
    }
    .raypo-home-card h1 {
        font-size: 28px;
    }
    .raypo-home-subtitle {
        display: none;
    }
    .raypo-home-contact-grid {
        grid-template-columns: 1fr;
    }
}