/* ============================================================
   BASE
   ============================================================ */

:root {
  --green: #2f8a4a;
  --green-dark: #216c38;
  --text: #202124;
  --muted: #667085;
  --line: #e7e9ec;
  --soft: #f8faf8;
  --background: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
}

body {
  min-height: 100vh;
  margin: 0;

  background: var(--background);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  min-height: 84px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 32px;

  border-bottom: 1px solid #f1f1f1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;

  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #42aa62;
  color: white;

  font-size: 26px;
  font-weight: 800;
}

.brand-text {
  font-size: 21px;
  font-weight: 750;
}

.logout-button {
  padding: 11px 18px;

  border: 1px solid #d8dde0;
  border-radius: 999px;

  background: white;

  cursor: pointer;
}

.logout-button:hover {
  background: #f7f8f8;
}

.logout-button:disabled {
  opacity: 0.6;
}


/* ============================================================
   HERO
   ============================================================ */

.resources-hero {
  max-width: 1050px;

  margin: 0 auto;

  padding:
    58px
    24px
    34px;

  text-align: center;
}

.eyebrow,
.section-eyebrow {
  margin: 0;

  color: var(--green);

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.resources-hero h1 {
  margin: 12px 0 12px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(
    52px,
    7vw,
    82px
  );

  line-height: 1;

  font-weight: 500;
}

.hero-intro {
  max-width: 720px;

  margin: 0 auto 32px;

  color: var(--muted);

  font-size: 19px;
  line-height: 1.5;
}


/* ============================================================
   SEARCH
   ============================================================ */

.search-form {
  width: 100%;
  max-width: 920px;

  min-height: 64px;

  margin: 0 auto;

  display: flex;
  align-items: center;

  overflow: hidden;

  border: 1px solid #d6dce0;
  border-radius: 999px;

  background: white;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.08);
}

.search-form input {
  flex: 1;

  min-width: 0;

  padding: 18px 28px;

  border: 0;
  outline: 0;

  font-size: 18px;

  background: transparent;
}

.search-form input::placeholder {
  color: #9aa1a8;
}

.search-form button {
  width: 64px;
  height: 64px;

  border: 0;

  background: transparent;

  cursor: pointer;
}


/* ============================================================
   TABS
   ============================================================ */

.resource-tabs {
  margin-top: 24px;

  display: flex;
  justify-content: center;
  gap: 34px;

  overflow-x: auto;
}

.resource-tab {
  padding: 10px 4px;

  border: 0;
  border-bottom: 3px solid transparent;

  background: transparent;

  color: #4b4e53;

  font-size: 16px;

  cursor: pointer;
}

.resource-tab.is-active {
  border-bottom-color: var(--green);

  color: var(--green-dark);

  font-weight: 750;
}


/* ============================================================
   RESOURCE CONTENT
   ============================================================ */

.resources-section {
  max-width: 1180px;

  margin: 0 auto;

  padding:
    34px
    32px
    80px;

  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 8px 0 0;

  font-size: 31px;
}

.results-count {
  margin: 0;

  color: var(--muted);

  white-space: nowrap;
}


/* ============================================================
   GROUPS
   ============================================================ */

.resource-groups {
  display: grid;
  gap: 26px;
}

.resource-group {
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 18px;

  background: #ffffff;
}

.resource-group-heading {
  min-height: 72px;

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px 24px;

  background: var(--soft);

  border-bottom: 1px solid var(--line);
}

.resource-group-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: #eaf6ed;
  color: var(--green-dark);

  font-size: 24px;
}

.resource-group-heading h3 {
  margin: 0;

  font-size: 22px;
}

.resource-group-count {
  margin-left: auto;

  color: var(--muted);

  font-size: 14px;
}


/* ============================================================
   RESOURCE LINKS
   ============================================================ */

.resource-list {
  margin: 0;

  padding: 8px 24px 14px;

  list-style: none;
}

.resource-list li {
  border-bottom: 1px solid #eef0f1;
}

.resource-list li:last-child {
  border-bottom: 0;
}

.resource-link {
  width: 100%;

  padding: 16px 4px;

  border: 0;

  background: transparent;

  color: #245f37;

  text-align: left;

  font-size: 17px;
  font-weight: 600;

  cursor: pointer;
}

.resource-link:hover {
  text-decoration: underline;
  color: var(--green);
}

.empty-state {
  padding: 28px;

  border-radius: 15px;

  background: var(--soft);

  color: var(--muted);
}


/* ============================================================
   DRAWER
   ============================================================ */

.drawer-overlay {
  position: fixed;
  inset: 0;

  z-index: 90;

  background:
    rgba(17, 24, 39, 0.28);

  opacity: 0;

  transition: opacity 0.22s ease;
}

.drawer-overlay.is-visible {
  opacity: 1;
}

