/* ==========================================================================
   iD.LYS Solutions — feuille de style unique
   Design system repris du site du groupe (idlys.fr), accent orange Solutions.
   1. Fondations   2. En-tête   3. Composants de page   4. Formulaires
   5. Pied de page   6. Responsive
   ========================================================================== */

/* ============================ 1. FONDATIONS ============================= */

:root {
  --ic-noir: #1b1b1c;
  --ic-noir-2: #141415;
  --ic-accent: #ec7838;       /* orange iD.LYS Solutions (logo) */
  --ic-accent-fonce: #d96524; /* survols et focus : un cran plus foncé, toujours orange */
  --ic-accent-tint: #fdf3ec;  /* fond de survol */
  --ic-blanc: #fff;
  --ic-creme: #f7f6f4;
  --ic-gris-l: #e9e8e5;
  --ic-bord: #eceae7;
  --ic-texte: #4a4a4f;
  --ic-texte-2: #6e6e77;
  --ic-font: "DIN Pro", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ic-header-h: 74px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Lien d'évitement : premier élément focalisable de chaque page */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 2000;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  background: var(--ic-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* Texte réservé aux lecteurs d'écran */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  font-family: var(--ic-font);
  line-height: 1.6;
  color: var(--ic-noir);
  background: var(--ic-blanc);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

/* `picture` est inline par défaut : sans display:block il ne se comporte pas
   comme l'image qu'il remplace. */
img,
svg,
picture {
  display: block;
  max-width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ic-accent-fonce);
  outline-offset: 3px;
  border-radius: 4px;
}

/* L'attribut hidden doit gagner même sur les composants qui posent un display
   (cartes en flex, etc.) — utilisé par le filtre de recherche des news. */
[hidden] {
  display: none !important;
}

[id] {
  scroll-margin-top: calc(var(--ic-header-h) + 20px);
}

.ic-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Titres et intertitres partagés */
.ic-h2 {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.ic-soustitre {
  max-width: 62ch;
  margin-bottom: 46px;
  color: var(--ic-texte);
}

.ic-eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ic-texte-2);
}

/* Puce d'accompagnement : soit 3 barres, soit un picto SVG */
.ic-tick {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  margin-right: 14px;
  color: var(--ic-accent);
  transform: translateY(-2px);
}

.ic-tick i {
  width: 6px;
  border-radius: 4px;
  background: currentColor;
}

.ic-tick i:nth-child(1) { height: 11px; }
.ic-tick i:nth-child(2) { height: 20px; }
.ic-tick i:nth-child(3) { height: 15px; }

/* Section générique (les pages intérieures alternent blanc / crème) */
.ic-section {
  padding: clamp(70px, 9vw, 110px) 0;
}

.ic-section--creme {
  background: var(--ic-creme);
}

/* Liste à puces « tiret » accent, réutilisable hors .ic-row */
.ic-liste {
  list-style: none;
}

.ic-liste li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 22px;
  color: var(--ic-texte);
}

.ic-liste li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 12px;
  height: 5px;
  border-radius: 3px;
  background: var(--ic-accent);
}

/* =============================== 2. EN-TÊTE ============================= */

/* --- Version desktop (≥ 1121px : 9 entrées de navigation) --- */
#idh-desktop {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--ic-bord);
}

.idh-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1160px;
  height: var(--ic-header-h);
  margin: 0 auto;
  padding: 0 24px;
}

.idh-logo img {
  height: 32px;
  width: auto;
}

.idh-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.idh-drop {
  position: relative;
}

.idh-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ic-noir);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.idh-link:hover {
  color: var(--ic-accent);
  background: var(--ic-accent-tint);
}

.idh-link.active {
  color: var(--ic-accent);
  font-weight: 700;
}

.idh-chev {
  width: 11px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.idh-drop:hover .idh-chev,
.idh-drop:focus-within .idh-chev {
  transform: rotate(180deg);
}

/* Ancré à droite du déclencheur : le panneau ne déborde jamais du viewport. */
.idh-mega {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 330px;
  padding: 10px;
  border: 1px solid var(--ic-bord);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(27 27 28 / 14%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Pont invisible entre le bouton et le panneau, pour ne pas perdre le survol */
.idh-mega::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 0;
  left: 0;
  height: 14px;
}

.idh-drop:hover .idh-mega,
.idh-drop:focus-within .idh-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.idh-mega-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.idh-mega-item:hover {
  background: var(--ic-creme);
}

.idh-mega-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ic-noir);
}

