:root {
  color-scheme: light;

  --plBg: #f4f3f8;
  --plBg2: #fbf8f2;
  --plInk: #181824;
  --plInkSoft: rgba(24, 24, 36, 0.86);
  --plMuted: rgba(24, 24, 36, 0.66);
  --plFaint: rgba(24, 24, 36, 0.36);

  --plGold: #b89a54;
  --plGoldSoft: #d7bf80;

  --plBorderSoft: rgba(24, 24, 36, 0.12);
  --plBorderStrong: rgba(24, 24, 36, 0.18);

  --plRadiusLg: 18px;
  --plRadiusXl: 24px;

  --plShadowSoft: 0 14px 40px rgba(6, 7, 20, 0.12);
  --plShadowFaint: 0 10px 26px rgba(6, 7, 20, 0.08);
}

/* Layout principal */

#main-content {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4.5rem;
  color: var(--plInk);
}

/* Typographie */

#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

#main-content h1 {
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

#main-content h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 2.5rem 0 1.25rem;
}

#main-content h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 1.5rem 0 0.75rem;
}

#main-content h4 {
  font-size: 0.98rem;
  line-height: 1.3;
  margin: 1.25rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--plMuted);
}

#main-content p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--plInkSoft);
  margin: 0 0 0.9rem;
}

#main-content ul,
#main-content ol {
  padding-left: 1.1rem;
  margin: 0.3rem 0 1rem;
}

#main-content li {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--plInkSoft);
}

/* Liens */

#main-content a {
  color: var(--plGold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 154, 84, 0.4);
}

#main-content a:hover {
  border-bottom-color: rgba(184, 154, 84, 0.9);
}

/* En-tête */

#temps-header {
  background: radial-gradient(circle at top, #ffffff 0, var(--plBg2) 52%, var(--plBg) 100%);
  border-radius: var(--plRadiusXl);
  padding: 2.25rem 1.75rem 2rem;
  margin-bottom: 2.75rem;
  border: 1px solid var(--plBorderSoft);
  box-shadow: var(--plShadowFaint);
}

#temps-header p {
  max-width: 45rem;
}

#temps-intro p:first-child {
  font-size: 1.02rem;
}

/* Catégories de temps */

#temps-categories-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
}

#temps-categories-list article {
  border-radius: var(--plRadiusLg);
  border: 1px solid var(--plBorderSoft);
  background: #ffffff;
  padding: 1.2rem 1.2rem 1rem;
}

#temps-categories-list h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

/* Règles */

#temps-rules-list {
  list-style: none;
  padding-left: 0;
}

#temps-rules-list li {
  border-radius: var(--plRadiusLg);
  border: 1px solid var(--plBorderSoft);
  background: #ffffff;
  padding: 1.2rem 1.4rem 1.1rem;
  margin-bottom: 0.9rem;
}

#temps-rules-list h3 {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
}

/* Tableau des mois */

#temps-months-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

#temps-months-table th,
#temps-months-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
}

#temps-months-table thead tr {
  background: rgba(248, 246, 252, 0.9);
}

#temps-months-table th {
  font-weight: 600;
  color: var(--plMuted);
  border-bottom: 1px solid var(--plBorderStrong);
}

#temps-months-table tbody tr:nth-child(even) {
  background: rgba(248, 246, 252, 0.5);
}

#temps-months-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

#temps-months-table td {
  border-bottom: 1px solid rgba(24, 24, 36, 0.06);
}

/* Grille des cartes */

#temps-cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem;
  margin-top: 1.5rem;
}

#temps-cards-grid article {
  border-radius: var(--plRadiusXl);
  border: 1px solid var(--plBorderSoft);
  background: linear-gradient(135deg, #ffffff 0, #fbfaf7 32%, #f4f3f8 100%);
  box-shadow: var(--plShadowSoft);
  padding: 1.35rem 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
}

#temps-cards-grid article header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

#temps-cards-grid article h3 {
  margin: 0;
  font-size: 1.08rem;
}

#temps-cards-grid article img {
  width: 64px;
  height: auto;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(24, 24, 36, 0.08);
  background: #fdfcfb;
}

