/* ============================================================
   POLICES (WOFF2) — mêmes familles que RapidoImmo (Nunito/Roboto/
   Manrope), seules les graisses dont le fichier existe sont déclarées.
   ============================================================ */

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/nunito/Nunito-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/roboto/Roboto-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/roboto/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/roboto/Roboto-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/roboto/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/roboto/Roboto-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope/Manrope-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope/Manrope-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope/Manrope-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope/Manrope-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope/Manrope-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}


/* ============================================================
   CHARTE LIRICO — vert & or
   ============================================================ */
:root {
    --primary-green: #1F6D47;
    --secondary-green: #144E32;
    --focus-green: #8FC7A6;
    --gold: #C9A227;
    --gold-dark: #A5811C;
    --gold-light: #E9D28A;
    --dark-text: #2B2B28;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Verdana, sans-serif;
    color: var(--dark-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, system-ui, sans-serif;
    color: black;
}

a {
    color: var(--primary-green);
}

a:hover {
    color: var(--secondary-green);
}

/* Focus des champs : bordure vert clair, sans halo. */
.form-control:focus,
.form-select:focus {
    border-color: var(--focus-green);
    box-shadow: none;
}

/* Boutons — le vert remplace le bleu Bootstrap par défaut */
.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.btn-outline-primary {
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline-primary:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

/* Accent or — CTA de mise en avant, badges */
.btn-gold {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #fff;
}

.text-gold {
    color: var(--gold-dark);
}

.badge-gold {
    background-color: var(--gold);
    color: #fff;
}

.btn-pill {
    border-radius: 50px;
}

/* Post-connexion : les boutons primaires (CTA de formulaire) utilisent un dégradé
   des couleurs de l'établissement (--primary-green/--secondary-green, surchargées
   par établissement dans <head> — voir common/header.php) plutôt qu'un aplat.
   Avant connexion (page d'accueil, /connexion), .btn-primary reste en aplat. */
.is-authenticated .btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border-color: transparent;
}

.is-authenticated .btn-primary:hover,
.is-authenticated .btn-primary:focus {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--primary-green) 100%);
    border-color: transparent;
}

/* Boutons radio en pilule (ex. choix du profil à la création d'un utilisateur) :
   Bootstrap bascule .btn-check:checked sur son bleu par défaut (--bs-primary),
   pas sur var(--primary-green) — on force le même dégradé établissement que
   .btn-primary ci-dessus pour l'état sélectionné. */
.is-authenticated .btn-check:checked + .btn-outline-primary,
.is-authenticated .btn-check:focus + .btn-outline-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border-color: transparent;
    color: #fff;
}

/* Boutons d'export DataTables (Cours, Utilisateurs) : Bootstrap aplatit les
   coins adjacents des boutons groupés (.btn-group > .btn), ce qui casse la
   forme pilule côte à côte — on la reforce, avec un espacement entre eux. */
.dt-buttons .btn.btn-pill {
    border-radius: 50px !important;
    margin-right: 8px;
}

.dt-buttons .btn.btn-pill:last-child {
    margin-right: 0;
}

/* HEADER */
.navbar-custom {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    padding: 0;
}

.navbar-brand .logo {
    height: 44px;
    width: auto;
}

/* Page active du menu : gras + couleur de l'établissement (surchargée
   dynamiquement, voir common/header.php), pas de lien vers soi-même. */
.nav-link-active {
    color: var(--primary-green) !important;
    font-weight: 700;
    cursor: default;
}

/* Menus déroulants du header (Administration + compte) : aux couleurs de
   l'établissement (dégradé --primary-green/--secondary-green surchargé par
   établissement), décalés sous le header pour ne pas s'y superposer, sans
   bordure ni filet horizontal (les séparateurs sont retirés du HTML). */
.navbar-custom .dropdown-menu {
    margin-top: .6rem;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    padding: .4rem;
    overflow: hidden;
}

.navbar-custom .dropdown-menu .dropdown-item {
    color: #fff;
    border-radius: 8px;
    padding: .5rem .75rem;
}

.navbar-custom .dropdown-menu .dropdown-item:hover,
.navbar-custom .dropdown-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.navbar-custom .dropdown-menu .dropdown-item.active {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
    font-weight: 700;
}