.idh-mega-item small {
  display: block;
  font-size: 0.8rem;
  color: var(--ic-texte);
}

.idh-dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
}

/* --- Version mobile (≤ 1120px) --- */

/* La case à cocher pilote le panneau sans JavaScript. */
.idhm-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.idhm-toggle:focus-visible ~ .idhm-bar .idhm-burger {
  outline: 2px solid var(--ic-accent-fonce);
  outline-offset: 2px;
}

.idhm-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 18px;
  background: rgb(255 255 255 / 95%);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--ic-bord);
}

.idhm-logo img {
  height: 28px;
  width: auto;
}

.idhm-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: 8px;
  cursor: pointer;
}

.idhm-burger span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ic-noir);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.idhm-toggle:checked ~ .idhm-bar .idhm-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.idhm-toggle:checked ~ .idhm-bar .idhm-burger span:nth-child(2) {
  opacity: 0;
}

.idhm-toggle:checked ~ .idhm-bar .idhm-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.idhm-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgb(20 20 21 / 50%);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.idhm-toggle:checked ~ .idhm-overlay {
  opacity: 1;
  visibility: visible;
}

.idhm-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999;
  width: min(84vw, 340px);
  height: 100%;
  overflow-y: auto;
  padding: 88px 22px 40px;
  background: #fff;
  box-shadow: -16px 0 50px rgb(27 27 28 / 18%);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.32s;
}

.idhm-toggle:checked ~ .idhm-panel {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.idhm-item {
  display: block;
  padding: 13px 12px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ic-noir);
  text-decoration: none;
}

.idhm-item:hover {
  background: var(--ic-accent-tint);
  color: var(--ic-accent);
}

.idhm-item.active {
  color: var(--ic-accent);
}

.idhm-group {
  margin: 6px 0;
  padding: 12px 0;
  border-top: 1px solid var(--ic-bord);
  border-bottom: 1px solid var(--ic-bord);
}

.idhm-group-title {
  display: block;
  padding: 4px 12px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ic-texte);
}

.idhm-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.98rem;
  color: var(--ic-noir);
  text-decoration: none;
}

.idhm-sub:hover {
  background: var(--ic-creme);
}

.idhm-sub.active {
  color: var(--ic-accent);
  font-weight: 700;
}

.idhm-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ic-accent);
}

/* --- Bascule desktop / mobile --- */
@media (max-width: 1120px) {
  #idh-desktop { display: none; }
}

@media (min-width: 1121px) {
  #idh-mobile { display: none; }
}

/* ======================== 3. COMPOSANTS DE PAGE ========================= */

/* --- Hero --- */
.ic-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 12vw, 150px) 0 clamp(70px, 9vw, 120px);
  background:
    radial-gradient(1100px 480px at 88% -10%, rgb(236 120 56 / 7%), transparent 60%),
    var(--ic-blanc);
}

/* Variante réduite pour les pages intérieures */
.ic-hero--page {
  padding: clamp(56px, 8vw, 100px) 0 clamp(44px, 6vw, 76px);
}

.ic-hero-bars {
  position: absolute;
  right: clamp(-80px, -4vw, -30px);
  bottom: -12%;
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.4vw, 34px);
  height: 115%;
  pointer-events: none;
}