/* Sections internes des cartes */

#temps-cards-grid article section {
  margin-top: 0.55rem;
}

#temps-cards-grid article section ul {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0.1rem 0 0.3rem;
}

#temps-cards-grid article section li {
  font-size: 0.9rem;
  line-height: 1.45;
}

#temps-cards-grid article section p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Mise en avant de la section combinée */

#temps-cards-grid article section:last-of-type {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(24, 24, 36, 0.14);
}

/* Bloc final tirages */

#temps-cta {
  margin-top: 3rem;
  border-radius: var(--plRadiusXl);
  border: 1px solid rgba(184, 154, 84, 0.35);
  background: radial-gradient(circle at top left, #fffdf7 0, #fbf4df 35%, #f4f3f8 100%);
  padding: 1.8rem 1.6rem 1.7rem;
}

#temps-cta ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.7rem;
}

#temps-cta li {
  margin-bottom: 0.65rem;
  font-size: 0.96rem;
}

#temps-cta a {
  font-weight: 600;
}

/* Responsif */

@media (min-width: 640px) {
  #main-content {
    padding-inline: 2rem;
  }

  #temps-header {
    padding-inline: 2.25rem;
  }

  #temps-categories-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #temps-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  #main-content {
    padding-top: 3.5rem;
  }

  #temps-header {
    padding: 2.5rem 2.75rem 2.2rem;
  }

  #temps-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Fresque des temporalités */

#temps-fresco {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--plRadiusXl);
  border: 1px solid var(--plBorderSoft);
  background: radial-gradient(circle at top left, #ffffff 0, #f8f4ff 38%, #f4f3f8 100%);
  padding: 1.7rem 1.5rem 1.5rem;
}

#temps-fresco p {
  max-width: 40rem;
}

#temps-fresco-groups {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

.fresco-group {
  border-radius: var(--plRadiusLg);
  border: 1px solid var(--plBorderSoft);
  background: #ffffff;
  padding: 1rem 1rem 0.8rem;
}

.fresco-group h3 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
}

.fresco-group p {
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

.fresco-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.fresco-card-button {
  display: inline-block;
  padding: 0.15rem;
  border-radius: 12px;
  border: 1px solid rgba(24, 24, 36, 0.08);
  background: #fbfaf7;
  box-shadow: 0 4px 10px rgba(6, 7, 20, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.fresco-card-button img {
  display: block;
  width: 52px;
  height: auto;
  border-radius: 10px;
}

.fresco-card-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(6, 7, 20, 0.11);
  border-color: rgba(184, 154, 84, 0.65);
}

/* Responsif fresque */

@media (min-width: 640px) {
  #temps-fresco-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  #temps-fresco-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Bloc tirages de datation en haut */

#temps-cta-top {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--plRadiusXl);
  border: 1px solid var(--plBorderSoft);
  background: radial-gradient(circle at top right, #ffffff 0, #fbf4df 32%, #f4f3f8 100%);
  padding: 1.8rem 1.6rem 1.6rem;
}

.temps-cta-top-inner {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.temps-cta-top-text p {
  margin-bottom: 0.7rem;
}

.temps-cta-top-text ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.4rem;
}

.temps-cta-top-text li {
  margin-bottom: 0.5rem;
}

.temps-cta-top-text a {
  font-weight: 600;
}

.temps-cta-top-cards {
  display: flex;
  gap: 0.6rem;
}

.temps-cta-top-card {
  padding: 0.2rem;
  border-radius: 14px;
  border: 1px solid rgba(24, 24, 36, 0.08);
  background: #fbfaf7;
  box-shadow: 0 6px 14px rgba(6, 7, 20, 0.08);
}

.temps-cta-top-card img {
  display: block;
  width: 70px;
  height: auto;
  border-radius: 12px;
}

/* Responsif bloc tirages haut */

@media (min-width: 640px) {
  .temps-cta-top-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .temps-cta-top-text {
    flex: 1 1 auto;
    max-width: 60%;
  }

  .temps-cta-top-cards {
    flex: 0 0 auto;
  }
}