/* Bandeau dégradé vert/or des pages post-connexion */
.dashboard-header {
    background: linear-gradient(120deg, var(--primary-green), var(--secondary-green));
    padding: 2rem 0;
    color: #fff;
}

.dashboard-header h1 {
    color: #fff;
}

.dashboard-header .subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* Cartes post-connexion */
.card-lirico {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

/* Code de classe — mis en évidence en or */
.classe-code {
    display: inline-block;
    font-family: 'Manrope', monospace;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--secondary-green);
    background: var(--gold-light);
    border-radius: 8px;
    padding: 0.35rem 0.9rem;
}

/* HERO homepage */
.hero-section {
    background: linear-gradient(120deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: #fff;
    padding: 5rem 0;
}

.hero-section h1 {
    color: #fff;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

/* Section "ce que Lirico change" — bas de la homepage */
.changes-section {
    background: linear-gradient(120deg, var(--secondary-green) 0%, var(--primary-green) 100%);
    color: #fff;
    padding: 4.5rem 0;
}

.changes-section h2 {
    color: #fff;
}

.changes-section .lead {
    color: rgba(255, 255, 255, 0.85);
}

.changes-section .feature-check {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.changes-section .feature-check-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.changes-section .feature-check h3 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.changes-section .feature-check p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
}

/* Barre de recherche DataTables (page Utilisateurs) : loupe dans le champ plutôt
   qu'un texte "Rechercher :" — icône Bootstrap Icons (MIT) en data-URI. */
#utilisateursTable_filter input[type="search"] {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'><path d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/></svg>");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 2.25rem;
}

/* Page de connexion : occupe toute la surface disponible sous la nav (pas de
   footer sur cette page, voir common/footer.php $hideFooter) — body.login-page-body
   passe en colonne flex pleine hauteur pour que .login-page s'étire jusqu'en bas. */
body.login-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    background:
        linear-gradient(120deg, rgba(15, 40, 25, 0.72) 0%, rgba(15, 40, 25, 0.55) 100%),
        url('/assets/images/illustration-connexion-partition.jpg') center / cover no-repeat;
}

.login-page .form-label {
    font-weight: 700;
}

/* Zone d'annotation d'une partition */
.partition-viewer {
    position: relative;
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
}

.partition-page {
    position: relative;
    width: 100%;
}

.annotation-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

footer.site-footer {
    background: var(--light-bg);
    color: var(--dark-text);
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

footer.site-footer--simple {
    padding: 1rem 0;
}

footer.site-footer--simple p {
    color: #6c757d;
}

footer.site-footer .footer-logo {
    height: 40px;
    width: auto;
}

footer.site-footer h6 {
    color: var(--dark-text);
}

footer.site-footer a {
    color: var(--primary-green);
}

footer.site-footer a:hover {
    color: var(--gold-dark);
}

footer.site-footer hr {
    border-color: rgba(0, 0, 0, 0.1) !important;
    opacity: 1 !important;
}

/* Formulaires en popup (modal) : labels en gras, pas de bouton "Annuler"
   (la croix de fermeture du modal suffit — voir modal-header .btn-close). */
.modal .form-label {
    font-weight: 700;
}

/* Mode accessibilité renforcée (users.accessibilite, activé par le personnel
   administratif sur demande du titulaire du compte — classe posée sur <body>
   par common/header.php). Texte plus grand, interlignage plus aéré, contrastes
   accrus, focus toujours visible — sans impact pour les autres utilisateurs. */
body.a11y-mode {
    font-size: 1.125rem;
    line-height: 1.7;
}

body.a11y-mode .small,
body.a11y-mode .form-text,
body.a11y-mode small {
    font-size: 0.95rem;
}

body.a11y-mode .text-muted {
    color: #40413e !important;
}

body.a11y-mode a {
    text-decoration: underline;
}

body.a11y-mode a:focus,
body.a11y-mode button:focus,
body.a11y-mode input:focus,
body.a11y-mode select:focus,
body.a11y-mode textarea:focus {
    outline: 3px solid var(--gold-dark);
    outline-offset: 2px;
}