.ic-hero-bars i {
  width: clamp(54px, 7.5vw, 110px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(236 120 56 / 16%), rgb(236 120 56 / 3%));
  transform-origin: bottom;
  animation: ic-rise 1.1s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.ic-hero-bars i:nth-child(1) { height: 58%; animation-delay: 0.05s; }
.ic-hero-bars i:nth-child(2) { height: 96%; animation-delay: 0.18s; }
.ic-hero-bars i:nth-child(3) { height: 76%; animation-delay: 0.32s; }

@keyframes ic-rise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

.ic-h1 {
  max-width: 24ch;
  font-weight: 900;
  font-size: clamp(1.75rem, 4.6vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: 0.015em;
}

.ic-hero--page .ic-h1 {
  font-size: clamp(1.6rem, 3.8vw, 3rem);
}

.ic-h1 em {
  font-style: normal;
  color: var(--ic-accent);
}

.ic-lead {
  max-width: 58ch;
  margin-top: 26px;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.7;
  color: var(--ic-texte);
}

.ic-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.ic-btn {
  display: inline-block;
  padding: 15px 30px;
  border: 0;
  border-radius: 6px;
  background: var(--ic-accent);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ic-btn:hover {
  background: var(--ic-accent-fonce);
  transform: translateY(-2px);
}

.ic-btn--ligne {
  background: none;
  border: 1px solid #cfcecb;
  color: var(--ic-noir);
}

.ic-btn--ligne:hover {
  background: none;
  border-color: var(--ic-accent);
  color: var(--ic-accent);
}

/* Bouton inversé, posé sur un fond accent */
.ic-btn--blanc {
  background: #fff;
  color: var(--ic-noir);
}

.ic-btn--blanc:hover {
  background: var(--ic-creme);
}

/* --- Chiffres clés --- */
.ic-stats {
  background: var(--ic-accent);
  color: #fff;
}

.ic-stats-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.ic-stats-list li {
  flex: 1 1 200px;
  padding: 34px 28px;
  border-left: 1px solid rgb(255 255 255 / 30%);
}

.ic-stats-list li:first-child {
  border-left: none;
}

.ic-stats-list strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
}

.ic-stats-list span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* --- Présentation (texte + marchés) --- */
.ic-presentation {
  padding: clamp(70px, 9vw, 110px) 0;
  background: var(--ic-creme);
}

.ic-pres-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.ic-presentation p {
  margin-bottom: 18px;
  line-height: 1.75;
  color: var(--ic-texte);
}

.ic-presentation p strong {
  color: var(--ic-noir);
}

.ic-marche {
  margin-bottom: 28px;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--ic-accent);
}

.ic-marche:last-child {
  margin-bottom: 0;
}

.ic-marche h3 {
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.ic-marche p {
  margin: 0;
  font-size: 0.95rem;
}

/* --- Rangées en alternance (solutions, réglementation) --- */
.ic-rows {
  padding: clamp(70px, 9vw, 110px) 0 clamp(40px, 5vw, 60px);
}

.ic-row {
  --acc: var(--ic-accent);

  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(44px, 6vw, 70px) 0;
  border-top: 1px solid var(--ic-gris-l);
}

.ic-row:first-of-type {
  padding-top: 10px;
  border-top: none;
}

.ic-row--inverse .ic-row-media,
.ic-row--inverse .ic-row-visuel {
  order: 2;
}

.ic-row-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 62%, #1b1b1c));
}

.ic-row-media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-row-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(150deg, color-mix(in srgb, var(--acc) 34%, transparent), transparent 62%);
}

/* Variante « visuel » : logo ou schéma présenté dans un cadre clair */
.ic-row-visuel {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--ic-gris-l);
  border-radius: 16px;
  background: var(--ic-blanc);
}

.ic-row-visuel img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ic-row-kicker {
  display: block;
  margin-bottom: 18px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc, var(--ic-accent));
}

.ic-row-logo {
  height: 36px;
  width: auto;
  margin-bottom: 20px;
}

.ic-row h2,
.ic-row h3 {
  margin-bottom: 16px;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.ic-row p {
  margin-bottom: 20px;
  line-height: 1.7;
  color: var(--ic-texte);
}

.ic-row p strong {
  color: var(--ic-accent);
}

.ic-row ul,
.ic-row ol {
  margin-bottom: 26px;
  list-style: none;
}

.ic-row li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 22px;
  font-size: 0.95rem;
  color: var(--ic-texte);
}

.ic-row li::before {
  content: "";
  position: absolute;
  top: 0.48em;
  left: 0;
  width: 12px;
  height: 5px;
  border-radius: 3px;
  background: var(--acc);
}

.ic-row li strong {
  color: var(--ic-accent);
}

.ic-row-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1.5px solid var(--acc-text, var(--acc));
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--acc-text, var(--acc));
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ic-row-link::after {
  content: "\2192";
  transition: transform 0.25s ease;
}

.ic-row-link:hover {
  background: var(--acc-text, var(--acc));
  color: #fff;
  transform: translateY(-2px);
}

.ic-row-link:hover::after {
  transform: translateX(4px);
}

/* --- Cartes de prestations --- */
.ic-cartes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}

