/*!
Theme Name: Handyloc Divi Child
Description: Thème enfant Divi - Handyloc (espace membre, réservations).
Template: Divi
Version: 1.0.0
Text Domain: handyloc-child
*/
/* ⚠️ Si ton style.css d'origine avait déjà un header (Theme Name / Author /
   Template) différent, remets TES vraies infos ici. "Template: Divi" doit
   correspondre exactement au nom du dossier du thème parent sur le serveur
   (wp-content/themes/<dossier-parent>) — vérifie avant upload, une valeur
   fausse désactive le thème enfant. */

/* =========================================================================
   1. ÉTAT CONNECTÉ / DÉCONNECTÉ (menu, icônes)
   ========================================================================= */
body.logged-in .menu-item-logged-out { display: none !important; }
body:not(.logged-in) .menu-item-logged-in { display: none !important; }

.tooltiptext {
    visibility: hidden;
    display: inline-block;
    background-color: #7b2379;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    height: 25px;
}
.menu-item-logged-in:hover .tooltiptext { visibility: visible; }

.menu-item-logged-out a,
.menu-item-logged-in a {
    background-repeat: no-repeat;
    background-size: 19%;
    background-position: center right;
    transition: background-image 0.2s ease-in-out;
    padding-right: 48px !important;
}
.menu-item-logged-out a { background-image: url("/wp-content/uploads/2025/08/login.png"); }
.menu-item-logged-out a:hover { background-image: url("/wp-content/uploads/2025/08/login-hover.png"); cursor: pointer; }
.menu-item-logged-in a { background-image: url("/wp-content/uploads/2025/08/logout.png"); }
.menu-item-logged-in a:hover { background-image: url("/wp-content/uploads/2025/08/logout-hover.png"); cursor: pointer; }

/* =========================================================================
   2. HEADER / LOGOS
   ========================================================================= */
.logos-header img {
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
}

/* =========================================================================
   3. MODULE RÉSERVATIONS (page-gestion-reservations.php)
   ========================================================================= */
.resa-wrap {
    width: 80%;
    margin: 1em auto;
    border-radius: 20px;
    padding: 1em;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}
