@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');
@import url("tokens-hegzUYg.css");

@custom-variant dark (&:is(.dark *));

:root {
  --font-size: 16px;
  /* Typography variables */
  --text-h1: 48px;
  --text-h2: 40px;
  --text-h3: 32px;
  --text-h4: 26px;
  --text-large-body: 18px;
  --text-base: 16px;
  --text-label: 14px;
  --text-caption: 13px;
  --font-weight-bold: 700;
  --font-weight-semibold: 600;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --font-family-base: 'Roboto', sans-serif;
  /* The default background color for the application. */
  --background: rgba(255, 255, 255, 1.00);
  /* The default color for elements or text that appears on top of the background. */
  --foreground: rgba(0, 0, 0, 1.00);
  /* The background color for cards, modals, and other containers. */
  --card: rgba(255, 255, 255, 1.00);
  /* The default color for text or elements that appear on top of cards, modals and other background containers. */
  --card-foreground: rgba(0, 0, 0, 1.00);
  /* The background color for dropdowns and tooltips. */
  --popover: rgba(255, 255, 255, 1.00);
  /* The default color for text or elements that appear on top of dropdowns and tooltips. */
  --popover-foreground: rgba(0, 0, 0, 1.00);
  /* The primary color used for buttons, links, and other interactive elements. */
  --primary: rgba(45, 46, 137, 1.00);
  /* The default color for text or elements that appear on top of primary colored elements. */
  --primary-foreground: rgba(255, 255, 255, 1.00);
  /* The secondary color used for secondary(but NOT-DESTRUCTIVE) buttons and interactive elements. */
  --secondary: rgba(55, 129, 103, 1.00);
  /* The default color for text or elements that appear on top of secondary colored elements. */
  --secondary-foreground: rgba(255, 255, 255, 1.00);
  /* The muted color used for less prominent elements, such as disabled buttons or disabled text. */
  --muted: rgba(216, 216, 216, 1.00);
  /* The default color for text or elements that appear on top of muted colored elements. */
  --muted-foreground: rgba(94, 94, 94, 1.00);
  /* The accent color used for highlights, links, and other interactive elements. */
  --accent: rgba(88, 184, 151, 1.00);
  /* The default color for text or elements that appear on top of accent colored elements. */
  --accent-foreground: rgba(255, 255, 255, 1.00);
  /* The color used for background in destructive actions, such as delete buttons or error messages. */
  --destructive: rgba(220, 53, 69, 1.00);
  /* The default color for text or elements that appear on top of destructive colored elements. */
  --destructive-foreground: rgba(255, 255, 255, 1.00);
  /* The default border color for elements such as inputs, buttons, and other containers. */
  --border: rgba(188, 188, 188, 1.00);
  /* The default background color for input fields once the text has been filled. Should be either transparent or match the input-background. */
  --input: rgba(255, 255, 255, 1.00);
  /* The default background color for input fields, text areas, and other input elements. */
  --input-background: rgba(255, 255, 255, 1.00);
  /* The color for focus rings, outlines, and other focus indicators. */
  --ring: rgba(12, 62, 78, 1.00);
  /* Shadow for small elevations, such as cards or modals. */
  --elevation-sm: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
  /* The color for chart elements, such as a bar or line in a chart. */
  --chart-1: rgba(45, 45, 134, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-2: rgba(230, 64, 17, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-3: rgba(88, 184, 151, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-4: rgba(151, 110, 28, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-5: rgba(55, 129, 103, 1.00);
  /* The default border radius for elements such as buttons, tooltip, and other containers. */
  --radius: 4px;
  /* The border radius specifically for button elements. */
  --radius-button: 16px;
  /* The background color for sidebars, navigation menus, and other persistent elements. */
  --sidebar: rgba(45, 45, 134, 1.00);
  /* The default color for text or elements that appear on top of sidebars, navigation menus, and other persistent elements. */
  --sidebar-foreground: rgba(255, 255, 255, 1.00);
  /* The primary color used for buttons, links, and other interactive elements in sidebars and navigation menus. */
  --sidebar-primary: rgba(88, 184, 151, 1.00);
  /* The default color for text or elements that appear on top of primary colored elements in sidebars and navigation menus. */
  --sidebar-primary-foreground: rgba(255, 255, 255, 1.00);
  /* The accent color used for highlights, links, and other interactive elements in sidebars and navigation menus. */
  --sidebar-accent: rgba(230, 64, 17, 1.00);
  /* The default color for text or elements that appear on top of accent colored elements in sidebars and navigation menus. */
  --sidebar-accent-foreground: rgba(255, 255, 255, 1.00);
  /* The default border color for elements in sidebars and navigation menus. */
  --sidebar-border: rgba(188, 188, 188, 1.00);
  /* The default color for focus rings, outlines, and other focus indicators in sidebars and navigation menus. */
  --sidebar-ring: rgba(12, 62, 78, 1.00);
  /* Legacy brand variables */
  --color-brand: #E30613;
  --color-brand-dark: #a80410;
  --color-secondary: #2B2B2B;
  --color-accent-blue: #2D2E89;
  --color-accent-green: #378167;
  --color-text-dark: #2B2B2B;
  --color-text-light: #666666;
  --color-bg-light: #FFFFFF;
  --color-bg-gray: #F5F5F5;
  --color-border: #E5E5E5;
  --color-brand-bg: rgba(227, 6, 19, 0.1);
  /* Alerte / action requise (indépendant de la marque) */
  --color-danger: #E30613;
  /* Statuts locataire (header / récap) */
  --color-status-pending: #2D2E89; /* Paiement en attente */
  --color-status-due: #9C4D54; /* Solde à régler */
  --color-status-insurance: #D2A829; /* Assurance expirée */
  --color-status-uptodate: #316C52; /* Paiements à jour */

  /* ===== Charte : Primary (bleu) ===== */
  --primary-default: #2D2E89;
  --primary-bg-subtle: #E0E0F8;
  --primary-border-subtle: #8F8FE6;
  --primary-light: #17175B;
  --primary-dark: #E0E0F8;
  --primary-emphasis: #1F1F6B;

  /* ===== Charte : Secondary (rouge-orangé) ===== */
  --secondary-default: #CC390F;
  --secondary-bg-subtle: #FDE6E0;
  --secondary-border-subtle: #F78F85;
  --secondary-light: #992909;
  --secondary-dark: #FDE6E0;
  --secondary-emphasis: #B3310D;

  /* ===== Charte : Tertiary (rouge foncé) ===== */
  --tertiary-default: #992909;
  --tertiary-bg-subtle: #FDE6E0;
  --tertiary-border-subtle: #F78F85;
  --tertiary-light: #992909;
  --tertiary-dark: #FDE6E0;
  --tertiary-emphasis: #B3310D;

  /* ===== Charte : Body (texte / fonds gris — Bootstrap) ===== */
  --body-color: #495057;            /* texte principal (gray-700) */
  --body-bg: #F8F9FA;
  --body-secondary: #6C757D;        /* texte secondaire (gray-600) */
  --body-tertiary: #ADB5BD;         /* gray-500 */
  --body-tertiary-bg: #E9ECEF;      /* gray-200 */
  --body-emphasis: #212529;         /* gray-900 */

  /* ===== Charte : Neutral ===== */
  --neutral-white: #FFFFFF;
  --neutral-light: #F8F9FA;
  --neutral-gray-light: #E9ECEF;
  --neutral-gray: #495057;
  --neutral-gray-dark: #343A40;
  --neutral-dark: #212529;
  --neutral-black: #000000;

  /* ===== Charte : Status / Success (vert foncé) ===== */
  --status-success: #146C43;
  --status-success-bg-subtle: #D1E7DD;
  --status-success-border-subtle: #75B798;
  --status-success-emphasis: #0A3622;

  /* ===== Charte : Status / Danger (rouge) ===== */
  --status-danger: #B02A37;
  --status-danger-bg-subtle: #F8D7DA;
  --status-danger-border-subtle: #EA868F;
  --status-danger-emphasis: #842029;

  /* ===== Charte : Status / Warning (jaune) ===== */
  --status-warning: #FFC107;
  --status-warning-bg-subtle: #FFF3CD;
  --status-warning-border-subtle: #FFDA6A;
  --status-warning-emphasis: #CC9A06;

  /* ===== Charte : Status / Info (vert/teal) ===== */
  --status-info: #58B897;
  --status-info-bg-subtle: #E6F4EF;
  --status-info-border-subtle: #9FD8C5;
  --status-info-emphasis: #3E8668;

  /* ===== Charte : Link / Border ===== */
  --link-default: #2D2E89;
  --link-hover: #1F1F6B;
  --border-color: #E9ECEF;
}

[data-theme="partimmo"] {
  --primary: rgba(88, 184, 151, 1.00);
  --sidebar: rgba(88, 184, 151, 1.00);
  --chart-1: rgba(88, 184, 151, 1.00);
  --ring: rgba(88, 184, 151, 1.00);
  --color-brand: #58B897;
  --color-brand-dark: #3d9a7c;
  --color-brand-bg: rgba(88, 184, 151, 0.1);
}

[data-theme="partenium"] {
  --primary: rgba(196, 143, 36, 1.00);
  --sidebar: rgba(196, 143, 36, 1.00);
  --chart-1: rgba(196, 143, 36, 1.00);
  --ring: rgba(196, 143, 36, 1.00);
  --color-brand: #C48F24;
  --color-brand-dark: #9e7219;
  --color-brand-bg: rgba(196, 143, 36, 0.1);
  --color-accent-blue: #2B2B2B;
}

.dark {
  --background: rgba(26, 26, 26, 1.00);
  --foreground: rgba(255, 255, 255, 1.00);
  --card: rgba(38, 38, 38, 1.00);
  --card-foreground: rgba(255, 255, 255, 1.00);
  --popover: rgba(38, 38, 38, 1.00);
  --popover-foreground: rgba(255, 255, 255, 1.00);
  --primary: rgba(88, 184, 151, 1.00);
  --primary-foreground: rgba(26, 26, 26, 1.00);
  --secondary: rgba(65, 145, 115, 1.00);
  --secondary-foreground: rgba(255, 255, 255, 1.00);
  --muted: rgba(64, 64, 64, 1.00);
  --muted-foreground: rgba(163, 163, 163, 1.00);
  --accent: rgba(230, 64, 17, 1.00);
  --accent-foreground: rgba(255, 255, 255, 1.00);
  --destructive: rgba(239, 68, 68, 1.00);
  --destructive-foreground: rgba(255, 255, 255, 1.00);
  --border: rgba(64, 64, 64, 1.00);
  --input: rgba(38, 38, 38, 1.00);
  --ring: rgba(88, 184, 151, 1.00);
  --chart-1: rgba(88, 184, 151, 1.00);
  --chart-2: rgba(230, 64, 17, 1.00);
  --chart-3: rgba(45, 45, 134, 1.00);
  --chart-4: rgba(151, 110, 28, 1.00);
  --chart-5: rgba(65, 145, 115, 1.00);
  --sidebar: rgba(38, 38, 38, 1.00);
  --sidebar-foreground: rgba(255, 255, 255, 1.00);
  --sidebar-primary: rgba(88, 184, 151, 1.00);
  --sidebar-primary-foreground: rgba(26, 26, 26, 1.00);
  --sidebar-accent: rgba(230, 64, 17, 1.00);
  --sidebar-accent-foreground: rgba(255, 255, 255, 1.00);
  --sidebar-border: rgba(64, 64, 64, 1.00);
  --sidebar-ring: rgba(88, 184, 151, 1.00);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 2px);
  --radius-md: var(--radius);
  --radius-lg: calc(var(--radius) + 4px);
  --radius-xl: calc(var(--radius) + 8px);
  --radius-button: var(--radius-button);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --shadow-sm: var(--elevation-sm);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    font-family: var(--font-family-base);
  }
}

/**
 * Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
 */
@layer base {
  :where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
    h1 {
      font-family: var(--font-family-base);
      font-size: var(--text-h1);
      font-weight: var(--font-weight-bold);
      line-height: 1.2;
    }

    h2 {
      font-family: var(--font-family-base);
      font-size: var(--text-h2);
      font-weight: var(--font-weight-bold);
      line-height: 1.2;
    }

    h3 {
      font-family: var(--font-family-base);
      font-size: var(--text-h3);
      font-weight: var(--font-weight-bold);
      line-height: 1.25;
    }

    h4 {
      font-family: var(--font-family-base);
      font-size: var(--text-h4);
      font-weight: var(--font-weight-bold);
      line-height: 1.3;
    }

    p {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    label {
      font-family: var(--font-family-base);
      font-size: var(--text-label);
      font-weight: var(--font-weight-normal);
      line-height: 1.4;
    }

    button {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-semibold);
      line-height: 1.5;
    }

    input {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    .large-body {
      font-family: var(--font-family-base);
      font-size: var(--text-large-body);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    .caption {
      font-family: var(--font-family-base);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-normal);
      line-height: 1.4;
    }
  }
}

/* Default button style matches .btn-primary — override with .btn-secondary, .btn-brand, etc. */
@layer base {
  button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0 0 var(--radius-button) 0;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  button:hover {
    opacity: 0.9;
  }
}

html {
  font-size: var(--font-size);
}

/* ===================================================================
   Composants UI réutilisables (espace locataire)
   =================================================================== */

/* --- Boutons ---
   Style unique : fond blanc, bordure primary, texte primary,
   coin bas-droite arrondi (signature Partenord). Toutes les variantes sont identiques. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 2rem;
  border-radius: 0 0 50px 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  background-color: #fff;
  color: var(--color-accent-blue);
  border: 1px solid var(--color-accent-blue);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

/* Mobile : padding horizontal réduit */
@media (max-width: 767.98px) {
  .btn {
    padding: 0.6rem 1.5rem;
  }
}

/* Hover : teinte claire de la couleur du bouton (style du bouton "Signaler"),
   appliqué à toutes les variantes. Tous les boutons sont blancs (outline). */
.btn:hover {
  background-color: var(--color-brand-primary-bg-subtle);
}

/* Variante pleine : boutons d'action de formulaire (Enregistrer, Valider, Envoyer, Payer…) */
.btn--primary {
  background-color: var(--color-accent-blue);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--color-brand-primary-emphasis);
  border-color: var(--color-brand-primary-emphasis);
  color: #fff;
}

.btn--block {
  width: 100%;
}

/* Variante danger (ex. bouton "Continuer" du bloc Impayé) */
.btn--danger {
  color: var(--color-status-danger-600);
  border-color: var(--color-status-danger-600);
}

.btn--danger:hover {
  background-color: var(--color-status-danger-bg-subtle);
}

/* Bouton désactivé (ex. mode impersonation) */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Bouton icône rond (header) --- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  min-width: 3rem;
  padding: 0 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-dark);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.icon-btn--label {
  padding: 0 1rem;
}