.ic-carte {
  padding: 30px 28px;
  border: 1px solid var(--ic-gris-l);
  border-radius: 12px;
  background: var(--ic-blanc);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ic-carte:hover {
  transform: translateY(-5px);
  border-color: var(--ic-accent);
  box-shadow: 0 18px 40px rgb(27 27 28 / 8%);
}

/* Pastille accent : les pictos historiques sont blancs, elle leur sert de fond */
.ic-carte-picto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--ic-accent);
  color: #fff;
}

.ic-carte-picto img,
.ic-carte-picto svg {
  width: 38px;
  height: 38px;
}

.ic-carte h3 {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.ic-carte p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ic-texte);
}

/* --- Équipe (page À propos) : portraits + bio dépliable sans JS --- */
.ic-equipe {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
}

.ic-equipe .ic-carte {
  text-align: center;
}

.ic-portrait-equipe {
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ic-creme);
}

.ic-equipe h3 {
  margin-bottom: 2px;
}

.ic-equipe .ic-equipe-poste {
  font-size: 0.85rem;
  color: var(--ic-texte-2);
}

.ic-equipe details {
  margin-top: 12px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ic-texte);
  text-align: left;
}

.ic-equipe summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  color: var(--ic-accent);
}

.ic-equipe summary::-webkit-details-marker { display: none; }

.ic-equipe summary::after { content: " +"; }
.ic-equipe details[open] summary::after { content: " −"; }

.ic-equipe details > div {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ic-gris-l);
}

/* --- Nos valeurs / points forts --- */
.ic-valeurs {
  padding: clamp(70px, 9vw, 100px) 0;
  background: var(--ic-creme);
}

.ic-valeurs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  list-style: none;
}

.ic-valeurs-list li {
  flex: 1 1 180px;
}

.ic-valeurs-list .ic-tick {
  display: flex;
  margin-bottom: 14px;
}

.ic-valeurs-list h3 {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
}

.ic-valeurs-list p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ic-texte);
}

/* --- Actualités --- */
.ic-actus {
  padding: clamp(70px, 9vw, 110px) 0;
  background: var(--ic-blanc);
}

.ic-actus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ic-actu {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ic-gris-l);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* height: auto est indispensable pour que aspect-ratio prime sur l'attribut
   height de l'image ; les attributs restent nécessaires pour réserver la
   place avant décodage (CLS à zéro). */
.ic-actu-vignette {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--ic-creme);
}

/* Repli quand l'article n'a pas d'image */
.ic-actu-sans-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: linear-gradient(135deg, var(--ic-accent), var(--ic-accent-fonce));
}

.ic-actu-sans-image img,
.ic-actu-sans-image svg {
  height: 44px;
  width: auto;
  opacity: 0.9;
}

.ic-actu-corps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  padding: 22px 24px 24px;
}

.ic-actu:hover {
  transform: translateY(-5px);
  border-color: var(--ic-accent);
  box-shadow: 0 18px 40px rgb(27 27 28 / 8%);
}

.ic-actu-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0;
}

.ic-actu-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ic-accent);
}

.ic-actu-meta time {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--ic-texte-2);
  font-variant-numeric: tabular-nums;
}

.ic-actu h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ic-noir);
}

.ic-actu-corps > p {
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ic-texte);
}

.ic-actu-lien {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ic-noir);
}

.ic-actu-lien::after {
  content: " \2192";
}

.ic-actus .ic-cta-row {
  margin-top: 34px;
}

/* Grille deux colonnes (cartes solutions de l'accueil) */
.ic-grille-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
}

/* État vide / erreur de chargement */
.ic-vide {
  padding: 40px 0;
  text-align: center;
  color: var(--ic-texte-2);
}

/* Un message seul dans une grille d'actus occupe toute la largeur */
.ic-actus-grid > .ic-vide {
  grid-column: 1 / -1;
}

/* Champ de recherche de la liste des news */
.ic-recherche {
  position: relative;
  max-width: 420px;
  margin-bottom: 40px;
}

.ic-recherche input {
  width: 100%;
  padding: 13px 46px 13px 16px;
  border: 1px solid #cfcecb;
  border-radius: 6px;
  font: inherit;
  color: var(--ic-noir);
  background: #fff;
}

.ic-recherche input:focus {
  border-color: var(--ic-accent-fonce);
  outline: 2px solid rgb(236 120 56 / 30%);
  outline-offset: 0;
}

.ic-recherche svg {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--ic-texte-2);
  pointer-events: none;
}

