/* =========================================================
   🟠 STYLES – SECTIONS CONTRÔLE DE GESTION
========================================================= */

/* --------- 🔸 Variables globales --------- */
:root {
  --color-accent: #f97b2d;
  --color-primary: #971a0c;

  /* 🎨 Couleurs de texte */
  --text-main: #2a2a2a;
  --text-soft: #5c2c22;
  --text-muted: #b9b9b9;
  --title-secondary: #e24b1a;
}

html {
  scroll-behavior: smooth;
}

/* =========================================================
   🔹 STRUCTURE GLOBALE
========================================================= */

.section {
  display: none;
  padding: 4rem 1rem;
  background: #ffffff;
  scroll-margin-top: 90px;
}

.section.active {
  display: block;
}

.section:nth-of-type(even) {
  background: #f5f5f5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================================================
   🔹 TITRES ET INTRODUCTIONS
========================================================= */

.section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  text-align: center;
}

.section .intro {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  color: var(--text-main);
}

/* =========================================================
   🔹 CARDS
========================================================= */

.cards {
  display: flex;
  gap: 1.5rem;
  align-items: start;
  transition: all 0.3s ease;
}

.card {
  position: relative;
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid rgba(200, 68, 28, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease, transform 0.3s ease;
  backface-visibility: hidden;
  will-change: transform, box-shadow;
}

.card:hover {
  border-color: #c84a1c;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--title-secondary);
}

.card p,
.card .details.fullwidth p {
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* =========================================================
   🔹 BOUTON "EN SAVOIR PLUS"
========================================================= */

.toggle-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: fit-content;
  margin-top: 1rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: white;
  background-color: var(--color-accent);
  border: none;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.toggle-details:hover {
  background-color: #e06619;
}

/* =========================================================
   🔹 BLOCS DÉTAILLÉS (.details)
========================================================= */

.card .details,
.card .details.fullwidth {
  display: none;
  margin-top: 1rem;
  padding: 1.25rem 1.75rem;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.5s ease;
  overflow: hidden;
  color: var(--text-main);
}

.card .details {
  border: 2px solid var(--color-accent);
}

.card .details.fullwidth {
  border-left: 4px solid var(--color-accent);
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

.card .details.open,
.card .details.fullwidth.open {
  display: block;
  opacity: 1;
  transform: scale(1);
  overflow-y: auto;
  max-height: 90vh;
  padding-right: 1rem;
  box-sizing: border-box;
}

.card .details.fullwidth h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #8c2f1a;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.card .details.fullwidth h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

.details p,
.details ul,
.details table {
  margin-bottom: 1rem;
}

.details ul {
  padding-left: 2rem;
  list-style: disc;
}

.details ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
  list-style: decimal;
  color: var(--text-main);
  line-height: 1.5;
}

.details ol li {
  margin-bottom: 0.4rem;
}


/* =========================================================
   🔹 TABLEAUX DÉTAILLÉS
========================================================= */

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #e4e4e4;
  font-size: 0.93rem;
}

.details-table th,
.details-table td {
  border: 1px solid #ddd;
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.details-table thead {
  position: relative;
  background-color: #fbece6;
  border-bottom: none;
}

.details-table thead::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--color-primary);
  opacity: 0.5;
}

.details-table th {
  padding: 0.65rem 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.details-table td {
  color: var(--text-main);
}

.details-table td:first-child {
  background-color: #fef7f5;
  font-weight: 600;
  color: var(--title-secondary);
  letter-spacing: 0.2px;
  font-size: 0.94rem;
  padding-left: 0.8rem;
  border-right: 2px solid #e4b9a9;
}

.details-table th:first-child {
  border-right: 2px solid #e4b9a9;
}

/* =========================================================
   🔹 LIST
========================================================= */

.styled-list {
  padding-left: 2rem;
  color: var(--text-main);
  font-size: 0.96rem;
  line-height: 1.55;
  counter-reset: item;
}

.styled-list li {
  margin-bottom: 1.2rem;
  position: relative;
  padding-left: 1.2rem;
}

.styled-list li::marker {
  color: var(--title-secondary);
  font-weight: bold;
}

.styled-list strong {
  display: inline-block;
  margin-bottom: 0.2rem;
  font-weight: 600;
  color: var(--color-primary);
}


/* =========================================================
   🔹 ANIMATIONS
========================================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