/* Cercle parfait (largeur = hauteur, sans padding) */
.icon-btn--round {
  width: 3rem;
  padding: 0;
}

.icon-btn--ghost {
  border-color: transparent;
}

/* Icône de section de navigation : plus grande et « plus grasse »
   (les polices d'icônes n'ont pas de font-weight → on épaissit au text-stroke). */
.nav-section-icon {
  font-size: 1.25rem;
  -webkit-text-stroke: 0.4px currentColor;
}

.icon-btn:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
}

.icon-btn--ghost:hover {
  border-color: transparent;
}

/* --- Badge de statut --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  color: #fff;
  white-space: nowrap;
}

.status-badge--pending { background-color: var(--color-status-pending); }
.status-badge--due { background-color: var(--color-status-due); }
.status-badge--insurance { background-color: var(--color-status-insurance); }
.status-badge--uptodate { background-color: var(--color-status-uptodate); }

/* Ligne "Montant dû" mise en avant dans le récap (info bg subtle) */
.recap-highlight {
  background-color: var(--status-info-bg-subtle);
}

/* --- Panneau d'en-tête de page (contient header + titre) --- */
.page-hero {
  position: relative;
  overflow: visible;
  padding: 1rem 0;
}

/* Barre de navigation (header) : filet de séparation optionnel piloté par les tokens */
.app-header {
  border-bottom: var(--header-border-width, 0) solid var(--header-border-color, #E9ECEF);
}

/* Texte blanc du hero : uniquement quand un statut est fourni (home) */
.page-hero--pending,
.page-hero--overdue,
.page-hero--due,
.page-hero--insurance,
.page-hero--uptodate {
  color: #fff;
}

/* Dégradé de fond appliqué au BODY (home only) : il déborde verticalement
   derrière le header, le hero et le haut du contenu, puis se fond vers le gris. */
.hero-bg {
  background-repeat: no-repeat;
  background-attachment: local;
}

.hero-bg--pending { background-image: linear-gradient(180deg, var(--color-status-pending) 0, transparent 480px); }
.hero-bg--overdue { background-image: linear-gradient(180deg, #D2A829 0, transparent 480px); }
.hero-bg--due { background-image: linear-gradient(180deg, var(--color-status-danger-emphasis) 0, transparent 480px); }
.hero-bg--insurance { background-image: linear-gradient(180deg, #D2A829 0, transparent 480px); }
.hero-bg--uptodate { background-image: linear-gradient(180deg, #316C52 0, transparent 480px); }
.hero-bg--inprogress { background-image: linear-gradient(180deg, #495057 0, transparent 480px); }

/* Bouton icône rond sur fond sombre (header du hero) */
.icon-btn--on-dark {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.icon-btn--on-dark:hover {
  border-color: #fff;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}

/* --- Thème flatpickr (plage de dates) aux couleurs du projet --- */
/* Spécificité doublée (.flatpickr-calendar…) pour passer AVANT la CSS de flatpickr,
   qui est injectée après globals.css (import dans le contrôleur JS). */
.flatpickr-calendar.flatpickr-calendar {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-calendar .flatpickr-current-month input.cur-year {
  color: var(--color-gray-900);
  font-weight: 700;
}

.flatpickr-calendar span.flatpickr-weekday {
  color: var(--body-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.flatpickr-calendar .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-next-month:hover {
  background: var(--color-bg-gray);
  border-radius: 6px;
}

.flatpickr-calendar .flatpickr-prev-month:hover svg,
.flatpickr-calendar .flatpickr-next-month:hover svg {
  fill: var(--color-accent-blue);
}

/* Aligne les jours sur les en-têtes : même largeur (14.28%) au lieu du cap 39px
   de flatpickr, qui décalait la grille par rapport aux libellés lun/mar/… */
.flatpickr-calendar .flatpickr-day {
  max-width: 14.2857143%;
  height: 40px;
  line-height: 40px;
}

/* flatpickr met la classe "hidden" (visibility:hidden, occupe l'espace) sur les
   jours des mois voisins. Tailwind définit .hidden = display:none, ce qui collapse
   la grille et décale tout le calendrier. On rétablit le comportement de flatpickr. */
.flatpickr-calendar .flatpickr-day.hidden {
  display: block;
  visibility: hidden;
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange,
.flatpickr-calendar .flatpickr-day.selected:hover,
.flatpickr-calendar .flatpickr-day.startRange:hover,
.flatpickr-calendar .flatpickr-day.endRange:hover {
  background: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}

.flatpickr-calendar.flatpickr-calendar .flatpickr-day.selected { border-radius: 2px; }
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.startRange { border-radius: 2px 0 0 2px; }
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.endRange { border-radius: 0 2px 2px 0; }

/* Jours entre le début et la fin : fond bg-subtle, sans arrondi (barre continue) */
.flatpickr-calendar .flatpickr-day.inRange,
.flatpickr-calendar .flatpickr-day.inRange:hover {
  background: var(--color-brand-primary-bg-subtle);
  border-color: var(--color-brand-primary-bg-subtle);
  box-shadow: -5px 0 0 var(--color-brand-primary-bg-subtle), 5px 0 0 var(--color-brand-primary-bg-subtle);
  border-radius: 0;
  color: var(--color-gray-900);
}

.flatpickr-calendar .flatpickr-day.today {
  border: 1px solid var(--color-accent-blue);
  border-radius: 2px;
}

.flatpickr-calendar .flatpickr-day.today:hover {
  background: var(--color-brand-primary-bg-subtle);
  border-color: var(--color-accent-blue);
  color: var(--color-gray-900);
}

/* Survol d'un jour ordinaire (hors sélection / aujourd'hui / plage) : teinte indigo subtile, coins 2px */
.flatpickr-calendar .flatpickr-day:hover {
  background: var(--color-brand-primary-bg-subtle);
  border-color: var(--color-brand-primary-bg-subtle);
  border-radius: 2px;
  color: var(--color-gray-900);
}

/* Responsive : calendrier fluide sur mobile (tient dans la largeur de l'écran) */
@media (max-width: 767.98px) {
  .flatpickr-calendar {
    width: calc(100vw - 32px) !important;
    max-width: 360px;
  }

  .flatpickr-calendar .flatpickr-days,
  .flatpickr-calendar .flatpickr-rContainer,
  .flatpickr-calendar .dayContainer,
  .flatpickr-calendar .flatpickr-weekdays,
  .flatpickr-calendar .flatpickr-weekdaycontainer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}


/* Masque la barre de scroll tout en gardant le défilement (ex : onglets scrollables) */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* --- Page « Mes informations personnelles » --- */
/* Bascule de groupe : Signataire(s) / Occupant(s) du contrat */
.seg-btn {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body-color);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn.is-active {
  background: var(--badge-dark-fill-bg);
  color: var(--color-gray-900);
}

/* Onglets par personne (à l'intérieur d'un groupe) */
.person-tab {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--body-color);
  border-radius: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.person-tab.is-active {
  color: var(--color-gray-900);
  border-bottom-color: var(--color-accent-blue);
}

/* Champs coordonnées : lecture seule (grisé) -> éditable (blanc, bordure primaire) */
.coord-input {
  border: 1px solid var(--color-gray-500);
  background: var(--body-bg);
}

.coord-input:not([readonly]) {
  background: #fff;
  border-color: var(--color-accent-blue);
  cursor: text;
}

/* En mode édition des coordonnées, on masque le FAB pour éviter le chevauchement avec la barre d'actions */
body.editing-coordinates .profile-fab {
  display: none;
}

/* Les zones de texte sont agrandissables verticalement (poignée en bas à droite) */
textarea {
  resize: vertical;
}

/* Champ de formulaire standard (pages du compte) */
.field-input {
  width: 100%;
  border: 1px solid var(--color-gray-500);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-gray-900);
  background: #fff;
}

.field-input::placeholder {
  color: var(--body-secondary);
}

.field-input:focus {
  outline: none;
  border-color: var(--color-accent-blue);
}