/* --- Article --- */
.ic-article {
  padding: clamp(56px, 8vw, 90px) 0 clamp(70px, 9vw, 110px);
}

.ic-article-head {
  max-width: 760px;
  margin: 0 auto 30px;
}

.ic-article-date {
  display: block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ic-accent);
}

.ic-article h1 {
  font-weight: 900;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  line-height: 1.15;
}

.ic-article-img {
  max-width: 960px;
  margin: 0 auto 40px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ic-creme);
}

.ic-article-img img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.ic-article-corps {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.75;
  color: var(--ic-texte);
  white-space: pre-line;
}

/* --- Figure : schéma ou frise présenté dans un cadre --- */
.ic-figure {
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--ic-gris-l);
  border-radius: 16px;
  background: var(--ic-blanc);
}

.ic-figure img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.ic-figure figcaption {
  margin-top: 16px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--ic-texte-2);
}

/* --- Encart mis en avant (accréditation COFRAC…) --- */
.ic-note {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  margin-bottom: clamp(44px, 6vw, 64px);
  padding: clamp(24px, 3vw, 36px);
  border-left: 4px solid var(--ic-accent);
  border-radius: 0 12px 12px 0;
  background: var(--ic-creme);
}

.ic-note-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-note-media img {
  width: 100%;
  height: auto;
}

.ic-note h2,
.ic-note h3 {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}

.ic-note p {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ic-texte);
}

.ic-note p:last-child,
.ic-note ul:last-child {
  margin-bottom: 0;
}

/* --- Tableau (réglementation) --- */
.ic-table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--ic-gris-l);
  border-radius: 10px;
}

.ic-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ic-table th {
  padding: 12px 14px;
  background: var(--ic-accent);
  color: #fff;
  font-weight: 700;
  text-align: left;
}

.ic-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--ic-gris-l);
  vertical-align: top;
  color: var(--ic-texte);
}

.ic-table tbody tr:nth-child(even) {
  background: var(--ic-creme);
}

.ic-table a {
  color: var(--ic-accent);
  word-break: break-all;
}

/* --- Partenaires --- */
.ic-partenaires {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 30px;
  align-items: center;
  list-style: none;
}

.ic-partenaires li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  padding: 8px;
}

.ic-partenaires img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.ic-partenaires li:hover img {
  filter: none;
  opacity: 1;
}

/* --- Pages légales --- */
.ic-legal {
  padding: clamp(60px, 8vw, 100px) 0 clamp(70px, 9vw, 110px);
}

.ic-legal-head {
  max-width: 760px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

/* Portrait d'auteur (page équipe) */
.ic-legal-head .ic-portrait {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--ic-creme);
}

.ic-legal h1 {
  margin-top: 10px;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.1;
}

.ic-legal-body {
  max-width: 760px;
  margin: 0 auto;
}

.ic-legal-body h2 {
  margin: 40px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--ic-gris-l);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.ic-legal-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ic-legal-body p,
.ic-legal-body li {
  line-height: 1.75;
  color: var(--ic-texte);
}

.ic-legal-body p {
  margin-bottom: 16px;
}

.ic-legal-body ul {
  margin-bottom: 20px;
  list-style: none;
}

.ic-legal-body li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 22px;
}

.ic-legal-body li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 12px;
  height: 5px;
  border-radius: 3px;
  background: var(--ic-accent);
}

.ic-legal-body a {
  color: var(--ic-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ic-maj {
  display: block;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--ic-texte-2);
}

/* ============================ 4. FORMULAIRES ============================ */

.ic-form-carte {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--ic-gris-l);
  border-radius: 16px;
  background: var(--ic-blanc);
  box-shadow: 0 24px 60px rgb(27 27 28 / 6%);
}

.ic-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ic-champ--plein {
  grid-column: 1 / -1;
}

.ic-champ label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.ic-champ input,
.ic-champ select,
.ic-champ textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #cfcecb;
  border-radius: 6px;
  font: inherit;
  color: var(--ic-noir);
  background: #fff;
}

.ic-champ textarea {
  resize: vertical;
}

.ic-champ input:focus,
.ic-champ select:focus,
.ic-champ textarea:focus {
  border-color: var(--ic-accent-fonce);
  outline: 2px solid rgb(236 120 56 / 30%);
  outline-offset: 0;
}

