/*
  CCG — proposition de style 2026
  Inspiration structure/composants : loof.asso.fr (typographie éditoriale,
  boutons arrondis, en-tête clair avec ombre légère)
  Palette : tons bruns sobres (brun principal, beige clair en fond),
  terracotta discret en accent — à l'origine bleu administratif (geneve.ch)
*/

:root {
  --ccg-primary: #8b6b4e;
  --ccg-primary-dark: #5a4330;
  --ccg-accent: #a8495a;
  --ccg-success: #4b7f4e;
  --ccg-success-dark: #3a633d;
  --ccg-mist: #ede6de;
  --ccg-mist-dark: #e0d5c8;
  --ccg-bar: #cbbba8;
  --ccg-text: #3a3a3a;
  --ccg-text-muted: #6b6b6b;
  --ccg-font-heading: "Caveat", "Segoe Script", cursive;
  --ccg-font-body: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Bootstrap (CDN build) theming: re-base its default blue on the CCG
     brown so links, alerts and focus rings match the rest of the palette. */
  --bs-primary: #8b6b4e;
  --bs-primary-rgb: 139, 107, 78;
  --bs-primary-text-emphasis: #4a3727;
  --bs-primary-bg-subtle: #f3ece5;
  --bs-primary-border-subtle: #dccbb9;
  --bs-link-color: #8b6b4e;
  --bs-link-color-rgb: 139, 107, 78;
  --bs-link-hover-color: #5a4330;
  --bs-link-hover-color-rgb: 90, 67, 48;
  --bs-focus-ring-color: rgba(139, 107, 78, 0.25);
}

/* Form focus and list-group active state are hard-coded blue in
   Bootstrap's compiled CSS, not driven by the variables above. */
.form-control:focus,
.form-select:focus {
  border-color: #c5ad96;
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.list-group {
  --bs-list-group-active-bg: var(--ccg-primary);
  --bs-list-group-active-border-color: var(--ccg-primary);
}

/* ── Base ──────────────────────────────────────────────────────────── */

body {
  font-family: var(--ccg-font-body);
  color: var(--ccg-text);
}

.bg-ccg {
  background-color: var(--ccg-mist) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ccg-font-heading);
  color: var(--ccg-primary-dark);
  font-weight: 700;
}

/* Script fonts read smaller/lighter than the serif they replace at the
   same size — scale headings up a bit to keep them legible. */
h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.7rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.2rem; }

a {
  color: var(--ccg-primary);
}
a:hover {
  color: var(--ccg-primary-dark);
}

/* ── Navbar ────────────────────────────────────────────────────────── */

.navbar {
  background-color: var(--ccg-bar) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar .nav-link {
  font-family: var(--ccg-font-body);
  color: var(--ccg-text) !important;
  font-weight: 600;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

/* On the expanded desktop nav, align text links to the bottom of the bar
   instead of centering them — the logo is taller than the text links, so
   centering left each dropdown-toggle at a different height and their
   dropdown menus opened misaligned with one another. */
@media (min-width: 992px) {
  .navbar .navbar-nav {
    align-items: flex-end;
  }
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .dropdown-toggle[aria-expanded="true"] {
  color: var(--ccg-primary-dark) !important;
}

.navbar .nav-link-logo {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
}

.ccg-nav-logo {
  height: 56px;
  width: auto;
}

.navbar .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: var(--ccg-mist);
  color: var(--ccg-primary-dark);
}

/* ── Main content panel ───────────────────────────────────────────── */

.bg-white.shadow.rounded {
  border-radius: 14px !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06) !important;
}

/* Logo moved out of the central panel, into the left gutter
   created by col-xl-8.offset-xl-2. Native size, only shown where that
   gutter actually exists (>=1200px) so it never overlaps the panel. */
.ccg-side-logo {
  display: none;
}

@media (min-width: 1200px) {
  .ccg-side-logo {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 173px;
    height: 169px;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  font-family: var(--ccg-font-body);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.55rem 1.6rem;
}

.btn-primary,
.btn-info {
  background-color: var(--ccg-primary);
  border-color: var(--ccg-primary);
  color: #fff;
}
.btn-primary:hover,
.btn-info:hover {
  background-color: var(--ccg-primary-dark);
  border-color: var(--ccg-primary-dark);
  color: #fff;
}

/* Petites annonces (/pub) : bouton "annonce", plus compact que les CTA */
.btn-info.ccg {
  padding: 0.3rem 1rem;
  font-size: 0.9rem;
}

/* Formulaire d'inscription : boutons "ajouter un chat"/"ajouter une
   portée". Le vert vif par défaut de Bootstrap jurait avec la palette
   brun/beige du reste du site — remplacé par un vert plus sourd. */
.btn-success {
  background-color: var(--ccg-success);
  border-color: var(--ccg-success);
  color: #fff;
}
.btn-success:hover {
  background-color: var(--ccg-success-dark);
  border-color: var(--ccg-success-dark);
  color: #fff;
}

/* ── Cards ─────────────────────────────────────────────────────────── */

.card {
  border: none;
  border-radius: 12px;
}

.card .card-title,
.card .card-tite {
  font-family: var(--ccg-font-heading);
  color: var(--ccg-primary-dark);
}

/* Round icon badge used on the homepage info cards (bi-telephone-fill, etc.) */
.ccg-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 1.25rem auto 0.5rem;
  border-radius: 50%;
  background-color: var(--ccg-primary);
  color: #fff;
  font-size: 1.5rem;
}

/* ── Carousel ──────────────────────────────────────────────────────── */

/* Default Bootstrap arrows are faint white icons at 50% opacity — barely
   visible over the light carousel-item background used on /breeders.
   Give them a solid, opaque circle so they read clearly on any slide. */
.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--ccg-primary);
  background-size: 55%;
  border-radius: 50%;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--ccg-primary-dark);
}

/* ── Alerts ────────────────────────────────────────────────────────── */

.alert-danger {
  background-color: #f6e9ea;
  border-color: #e6cdd0;
  color: var(--ccg-accent);
}

.alert-warning {
  background-color: #f5f3ee;
  border-color: #e9e5dd;
  color: #8a6d3b;
}

.alert-success {
  background-color: #eaf1e9;
  border-color: #d3e3d1;
  color: #3d6b3a;
}

/* ── Tables ────────────────────────────────────────────────────────── */

.table thead th,
.table thead.table-light th {
  background-color: var(--ccg-mist) !important;
  color: var(--ccg-primary-dark);
  font-family: var(--ccg-font-heading);
  font-weight: 700;
  border-bottom-width: 2px;
}

.table-hover > tbody > tr:hover > * {
  background-color: #f5efe8;
}

/* ── Footer ────────────────────────────────────────────────────────── */

footer.bg-light {
  background-color: var(--ccg-bar) !important;
  color: var(--ccg-text);
}