.resource-drawer {
  position: fixed;

  top: 0;
  right: 0;
  bottom: 0;

  z-index: 100;

  width: min(520px, 92vw);

  padding: 30px;

  background: white;

  box-shadow:
    -12px 0 40px
    rgba(0, 0, 0, 0.15);

  transform: translateX(105%);

  transition:
    transform 0.24s ease;

  overflow-y: auto;
}

.resource-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  padding-bottom: 24px;

  border-bottom: 1px solid var(--line);
}

.drawer-type {
  margin: 0 0 10px;

  color: var(--green);

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 34px;
  line-height: 1.15;
}

.drawer-close {
  width: 42px;
  height: 42px;

  flex: 0 0 auto;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: white;

  font-size: 29px;
  line-height: 1;

  cursor: pointer;
}

.drawer-content {
  padding: 30px 0;

  color: #3e4348;

  font-size: 18px;
  line-height: 1.75;

  white-space: pre-line;
}

body.drawer-open {
  overflow: hidden;
}


/* ============================================================
   BOUTON FLOTTANT ACCUEIL
   ============================================================ */

.side-home-button {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);

  z-index: 999;

  width: 92px;
  min-height: 118px;

  padding: 10px 8px;

  border: 2px solid var(--gold);
  border-radius: 22px;

  background: rgba(255, 255, 255, 0.94);
  color: var(--green);

  text-decoration: none;
  text-align: center;
  font-weight: 900;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24);

  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.side-home-button:hover {
  transform:
    translateY(-50%)
    scale(1.05);

  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.30);
}

.side-home-button .home-icon {
  width: 66px;
  height: 66px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 8px;

  border: 3px solid var(--gold);
  border-radius: 50%;

  background: var(--green);
  color: white;

  font-size: 2rem;
  line-height: 1;
}

.side-home-button span {
  display: block;

  font-size: 0.82rem;
  line-height: 1.1;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 24px 32px;

  border-top: 1px solid var(--line);

  color: var(--muted);

  text-align: center;

  font-size: 14px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {

  .side-home-button {
    left: 10px;

    width: 76px;
    min-height: 98px;

    border-radius: 18px;
  }

  .side-home-button .home-icon {
    width: 52px;
    height: 52px;

    font-size: 1.55rem;
  }

  .side-home-button span {
    font-size: 0.72rem;
  }

  .site-header {
    padding: 14px 18px;
  }

  .brand-icon {
    width: 44px;
    height: 44px;

    font-size: 21px;
  }

  .brand-text {
    max-width: 150px;

    font-size: 16px;
  }

  .logout-button {
    padding: 9px 13px;

    font-size: 14px;
  }

  .resources-hero {
    padding:
      38px
      18px
      28px;
  }

  .resources-hero h1 {
    font-size: 48px;
  }

  .hero-intro {
    font-size: 17px;
  }

  .search-form {
    min-height: 56px;
  }

  .search-form input {
    padding: 15px 20px;

    font-size: 16px;
  }

  .search-form button {
    width: 55px;
    height: 55px;
  }

  .resource-tabs {
    justify-content: flex-start;

    gap: 24px;
  }

  .resources-section {
    padding:
      28px
      18px
      60px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-group-heading {
    padding:
      16px
      18px;
  }

  .resource-group-count {
    display: none;
  }

  .resource-list {
    padding:
      6px
      18px
      12px;
  }

  .resource-drawer {
    width: 100%;

    padding: 24px;
  }

}
/* GRAIN ESPOIR HOMEPAGE STYLE */

:root {
  --green-dark: #123f2b;
  --green: #1f6b52;
  --green-soft: #2f8a67;
  --gold: #f2c94c;
  --cream: #fffaf0;
  --text: #173b30;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);

  background:
    linear-gradient(
      90deg,
      rgba(255, 250, 240, 0.94) 0%,
      rgba(255, 250, 240, 0.88) 43%,
      rgba(255, 250, 240, 0.35) 100%
    ),
    radial-gradient(
      circle at 85% 20%,
      rgba(242, 201, 76, 0.18),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #f6fff7 0%,
      #fff7df 50%,
      #e8fff4 100%
    );
}


/* HEADER */

.site-header {
  min-height: 72px;
  padding: 10px 30px;

  background: rgba(255, 255, 255, 0.82);

  backdrop-filter: blur(10px);
}

.brand {
  gap: 12px;

  color: var(--green-dark);
}

.brand-logo {
  width: 64px;
  height: 64px;

  object-fit: contain;

  filter:
    drop-shadow(
      0 5px 9px rgba(0, 0, 0, 0.12)
    );
}

.brand-text {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 0.92;

  color: var(--green-dark);
}

.logout-button {
  padding: 8px 15px;

  border-color:
    rgba(31, 107, 82, 0.35);

  color: var(--green-dark);
}


/* HERO PLUS COMPACT */

.resources-hero {
  max-width: 1050px;

  padding: 24px 24px 18px;
}

.eyebrow {
  font-size: 11px;

  color: var(--green);
}

.resources-hero h1 {
  margin: 6px 0 6px;

  font-family: Georgia, serif;

  font-size: clamp(
    38px,
    5vw,
    58px
  );

  line-height: 1;

  color: var(--green-dark);
}

.hero-intro {
  margin-bottom: 18px;

  font-size: 15px;
  line-height: 1.35;

  color: #496458;
}


/* SEARCH PLUS HAUTE ET PLUS PETITE */

.search-form {
  min-height: 50px;

  max-width: 880px;

  border-color:
    rgba(31, 107, 82, 0.25);

  background:
    rgba(255, 255, 255, 0.82);
}

.search-form input {
  padding: 12px 22px;

  font-size: 15px;
}

.search-form button {
  width: 50px;
  height: 50px;
}


/* TABS */

.resource-tabs {
  margin-top: 12px;

  gap: 28px;
}

.resource-tab {
  padding: 7px 3px;

  font-size: 14px;
}

.resource-tab.is-active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
}


/* SECTION */

.resources-section {
  max-width: 1080px;

  padding: 18px 28px 48px;

  border-top:
    1px solid rgba(31, 107, 82, 0.12);
}

.section-heading {
  margin-bottom: 14px;
}

.section-eyebrow {
  font-size: 11px;

  color: var(--green);
}

.section-heading h2 {
  margin-top: 3px;

  font-size: 22px;

  color: var(--green-dark);
}

.results-count {
  font-size: 13px;

  color: #607269;
}


/* GROUPS */

.resource-groups {
  gap: 10px;
}

.resource-group {
  border-color:
    rgba(31, 107, 82, 0.16);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.74);
}