.ic-champ input::placeholder,
.ic-champ textarea::placeholder {
  color: var(--ic-texte-2);
}

/* Champ fichier : le vrai input est masqué, le label sert de déclencheur */
.ic-champ-fichier input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ic-champ-fichier .ic-fichier-ligne {
  display: flex;
}

.ic-champ-fichier .ic-fichier-nom {
  flex: 1;
  overflow: hidden;
  padding: 13px 16px;
  border: 1px solid #cfcecb;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  color: var(--ic-texte-2);
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #fff;
}

.ic-champ-fichier .ic-fichier-bouton {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: var(--ic-accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.ic-champ-fichier input[type="file"]:focus-visible ~ .ic-fichier-ligne .ic-fichier-bouton {
  outline: 2px solid var(--ic-accent-fonce);
  outline-offset: 2px;
}

.ic-form-aide {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ic-texte-2);
}

/* Captcha arithmétique (jCaptcha) */
.captchaCanvas {
  display: block;
  margin-bottom: 8px;
}

.ic-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

/* Lien discret (téléchargement de document…) */
.ic-lien-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ic-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bandeau newsletter (au-dessus du pied de page) */
.ic-nl {
  background: var(--ic-accent);
  color: #fff;
}

.ic-nl-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: 36px 0;
}

.ic-nl h2 {
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 1.15rem;
}

.ic-nl p {
  font-size: 0.9rem;
  color: rgb(255 255 255 / 92%);
}

.ic-nl-form {
  display: flex;
  flex: 1 1 380px;
  max-width: 520px;
  gap: 10px;
}

.ic-nl-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 0;
  border-radius: 6px;
  font: inherit;
}

.ic-nl-form input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ============================ 5. PIED DE PAGE =========================== */

.ic-footer {
  border-top: 1px solid #26262a;
  background: var(--ic-noir-2);
  color: #9a9aa0;
}

.ic-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: clamp(32px, 5vw, 70px);
  padding: clamp(50px, 7vw, 80px) 0 46px;
}

.ic-footer-logo {
  height: 34px;
  width: auto;
  margin-bottom: 20px;
}

.ic-footer-grid p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.ic-footer h2 {
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: #fff;
}

.ic-footer ul {
  list-style: none;
}

.ic-footer li {
  margin-bottom: 6px;
}

.ic-footer a {
  display: inline-block;
  padding: 4px 0; /* cible ≥ 24 px de haut */
  font-size: 0.9rem;
  color: #9a9aa0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ic-footer a:hover {
  color: #fff;
}

.ic-footer address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
}

.ic-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid #26262a;
  font-size: 0.8rem;
  color: #9a9aa0;
}

.ic-footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.ic-footer-bottom a {
  font-size: 0.8rem;
}

/* ============================== 6. RESPONSIVE =========================== */

@media (max-width: 960px) {
  .ic-pres-grid { grid-template-columns: 1fr; }
  .ic-actus-grid { grid-template-columns: 1fr; }
  .ic-grille-2 { grid-template-columns: 1fr; }
  .ic-cartes { grid-template-columns: repeat(2, 1fr); }
  .ic-equipe { grid-template-columns: repeat(2, 1fr); }
  .ic-partenaires { grid-template-columns: repeat(4, 1fr); }
  .ic-row { grid-template-columns: 1fr; gap: 30px; }
  .ic-row--inverse .ic-row-media,
  .ic-row--inverse .ic-row-visuel { order: 0; }
  .ic-note { grid-template-columns: 1fr; }
  .ic-note-media { max-width: 180px; }
  .ic-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .ic-hero-bars { opacity: 0.55; }
}

@media (max-width: 640px) {
  .ic-stats-list li {
    flex: 1 1 46%;
    padding: 24px 20px;
    border-top: 1px solid rgb(255 255 255 / 22%);
    border-left: none;
  }

  .ic-stats-list li:nth-child(-n + 2) {
    border-top: none;
  }

  .ic-cartes { grid-template-columns: 1fr; }
  .ic-equipe { grid-template-columns: 1fr; }
  .ic-partenaires { grid-template-columns: repeat(3, 1fr); }
  .ic-form { grid-template-columns: 1fr; }
  .ic-footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .ic-hero-bars i { animation: none; }

  .ic-btn,
  .ic-row-link,
  .idhm-panel,
  .idhm-burger span {
    transition: none;
  }
}
