﻿/**********************************************
 * CustomTheme.css — Xplore Portal
 * Radiologie Croisette (www.radiologie-croisette.fr)
 *
 * Light mode : palette bleue (primary du site)
 * Dark mode  : @media (prefers-color-scheme: dark)
 *
 * L'iframe étant cross-origin, on utilise
 * prefers-color-scheme qui suit le réglage OS/navigateur.
 *
 * NOTE : les sélecteurs sont préfixés par "body" pour
 * gagner en spécificité face au Main.css natif d'Xplore
 * qui utilise aussi !important sur les mêmes sélecteurs.
 *
 * Couleurs extraites du thème Astro :
 *   primary-50 #f2f6fa   primary-100 #e3edf6
 *   primary-200 #c8e2f7  primary-300 #9fcef1
 *   primary-400 #76b2e2  primary-500 #5396dd
 *   primary-700 #456db5  primary-900 #344d78
 *   gray-50 #f9fafb      gray-200 #e5e7eb
 *   gray-800 #1f2937     gray-900 #111827
 *   gray-950 #030712
 **********************************************/


/* ========================================
   LIGHT MODE (défaut)
   ======================================== */

/**************
 * Commun
 ***************/

/* Général */
.mobile-body {
    background-color: #f2f6fa !important;
    color: #111827 !important;
}

    .mobile-body .mainscreenLogin h1 {
        color: #456db5 !important;
    }