.resource-group-heading {
  width: 100%;

  min-height: 54px;

  padding: 9px 14px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: 0;

  background:
    rgba(255, 250, 240, 0.74);

  cursor: pointer;

  text-align: left;
}

.resource-group-heading:hover {
  background:
    rgba(240, 249, 242, 0.92);
}

.resource-group-icon {
  width: 34px;
  height: 34px;

  border-radius: 9px;

  font-size: 19px;

  background: #eaf6ed;
  color: var(--green-dark);
}

.resource-group-heading h3 {
  margin: 0;

  font-size: 17px;

  color: var(--green-dark);
}

.resource-group-count {
  margin-left: auto;

  font-size: 12px;

  color: #66786f;
}

.resource-group-chevron {
  width: 24px;

  margin-left: 4px;

  text-align: center;

  color: var(--green-dark);

  font-size: 20px;

  transition:
    transform 0.18s ease;
}


/* CONTENU D'UNE RUBRIQUE */

.resource-list {
  margin: 0;

  padding: 3px 16px 7px;

  overflow: hidden;
}

.resource-group.is-collapsed
.resource-list {
  display: none;
}

.resource-group:not(.is-collapsed)
.resource-group-chevron {
  transform: rotate(180deg);
}

.resource-list li {
  border-bottom:
    1px solid rgba(31, 107, 82, 0.10);
}

.resource-link {
  padding: 9px 2px;

  color: var(--green-dark);

  font-size: 14px;
  font-weight: 600;
}


/* DRAWER */

.drawer-type {
  color: var(--green);
}

.drawer-header h2 {
  font-family: Georgia, serif;

  color: var(--green-dark);

  font-size: 28px;
}

.drawer-content {
  font-size: 15px;
  line-height: 1.6;
}


/* FOOTER */

.site-footer {
  padding: 16px 24px;

  font-size: 12px;

  color: #607269;
}


@media (max-width: 700px) {

  .site-header {
    padding: 9px 14px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-text {
    font-size: 19px;
  }

  .resources-hero {
    padding: 20px 16px 14px;
  }

  .resources-hero h1 {
    font-size: 40px;
  }

  .hero-intro {
    font-size: 14px;
  }

  .resource-tabs {
    gap: 20px;
  }

  .resources-section {
    padding:
      16px
      16px
      40px;
  }
}


/* QUOVAGO DRAWER QUOTES */

.drawer-quote {
  padding: 18px 0;

  border-bottom:
    1px solid rgba(
      31,
      107,
      82,
      0.14
    );
}

.drawer-quote:first-child {
  padding-top: 0;
}

.drawer-quote:last-child {
  border-bottom: 0;
}

.drawer-quote h3 {
  margin:
    0
    0
    9px;

  font-family:
    Georgia,
    serif;

  color:
    var(--green-dark);

  font-size: 20px;
}

.drawer-quote blockquote {
  margin: 0;

  color: #273c33;

  font-size: 15px;
  line-height: 1.65;
}

.drawer-quote-source {
  margin:
    9px
    0
    0;

  color: #68776f;

  font-size: 12px;
}


/* SINGLE CITATION DRAWER */

.drawer-single-quote {
  margin: 0;

  color: #273c33;

  font-family: Georgia, serif;

  font-size: 18px;
  line-height: 1.7;
}