.resa-wrap h1 {
    color: grey;
    text-align: center;
    font-weight: bold;
    padding: 1em;
}
.resa-wrap h4 { color: #666A86; font-weight: bold; }
h4.prescripteur { color: #D95D39; }
h4.beneficiaire { color: #F18805; }

.resa-container { margin-bottom: 1em; }
.resa-container h3 { color: blue; }

.resa-box {
    margin: 0;
    font-family: sans-serif;
    font-weight: 100;
    padding: 1em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.resa-wrap table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    color: grey;
    background-color: white;
}
.resa-title th,
.resa-resume td {
    font-weight: 700;
    padding: 9px 24px;
    background-color: #92B6B1;
    color: white !important;
    width: 33%;
    text-align: center;
}
table.title { background-color: #788AA3; color: white; text-align: center; }

th, td { padding: 15px; }
th { text-align: left; }
thead th { background-color: #55608f; }
tbody tr:hover { background-color: rgba(255, 255, 255, 0.3); }
tbody td { position: relative; }
tbody td:hover::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -9999px; bottom: -9999px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: -1;
}

#export-csv-btn {
    float: right;
    background-color: #0073aa;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#export-csv-btn:hover { background-color: #005177; }
#export-csv-btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.5); }
#export-csv-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.toggle-icon {
    font-family: 'ETmodules' !important;
    font-size: 20px;
    margin-left: 8px;
    color: #0073aa;
    cursor: pointer;
    transition: color 0.2s ease;
    float: right;
}
.status-cell:hover .toggle-icon { color: #005177; }
.status-cell.open .toggle-icon { transform: rotate(90deg); transition: transform .2s ease; }

/* Popup de confirmation de changement de statut */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.modal-box { background: #fff; padding: 20px; border-radius: 8px; text-align: center; }
.modal-buttons button { margin: 0 10px; padding: 8px 16px; font-size: 14px; }

/* Popup "connexion administrateur requise" (extrait du <style> inline de
   page-gestion-reservations.php — ne doit plus rester en dur dans le PHP). */
#login-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999;
}
#login-popup .popup-inner {
    background: rgba(13, 36, 75, 0.8);
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    text-align: left;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    color: white;
}
#login-popup .popup-inner h2 { color: #f99d1b; font-weight: bold; }
#login-popup #wp-submit {
    border-width: 0 !important;
    font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 700 !important;
    background-color: #f99d1b;
    font-size: 20px;
    padding: .1em 1em;
    line-height: 1.7em !important;
    border-radius: 3px;
    color: white;
    margin: 10px 0;
    display: inline-block;
    height: 40px;
}
/* Verrouille le scroll uniquement quand le popup "connexion admin requise"
   est affiché (non-admin sur cette page). Classe posée côté PHP dans
   page-gestion-reservations.php (voir handyloc_lock_scroll_for_gate_popup),
   pas de :has() ici — non supporté par un outil de minification côté serveur. */
body.handyloc-lock-scroll { overflow: hidden; }

/* =========================================================================
   4. PAGE PROFIL / COMPTE (page-profile.php)
   ========================================================================= */
.module-connexion .forminator-button-submit {
    font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 700 !important;
    background-color: #f99d1b;
    font-size: 20px;
    padding: .1em 1em;
    line-height: 1.7em !important;
    border-radius: 3px;
    color: white;
    margin: 10px 0;
    display: inline-block;
    height: 40px;
}

.page-template-page-profile-php {
    font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif;
}
.page-template-page-profile-php #main-content {
    background-image: url(/wp-content/uploads/2025/07/AdobeStock_1098135575-1.jpeg) !important;
    padding: 150px 0 150px;
}
.page-template-page-profile-php .et_pb_section { background-color: transparent; padding: 1em; }
.page-template-page-profile-php #content-area {
    border-radius: 10px;
    font-size: 20px;
    background-color: rgba(123, 35, 121, 0.8); /* #7b2379 - violet, DA du site */
    overflow: hidden;
    color: white;
    text-align: left;
}
.page-template-page-profile-php h2 {
    color: white;
    font-weight: bold;
    padding-bottom: 1em;
    text-align: center;
}
.page-template-page-profile-php .et_pb_newsletter_form #wp-submit,
.page-template-page-profile-php .et_pb_button {
    border-width: 0 !important;
    font-family: 'Karla', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 700 !important;
    background-color: #f99d1b;
    font-size: 20px;
    padding: .1em 1em;
    line-height: 1.7em !important;
    border-radius: 3px;
    color: white;
    margin: 10px 0;
    display: inline-block;
    height: 40px;
}
.page-template-page-profile-php .et_pb_button:hover,
.page-template-page-profile-php .et_pb_newsletter_form #wp-submit:hover {
    padding: .1em 2em .3em .7em;
    background-color: hsla(0, 0%, 100%, .2);
    cursor: pointer;
    border-radius: 3px;
}
.page-template-page-profile-php .et_pb_section_0_tb_header { background-color: white; }

#wp-submit:hover + .arrow-icon { opacity: 1; }
.arrow-icon {
    font-family: 'ETmodules';
    font-size: 32px;
    color: white;
    position: relative;
    left: -30px;
    opacity: 0;
    top: 2px;
}

/* =========================================================================
   5. RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
    .menu-item-logged-out,
    .menu-item-logged-in { background-size: 30px; background-position: right; }

    .resa-fauteuil { font-size: 0.9em; padding-top: 0.2em; }

    .page-template-page-profile-php #main-content {
        background-size: cover;
        background-position: center;
    }

    .menu-item-logged-in a,
    .menu-item-logged-out a { background-size: 15%; }

    .et_pb_code_inner .logos-header { position: relative; top: 69px; }
    .logos-header img { width: 30%; }
    .logos-header { padding-bottom: 2em; }
}
