/* UDI Stock — Espace équipe. Couleurs du design system (vert de l'interface, rouge du logo), Montserrat pour les titres. */
@font-face { font-family: "Montserrat"; src: url("polices/Montserrat-Medium.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("polices/Montserrat-Bold.ttf"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("polices/Montserrat-ExtraBold.ttf"); font-weight: 800; font-display: swap; }

:root {
  --vert: #3E6204; --vert-fonce: #304C03; --vert-pale: #F2F7E8; --rouge: #DF3636;
  --encre: #141B18; --gris: #525D58; --trait: #E5E9E7; --fond: #F6F7F6; --blanc: #FFFFFF;
  --titres: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --texte: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --rayon: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--texte); color: var(--encre); background: var(--blanc); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.contenu { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Barre du haut */
.barre { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait); }
.barre-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.marque img { height: 26px; width: auto; }
nav { display: flex; gap: 6px; }
nav a { text-decoration: none; font-family: var(--titres); font-weight: 700; font-size: 14px; color: var(--gris); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
nav a:hover, nav a:focus-visible { background: var(--vert-pale); color: var(--vert); }

/* En-tête */
.hero { background: linear-gradient(180deg, var(--fond), var(--blanc)); padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); }
.sur-titre { font-family: var(--titres); font-weight: 700; color: var(--vert); letter-spacing: .04em; text-transform: uppercase; font-size: 13px; margin: 0 0 12px; }
h1 { font-family: var(--titres); font-weight: 800; font-size: clamp(32px, 6vw, 60px); line-height: 1.05; margin: 0 0 18px; max-width: 16ch; }
.intro { font-size: clamp(16px, 2.2vw, 19px); color: var(--gris); max-width: 62ch; margin: 0 0 28px; }
.actions-hero { display: flex; flex-wrap: wrap; gap: 12px; }
.version { color: var(--gris); font-size: 14px; margin: 18px 0 0; min-height: 1em; }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font-family: var(--titres); font-weight: 700; font-size: 15px; text-decoration: none; border: 2px solid transparent; transition: background .15s, border-color .15s; }
.bouton.principal { background: var(--vert); color: var(--blanc); }
.bouton.principal:hover, .bouton.principal:focus-visible { background: var(--vert-fonce); }
.bouton.secondaire { border-color: var(--vert); color: var(--vert); background: var(--blanc); }
.bouton.secondaire:hover { background: var(--vert-pale); }
.bouton.desactive { background: var(--fond); color: var(--gris); border-color: var(--trait); cursor: not-allowed; }
:focus-visible { outline: 3px solid #1D4ED8; outline-offset: 2px; }

/* Sections */
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section.claire { background: var(--fond); }
h2 { font-family: var(--titres); font-weight: 800; font-size: clamp(26px, 4vw, 40px); margin: 0 0 8px; }
h3 { font-family: var(--titres); font-weight: 700; font-size: 18px; margin: 32px 0 14px; }
.chapeau { color: var(--gris); max-width: 70ch; margin: 0 0 28px; }
.grille { display: grid; gap: 16px; }
.cartes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Cartes de téléchargement */
.carte { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; }
.carte.vedette { border: 2px solid var(--vert); box-shadow: 0 12px 32px rgba(20, 27, 24, .10); }
.carte.absente .icone { opacity: .45; }
.carte h3 { margin: 6px 0 0; font-size: 20px; }
.carte p { margin: 0; color: var(--gris); font-size: 15px; flex: 1; }
.icone { width: 52px; height: 52px; border-radius: 14px; background: var(--vert-pale); display: grid; place-items: center; }
.icone svg { width: 28px; height: 28px; fill: none; stroke: var(--vert); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pastille { position: absolute; top: 16px; right: 16px; font-family: var(--titres); font-weight: 700; font-size: 12px; color: var(--vert); background: var(--vert-pale); padding: 4px 10px; border-radius: 999px; }
.carte-action { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.carte-action .bouton { width: 100%; }
.meta { font-size: 13px; color: var(--gris); }

/* Aide à l'installation */
.aide { margin-top: 14px; background: var(--fond); border-radius: 12px; padding: 4px 18px; }
.aide summary { cursor: pointer; font-family: var(--titres); font-weight: 700; padding: 12px 0; }
.aide ol { margin: 0 0 14px; padding-left: 22px; color: var(--gris); }
.aide li { margin-bottom: 6px; }

/* Documentation */
.guide { display: flex; align-items: center; gap: 12px; background: var(--encre); color: var(--blanc); border-radius: var(--rayon); padding: 14px 14px 14px 24px; }
.guide-lien { flex: 1; display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; padding: 8px 0; min-width: 0; }
.guide-telecharger { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .12); color: var(--blanc); cursor: pointer; display: grid; place-items: center; }
.guide-telecharger:hover { background: rgba(255, 255, 255, .22); }
.guide-telecharger svg, .role-telecharger svg, .fenetre-icone svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.guide-icone { flex: 0 0 52px; height: 64px; border-radius: 8px; background: var(--blanc) url("logo/udistock-monogramme.svg") center / 70% no-repeat; }
.guide-texte { flex: 1; display: flex; flex-direction: column; }
.guide-texte b { font-family: var(--titres); font-size: clamp(18px, 2.6vw, 22px); }
.guide-texte span { color: #C9D1CD; font-size: 15px; }
.roles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.role { display: flex; gap: 8px; align-items: center; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; padding: 8px 8px 8px 16px; transition: border-color .15s, box-shadow .15s; }
.role:hover, .role:focus-within { border-color: var(--vert); box-shadow: 0 6px 18px rgba(20, 27, 24, .08); }
.role-lien { flex: 1; display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; padding: 8px 0; min-width: 0; }
.role-telecharger { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: var(--blanc); color: var(--vert); cursor: pointer; display: grid; place-items: center; }
.role-telecharger:hover { background: var(--vert-pale); border-color: var(--vert); }
.role.absente { opacity: .55; pointer-events: none; }
.initiale { flex: 0 0 44px; height: 44px; border-radius: 50%; color: var(--blanc); font-family: var(--titres); font-weight: 800; font-size: 18px; display: grid; place-items: center; }
.role-texte { display: flex; flex-direction: column; min-width: 0; }
.role-texte b { font-family: var(--titres); font-size: 16px; }
.role-texte span { font-size: 14px; color: var(--gris); }
.role-texte .meta { font-size: 12px; margin-top: 2px; }

/* Fenêtre de téléchargement */
.fenetre { border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(20, 27, 24, .28); }
.fenetre::backdrop { background: rgba(20, 27, 24, .45); }
.fenetre-corps { padding: 28px; text-align: center; }
.fenetre-icone { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--vert-pale); color: var(--vert); display: grid; place-items: center; }
.fenetre-titre { margin: 0 0 8px; font-size: 21px; }
.fenetre-corps p { margin: 0 0 8px; color: var(--gris); font-size: 15px; }
.fenetre-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* Pied */
.pied { border-top: 1px solid var(--trait); padding: 32px 0 40px; }
.pied-in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.pied img { width: 180px; }
.pied p { margin: 0; color: var(--gris); font-size: 14px; max-width: 60ch; }

/* Petits écrans */
@media (max-width: 560px) {
  .contenu { width: calc(100% - 28px); }
  nav a { padding: 8px 8px; font-size: 13px; }
  .marque img { height: 22px; }
  .actions-hero .bouton { flex: 1 1 100%; }
  .guide { padding: 18px; gap: 14px; }
  .guide { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