/* Entetes */
body .xvwindowheadercontainer {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

body .xvmobileheaderpagecontainer {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

/* Barre progression étapes rdv */
body .circleEtape,
body .lineEtape {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

    body .circleEtape.etapeCurrent {
        background-color: #5396dd !important;
        color: #ffffff !important;
    }

    body .circleEtape.etapeDone,
    body .lineEtape.etapeDone {
        background-color: #15803d !important;
        color: #ffffff !important;
    }

/* Message d'information */
body .message-info {
    background-color: #e3edf6 !important;
    color: #111827 !important;
}

/* Boutons gris (secondaires) */
body .xvbuttoncontainer .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

/* Boutons primaires */
body .xvbuttoncontainer.blue-button .xvbuttoncontent {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

/* Bouton gris */
body .xvbuttoncontainer.grey-button .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

/* Bouton orange */
body .xvbuttoncontainer.orange-button .xvbuttoncontent {
    background-color: #b45309 !important;
    color: #ffffff !important;
}

/* Bouton orange clair (lien demande RDV alternatif) */
body .xvbuttoncontainer.orange-light-button .xvbuttoncontent {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
}

/* Bouton rouge */
body .xvbuttoncontainer.red-button .xvbuttoncontent {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Conteneur fenêtre plein écran (Prendre RDV, etc.) */
body .xvwindowcontainer {
    background-color: #f2f6fa !important;
    color: #111827 !important;
}

/* Formulaires — inputs, selects, datepickers */
.mobile-body select,
.mobile-body input[type="text"],
.mobile-body input[type="date"],
.mobile-body input[type="email"],
.mobile-body input[type="tel"],
.mobile-body input[type="password"],
.mobile-body textarea {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

/* Radio buttons */
body .radioButton {
    color: #111827 !important;
}

/* Lien bouton (wrapper <a>) */
body .xvbutton {
    background-color: transparent !important;
}

/* Bordures grises */
body .border-radius-grey {
    border-color: #e5e7eb !important;
}

/* Vignette RDV refusé */
body .portail-vignette-refuse {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* Messages système */
body .message-creation-compte {
    background-color: #fef3c7 !important;
    border-color: #b45309 !important;
    color: #111827 !important;
}

body .message-creation-compte .xvbuttoncontainer .xvbuttoncontent {
    background-color: #b45309 !important;
    color: #ffffff !important;
}

body .message-demande-compte-existant {
    background-color: #dcfce7 !important;
    border-color: #15803d !important;
    color: #111827 !important;
}

body .message-paiement {
    background-color: #fee2e2 !important;
    color: #111827 !important;
}

body .message-paiement .xvbuttoncontainer .xvbuttoncontent {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Titre portail */
body .portail-title {
    border-bottom-color: #e5e7eb !important;
}


/************************
 * Patient Menus - Accueil
 *************************/

/* Bandeau Entete Portail */
body .portail-header {
    background-color: #ffffff !important;
    color: #111827 !important;
}

    body .portail-header .nom-utilisateur {
        color: #111827 !important;
    }

/* Menu Principal */
body .portail-menu {
    background-color: #ffffff !important;
    color: #111827 !important;
}

body .portail-menu-item {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

    body .portail-menu-item.selected,
    body .portail-menu-item:hover {
        background-color: #f2f6fa !important;
        border-bottom: 3px solid #5396dd !important;
        color: #5396dd !important;
    }

    body .portail-menu-item.disconnect-button:hover {
        background-color: #fee2e2 !important;
        color: #dc2626 !important;
    }

/* Menu mobile */
body .portail-menu-item-mobile.selected {
    background-color: #f2f6fa !important;
    border-color: #5396dd !important;
    color: #5396dd !important;
}

/* Titres "Mon prochain rendez-vous" et "Mon dernier examen" */
body .portail-main-title {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* Vignette Rendez-Vous */
body .portail-vignette-rdv {
    background-color: #fef3c7 !important;
    color: #111827 !important;
}

    body .portail-vignette-rdv .portail-vignette-title {
        background-color: #fde68a !important;
        color: #92400e !important;
    }

/* Bouton "Gagner du temps en procédant à mon pré-accueil" */
body .xvbuttoncontainer.portail-vignette-rdv-action-principale .xvbuttoncontent {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

/* Autres Boutons RDV */
body .xvbuttoncontainer.portail-vignette-rdv-action-secondaire .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

/* Vignette Resultats */
body .portail-vignette-examen {
    background-color: #e3edf6 !important;
    color: #111827 !important;
}

    body .portail-vignette-examen .portail-vignette-title {
        background-color: #c8e2f7 !important;
        color: #344d78 !important;
    }

/* Bouton "Acceder à mes résultats" */
body .xvbuttoncontainer.portail-vignette-examen-action-principale .xvbuttoncontent {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

/* Autres Boutons Resultats */
body .xvbuttoncontainer.portail-vignette-examen-action-secondaire .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #344d78 !important;
}


/************************
 * Common Menus - Mes Rdvs
 *************************/

/* Vignette Demande de rendez-vous */
body .portail-vignette-demrv {
    background-color: #fef3c7 !important;
    color: #111827 !important;
}

    body .portail-vignette-demrv .portail-vignette-title {
        background-color: #fde68a !important;
        color: #92400e !important;
    }

/* Bouton "Supprimer la demande de rendez-vous" */
body .xvbuttoncontainer.portail-vignette-demrv-action-principale .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}


/*****************************
 * Medecin Menus - Mes Patients
 ******************************/

/* Vignette Diffusion */
body .portail-vignette-diffusion {
    background-color: #e3edf6 !important;
    color: #111827 !important;
}

    body .portail-vignette-diffusion .portail-vignette-title {
        background-color: #c8e2f7 !important;
        color: #344d78 !important;
    }

/* Bouton "Acceder aux résultats" */
body .xvbuttoncontainer.portail-vignette-diffusion-action-principale .xvbuttoncontent {
    background-color: #456db5 !important;
    color: #ffffff !important;
}

/* Bouton "Visualiser les images" */
body .xvbuttoncontainer.portail-vignette-diffusion-action-secondaire .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #344d78 !important;
}

/* Vignette Diffusion déjà lue (état "readed") */
body .portail-vignette-diffusion.portail-vignette-diffusion-readed {
    background-color: #f2f6fa !important;
    color: #111827 !important;
}

    body .portail-vignette-diffusion.portail-vignette-diffusion-readed .portail-vignette-title {
        background-color: #e5e7eb !important;
        color: #344d78 !important;
    }

body .portail-vignette-diffusion-readed .xvbuttoncontainer.portail-vignette-diffusion-action-principale .xvbuttoncontent {
    background-color: #c8e2f7 !important;
    color: #344d78 !important;
}

body .portail-vignette-diffusion-readed .xvbuttoncontainer.portail-vignette-diffusion-action-secondaire .xvbuttoncontent {
    background-color: #e5e7eb !important;
    color: #344d78 !important;
}


/**************
 * Prise Rdv
 ***************/

/* Creneaux */
body .creneau-disponible {
    background-color: #e3edf6 !important;
    color: #111827 !important;
}

    body .creneau-disponible a {
        color: #111827 !important;
    }

body .creneau-disponible-header {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

body .creneau-horaire {
    background-color: #c8e2f7 !important;
    color: #111827 !important;
}

body .creneau-horaire-favoris {
    background-color: #5396dd !important;
    color: #ffffff !important;
}

body .creneau-show-moreless {
    color: #456db5 !important;
}


/* ========================================
   DARK MODE
   ======================================== */

@media (prefers-color-scheme: dark) {

    /**************
     * Commun
     ***************/

    /* Général */
    .mobile-body {
        background-color: #030712 !important;
        color: #f9fafb !important;
    }

        .mobile-body .mainscreenLogin h1 {
            color: #76b2e2 !important;
        }

    /* Entetes */
    body .xvwindowheadercontainer {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

    body .xvmobileheaderpagecontainer {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

    /* Barre progression étapes rdv */
    body .circleEtape,
    body .lineEtape {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
    }

        body .circleEtape.etapeCurrent {
            background-color: #5396dd !important;
            color: #ffffff !important;
        }

        body .circleEtape.etapeDone,
        body .lineEtape.etapeDone {
            background-color: #15803d !important;
            color: #f0fdf4 !important;
        }

    /* Message d'information */
    body .message-info {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
    }

    /* Boutons gris (secondaires) */
    body .xvbuttoncontainer .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }

    /* Boutons primaires */
    body .xvbuttoncontainer.blue-button .xvbuttoncontent {
        background-color: #76b2e2 !important;
        color: #030712 !important;
    }

    /* Bouton gris */
    body .xvbuttoncontainer.grey-button .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }

    /* Bouton orange */
    body .xvbuttoncontainer.orange-button .xvbuttoncontent {
        background-color: #b45309 !important;
        color: #fffbeb !important;
    }

    /* Bouton orange clair (lien demande RDV alternatif) */
    body .xvbuttoncontainer.orange-light-button .xvbuttoncontent {
        background-color: #451a03 !important;
        color: #fbbf24 !important;
    }

    /* Bouton rouge */
    body .xvbuttoncontainer.red-button .xvbuttoncontent {
        background-color: #dc2626 !important;
        color: #ffffff !important;
    }

    /* Conteneur fenêtre plein écran (Prendre RDV, etc.) */
    body .xvwindowcontainer {
        background-color: #030712 !important;
        color: #f9fafb !important;
    }

    /* Formulaires — inputs, selects, datepickers */
    .mobile-body select,
    .mobile-body input[type="text"],
    .mobile-body input[type="date"],
    .mobile-body input[type="email"],
    .mobile-body input[type="tel"],
    .mobile-body input[type="password"],
    .mobile-body textarea {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
        border-color: #344d78 !important;
    }

    /* Radio buttons */
    body .radioButton {
        color: #f9fafb !important;
    }

    /* Lien bouton (wrapper <a>) */
    body .xvbutton {
        background-color: transparent !important;
    }

    /* Bordures grises */
    body .border-radius-grey {
        border-color: #1f2937 !important;
    }

    /* Vignette RDV refusé */
    body .portail-vignette-refuse {
        background-color: #450a0a !important;
        color: #fecaca !important;
    }

    /* Messages système */
    body .message-creation-compte {
        background-color: #451a03 !important;
        border-color: #b45309 !important;
        color: #fffbeb !important;
    }

    body .message-creation-compte .xvbuttoncontainer .xvbuttoncontent {
        background-color: #b45309 !important;
        color: #fffbeb !important;
    }

    body .message-demande-compte-existant {
        background-color: #052e16 !important;
        border-color: #15803d !important;
        color: #f0fdf4 !important;
    }

    body .message-paiement {
        background-color: #450a0a !important;
        color: #fecaca !important;
    }

    body .message-paiement .xvbuttoncontainer .xvbuttoncontent {
        background-color: #dc2626 !important;
        color: #ffffff !important;
    }

    /* Titre portail */
    body .portail-title {
        border-bottom-color: #1f2937 !important;
    }


    /************************
     * Patient Menus - Accueil
     *************************/

    /* Bandeau Entete Portail */
    body .portail-header {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

        body .portail-header .nom-utilisateur {
            color: #f9fafb !important;
        }

    /* Menu Principal */
    body .portail-menu {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

    body .portail-menu-item {
        background-color: #111827 !important;
        color: #f9fafb !important;
        border-color: #1f2937 !important;
    }

        body .portail-menu-item.selected,
        body .portail-menu-item:hover {
            background-color: #1f2937 !important;
            border-bottom: 3px solid #76b2e2 !important;
            color: #76b2e2 !important;
        }

        body .portail-menu-item.disconnect-button:hover {
            background-color: #450a0a !important;
            color: #fecaca !important;
        }

    /* Menu mobile */
    body .portail-menu-item-mobile.selected {
        background-color: #1f2937 !important;
        border-color: #76b2e2 !important;
        color: #76b2e2 !important;
    }

    /* Titres */
    body .portail-main-title {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

    /* Vignette Rendez-Vous — indigo pour signaler action requise */
    body .portail-vignette-rdv {
        background-color: #1a1435 !important;
        color: #f9fafb !important;
    }

        body .portail-vignette-rdv .portail-vignette-title {
            background-color: #2d2260 !important;
            color: #d0c4f0 !important;
        }

    /* Bouton principal RDV */
    body .xvbuttoncontainer.portail-vignette-rdv-action-principale .xvbuttoncontent {
        background-color: #a78bfa !important;
        color: #030712 !important;
    }

    /* Autres Boutons RDV */
    body .xvbuttoncontainer.portail-vignette-rdv-action-secondaire .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }

    /* Vignette Resultats */
    body .portail-vignette-examen {
        background-color: #0c1a2e !important;
        color: #f9fafb !important;
    }

        body .portail-vignette-examen .portail-vignette-title {
            background-color: #1e3a5f !important;
            color: #c8e2f7 !important;
        }

    /* Bouton "Acceder à mes résultats" */
    body .xvbuttoncontainer.portail-vignette-examen-action-principale .xvbuttoncontent {
        background-color: #76b2e2 !important;
        color: #030712 !important;
    }

    /* Autres Boutons Resultats */
    body .xvbuttoncontainer.portail-vignette-examen-action-secondaire .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }


    /************************
     * Common Menus - Mes Rdvs
     *************************/

    /* Vignette Demande de rendez-vous — indigo comme RDV */
    body .portail-vignette-demrv {
        background-color: #1a1435 !important;
        color: #f9fafb !important;
    }

        body .portail-vignette-demrv .portail-vignette-title {
            background-color: #2d2260 !important;
            color: #d0c4f0 !important;
        }

    /* Bouton "Supprimer la demande de rendez-vous" */
    body .xvbuttoncontainer.portail-vignette-demrv-action-principale .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }


    /*****************************
     * Medecin Menus - Mes Patients
     ******************************/

    /* Vignette Diffusion */
    body .portail-vignette-diffusion {
        background-color: #0c1a2e !important;
        color: #f9fafb !important;
    }

        body .portail-vignette-diffusion .portail-vignette-title {
            background-color: #1e3a5f !important;
            color: #c8e2f7 !important;
        }

    /* Bouton "Acceder aux résultats" */
    body .xvbuttoncontainer.portail-vignette-diffusion-action-principale .xvbuttoncontent {
        background-color: #76b2e2 !important;
        color: #030712 !important;
    }

    /* Bouton "Visualiser les images" */
    body .xvbuttoncontainer.portail-vignette-diffusion-action-secondaire .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #f9fafb !important;
    }

    /* Vignette Diffusion déjà lue (état "readed") */
    body .portail-vignette-diffusion.portail-vignette-diffusion-readed {
        background-color: #111827 !important;
        color: #9ca3af !important;
    }

        body .portail-vignette-diffusion.portail-vignette-diffusion-readed .portail-vignette-title {
            background-color: #1f2937 !important;
            color: #9ca3af !important;
        }

    body .portail-vignette-diffusion-readed .xvbuttoncontainer.portail-vignette-diffusion-action-principale .xvbuttoncontent {
        background-color: #344d78 !important;
        color: #9ca3af !important;
    }

    body .portail-vignette-diffusion-readed .xvbuttoncontainer.portail-vignette-diffusion-action-secondaire .xvbuttoncontent {
        background-color: #1f2937 !important;
        color: #9ca3af !important;
    }


    /**************
     * Prise Rdv
     ***************/

    /* Creneaux */
    body .creneau-disponible {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
    }

        body .creneau-disponible a {
            color: #76b2e2 !important;
        }

    body .creneau-disponible-header {
        background-color: #111827 !important;
        color: #f9fafb !important;
    }

    body .creneau-horaire {
        background-color: #1f2937 !important;
        color: #76b2e2 !important;
    }

    body .creneau-horaire-favoris {
        background-color: #5396dd !important;
        color: #030712 !important;
    }

    body .creneau-show-moreless {
        color: #76b2e2 !important;
    }

} /* end dark mode */
