*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14pt;
  line-height: 1.5;
  color: #333;
  background: #f0f0f0;
  padding: 0;
  margin: 0;
  overflow-x: hidden;

  /* PRINT */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.container {
  max-width: 960px;
  margin: 0.6rem auto;
  padding: 12mm;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

header.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6mm;
  padding: 0;
  page-break-inside: avoid;
}

header.row .header-half:first-child {
  display: flex;
  gap: 6px;
  align-items: center;
}

header.row .header-half:first-child img {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4a90e2;
  margin-right: 1rem;
}

header.row .header-half:last-child {
  text-align: right;
}

header.row h1 {
  font-size: 24pt;
  margin: 0;
  line-height: 1.2;
}

header.row h2,
header.row h3 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 12px;
  width: 100%;
  page-break-inside: avoid;
}

.left-col {
  grid-column: 1 / 4;
  font-size: 0.85em;
  padding-top: 6mm;
  padding-bottom: 6mm;
}

.left-col section,
.left-col article {
  margin-bottom: 4mm;
  page-break-inside: avoid;
}

.left-col h3 {
  color: #4a90e2;
  font-size: 1em;
  margin-bottom: 2mm;
}

.right-col {
  grid-column: 5 / 13;
  font-size: 0.95em;
  padding-top: 6mm;
  padding-bottom: 6mm;
}

.right-col section,
.right-col article {
  margin-bottom: 4mm;
  page-break-inside: avoid;
}

h1 {
  font-size: 20pt;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6mm;
}

h2 {
  font-size: 14pt;
  font-weight: 600;
  color: #34495e;
  margin: 10mm 0 6mm;
  padding-bottom: 2mm;
  border-bottom: 2px solid #4a90e2;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: #e74c3c;
}

h3 {
  font-size: 12pt;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2mm;
}

p,
ul {
  margin-bottom: 2mm;
}

ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 1.5mm;
}

ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #4a90e2;
  font-weight: bold;
}

a {
  color: #000;
  text-decoration: none;
}

small {
  color: #333;
}

.left-col,
.right-col {
  padding-top: 6mm;
  padding-bottom: 6mm;
}

.left-col section,
.left-col article,
.right-col section,
.right-col article {
  margin-bottom: 4mm;
}

.contact-info {
  font-size: 0.85em;
  line-height: 1.3;
  text-align: right;
}

.contact-info p {
  text-align: left;
  margin: 2px 0;
}

.contact-info i {
  margin-right: 6px;
  color: #4a90e2;
  width: 16px;
  text-align: center;
}

/* Bouton Télécharger */
.download-wrapper {
  display: flex;
  justify-content: flex-start;
  width: 960px;
  margin: 0.5rem auto;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.8rem;
  background-color: #4a90e2;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  font-size: 0.8em;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 3px 0 #357abd;
  cursor: pointer;
}

.btn-download:hover {
  background-color: #357abd;
}

.btn-download:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #357abd;
}

.btn-download i {
  font-size: 0.9em;
}

/* --- Responsive --- */
@media (max-width: 996px) {
  .container {
    margin: 0.5rem;
  }
  .download-wrapper {
    width: 100%;
    margin: 0.5rem;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 6mm;
  }

  header.row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  header.row .header-half:last-child {
    text-align: left;
  }

  .row {
    display: flex;
    flex-direction: column;
  }

  .right-col {
    order: 1;
  }

  .left-col {
    order: 2;
  }

  .left-col,
  .right-col {
    grid-column: 1 / -1;
    padding: 4mm 0;
    font-size: 0.9em;
  }

  header.row h1 {
    font-size: 22pt;
  }
  h2 {
    font-size: 13pt;
    margin: 0 0 6mm;
  }
  h3 {
    font-size: 11pt;
  }
  .row {
    gap: 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12pt;
  }
  .btn-download {
    width: 100%;
    margin: 0.2rem;
    justify-content: center;
  }
  header.row h1 {
    font-size: 20pt;
  }
  .container {
    padding: 12px;
    margin: 0.2rem;
  }
  .download-wrapper {
    margin: 0;
  }
  .contact-info p {
    margin: 0.5rem 0;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.2;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    width: 100%;
    margin: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 15mm;
    margin: 0 auto;
    box-shadow: none;
  }

  header.row,
  section,
  article,
  .row {
    page-break-inside: avoid;
  }

  /* Header horizontal */
  header.row {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
  }

  header.row .header-half:first-child,
  header.row .header-half:last-child {
    text-align: left;
  }

  /* Colonnes : aside gauche, contenu droit */
  .row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10%;
  }

  .left-col {
    flex: 0 0 25%;
    order: 0;
    padding-top: 1mm;
    padding-bottom: 1mm;
  }

  .right-col {
    flex: 0 0 65%;
    order: 1;
    padding-top: 1mm;
    padding-bottom: 1mm;
  }

  /* Espacement vertical interne augmenté pour l’air */
  .left-col section,
  .left-col article,
  .right-col section,
  .right-col article {
    margin-bottom: 4mm; /* plus d’espace vertical */
  }

  header.row h1 {
    font-size: 20pt;
    margin-bottom: 3mm; /* un peu plus d’air */
  }
  h2 {
    font-size: 12pt;
    margin: 6mm 0 4mm;
  }
  h3 {
    font-size: 10pt;
    margin-bottom: 2mm;
  }

  p,
  ul,
  li {
    margin-bottom: 2mm; /* espace vertical plus généreux */
    font-size: 10pt;
  }

  ul li::before {
    left: 0;
  }

  .download-wrapper {
    display: none !important;
  }
}
