/* ORBE Atelier — adaptations écrans (le design d'origine est dessiné en 1440 px) */
html { -webkit-text-size-adjust: 100%; }
body { background: #F8F5F2; }

/* Accueil : centré sur les grands écrans */
#dc [data-mix-root] { margin: 0 auto; }

/* Pages vidéo et légales : plus de largeur minimale imposée sous 1200 px */
@media (max-width: 1199px) {
  #dc [data-film-root] { min-width: 0 !important; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  html, body { overflow-x: clip; }
  #dc { overflow-x: clip; }
  #dc img, #dc video { max-width: 100%; }

  /* Racines */
  #dc [data-mix-root] { width: auto !important; height: auto !important; min-height: 0 !important; }
  #dc [data-film-root] { min-height: 0 !important; }

  /* Marges des sections */
  #dc section[style*="padding"], #dc footer[style*="padding"], #dc main[style*="padding"] { padding-left: 20px !important; padding-right: 20px !important; }
  #dc section[style*="padding: 128px"], #dc section[style*="padding: 120px"], #dc section[style*="padding: 0 96px 120px"] { padding-top: 72px !important; padding-bottom: 72px !important; }
  #dc section[style*="padding: 0 96px 128px"] { padding-bottom: 72px !important; }
  #dc section[style*="padding: 48px 96px 120px"] { padding-top: 24px !important; padding-bottom: 56px !important; }
  #dc header[style*="padding: 0 96px"] { padding: 0 20px !important; height: 72px !important; }

  /* Grilles : une seule colonne */
  #dc [style*="grid-template-columns: repeat(12"],
  #dc [style*="grid-template-columns: minmax(0, 1fr) 560px"],
  #dc [style*="grid-template-columns: repeat(2, minmax(0, 1fr))"],
  #dc [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"],
  #dc [style*="grid-template-columns: repeat(5, minmax(0, 1fr))"],
  #dc [style*="grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr)"],
  #dc [style*="grid-template-columns: minmax(0, 1.4fr)"] {
    grid-template-columns: minmax(0, 1fr) !important; row-gap: 36px !important; column-gap: 0 !important;
  }
  #dc [style*="grid-column"] { grid-column: auto !important; }
  #dc .doc dl { grid-template-columns: minmax(0, 1fr) !important; gap: 2px 0 !important; }
  #dc .doc dd { margin-bottom: 12px !important; }

  /* Titres */
  #dc h1[style*="font-size"] { font-size: 44px !important; line-height: 1.02 !important; }
  #dc h2[style*="font-size: 8"], #dc h2[style*="font-size: 7"], #dc h2[style*="font-size: 6"] { font-size: 40px !important; line-height: 1.04 !important; }
  #dc h2[style*="font-size: 5"], #dc h2[style*="font-size: 4"] { font-size: 34px !important; line-height: 1.06 !important; }
  #dc .doc h1 { font-size: 44px !important; }
  #dc .doc h2 { font-size: 28px !important; }
  #dc p[style*="font-size: 20px"], #dc p[style*="font-size: 18px"] { font-size: 17px !important; }
  #dc summary[style*="font-size: 26px"] { font-size: 21px !important; }
  #dc details p[style*="padding: 0 64px"] { padding-right: 0 !important; }

  /* ===== Accueil ===== */
  #dc [data-mix-root] header nav > a:not(.hard) { display: none !important; }
  #dc [data-mix-root] header nav a.hard { height: 42px !important; padding: 0 16px !important; font-size: 14px !important; }
  #dc [data-mix-root] header svg { width: 28px; height: 28px; }
  #dc [data-mix-root] section > div[style*="justify-content: space-between"][style*="font-size: 12px"] { flex-direction: column; gap: 8px; }
  #dc [data-mix-root] [style*="margin-top: 64px"] { margin-top: 32px !important; }
  #dc [data-mix-root] [style*="gap: 64px"] { gap: 40px !important; }
  #dc [data-mix-root] div[style*="gap: 28px"][style*="margin-top: 40px"] { flex-wrap: wrap; gap: 18px !important; }

  /* Panneau du logo + brouillon de Victor */
  #dc [data-eye-panel] { height: auto !important; padding: 28px 18px 18px !important; }
  #dc [data-eye-panel] > div[style*="position: absolute"] { position: relative !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; overflow: visible !important; }
  #dc [data-eye-panel] [data-logo] { position: relative !important; left: auto !important; top: auto !important; transform: none !important; width: 100% !important; margin: 4px auto 28px; z-index: 1; }
  #dc [data-eye-panel] article.sway { position: relative !important; left: auto !important; bottom: auto !important; width: 100% !important; animation: none !important; transform: none !important; }
  #dc [data-eye-panel] article .stamp { right: -6px !important; top: -26px !important; width: 76px !important; height: 76px !important; font-size: 19px !important; }

  /* Bandeau défilant */
  #dc .edge-fade { height: 64px !important; }
  #dc .marquee { font-size: 22px !important; }

  /* Métiers : cartes empilées */
  #dc .cols { flex-direction: column; height: auto !important; margin-top: 36px !important; }
  #dc .cols .col { flex: none !important; min-height: 300px; border-left: 0 !important; border-top: 1px solid #DDD7C9; padding: 24px 0 24px !important; }
  #dc .cols .col:first-child { border-top: 0; }
  #dc .col .agent { left: auto !important; right: -18px !important; bottom: 0; transform: none !important; width: 160px !important; height: 240px !important; }
  #dc .col .agent img { width: 160px !important; height: 240px !important; }
  #dc .col .more { position: relative !important; right: auto !important; bottom: auto !important; width: auto !important; max-width: calc(100% - 150px); margin-top: 22px; opacity: 1 !important; transform: none !important; }
  #dc .col .more h3 { font-size: 26px !important; }
  #dc .col div[style*="font-size: 60px"] { font-size: 44px !important; }

  /* Principe / méthode / contact / pied de page */
  #dc [data-mix-root] [style*="height: 540px"] { height: auto !important; min-height: 460px; padding: 24px !important; }
  #dc [data-mix-root] ol[style*="repeat(3"] { padding: 0 !important; row-gap: 28px !important; }
  #dc [data-mix-root] ol[style*="repeat(3"] > li { transform: none !important; }
  #dc [data-mix-root] [style*="padding: 80px"] { padding: 32px 20px !important; }
  #dc [data-mix-root] .orbit, #dc [data-mix-root] [style*="width: 640px; height: 640px"] { display: none !important; }
  #dc form[style*="padding: 40px"] { padding: 24px !important; }
  #dc [data-mix-root] footer { padding-top: 56px !important; }
  #dc [style*="font-size: 190px"] { font-size: 72px !important; white-space: nowrap !important; }
  #dc [style*="font-size: 190px"] [style*="font-size: 80px"] { font-size: 32px !important; }
  #dc footer [style*="margin-top: 80px"] { margin-top: 40px !important; }
  #dc footer svg[width="120"] { width: 64px; height: 64px; }
  #dc footer[style*="justify-content: space-between"] { flex-direction: column; gap: 14px; }
  #dc footer span[style*="display: flex; gap: 22px"] { flex-wrap: wrap; gap: 14px 18px !important; }

  /* ===== Pages vidéo (Victor, Tom, Romane) ===== */
  #dc [data-film-root] header.lg { margin: 10px 10px 0 !important; height: 56px !important; padding: 0 8px 0 14px !important; }
  #dc [data-film-root] header .steps { display: none !important; }
  #dc [data-film-root] header a[href="/"]:not([aria-label]) { display: none !important; }
  #dc [data-film-root] header a.hard { height: 40px !important; padding: 0 14px !important; font-size: 13px !important; box-shadow: 3px 3px 0 #FF7A29 !important; }
  #dc .media { height: auto !important; }
  #dc .frame { top: 84px !important; transform: translateX(-50%) !important; width: calc(100% - 20px) !important; border-radius: 18px !important; }
  #dc [data-film-root]:not([data-imm]) .frame { position: relative !important; left: 50% !important; top: 0 !important; margin: 84px 0 0; }
  #dc [data-film-root]:not([data-imm]) .media { padding-bottom: 20px; }
  #dc [data-chap] { width: auto !important; padding: 22px !important; border-radius: 22px !important; }
  #dc [data-imm] [data-chap] { left: 10px !important; right: 10px !important; top: auto !important; bottom: 12px !important; transform: none !important; }
  #dc [data-film-root]:not([data-imm]) [data-chap="hero"] { position: relative !important; left: auto !important; top: auto !important; transform: none !important; margin: 12px 10px 0; }
  #dc [data-chap="hero"] h1 { font-size: 36px !important; margin-top: 12px !important; }
  #dc [data-chap="hero"] p { font-size: 15px !important; margin-top: 12px !important; }
  #dc [data-chap="hero"] > div[style*="margin-top: 30px"] { margin-top: 18px !important; flex-wrap: wrap; gap: 12px !important; }
  #dc [data-chap="hero"] a.hard { height: 46px !important; padding: 0 20px !important; font-size: 14px !important; }
  #dc .chap h2 { font-size: 28px !important; }
  #dc .chap p { font-size: 14px !important; }
  #dc [data-loader] { right: 14px !important; bottom: auto !important; top: 94px !important; padding: 8px 12px !important; font-size: 11px !important; }
  #dc [data-hint] { display: none !important; }
  #dc .chaps:not([style]) { }
  #dc [data-film-root]:not([data-imm]) .chaps { display: flex !important; flex-direction: column; gap: 12px; padding: 20px 10px !important; }
  #dc section.bg-fin[style*="padding: 96px"] { padding: 64px 20px !important; min-height: 0 !important; }
  #dc section.bg-fin h2 { font-size: 46px !important; }
  #dc section.bg-fin form { padding: 22px !important; }
  #dc article[style*="box-shadow: 10px 10px 0"] { box-shadow: 6px 6px 0 #0F1750 !important; }
  #dc [style*="box-shadow: 10px 10px 0 #FF7A29"] { box-shadow: 6px 6px 0 #FF7A29 !important; }
  #dc .stamp[style*="right: -24px"] { right: -6px !important; top: -26px !important; width: 72px !important; height: 72px !important; font-size: 18px !important; }
  #dc span[style*="right: -24px; top: -30px"] { right: -6px !important; top: -26px !important; width: 72px !important; height: 72px !important; font-size: 18px !important; }
  #dc [style*="display: flex; gap: 6px"] > button { padding: 0 10px !important; font-size: 12px !important; }
  #dc div[style*="justify-content: space-between; gap: 12px"][style*="Le ton"], #dc div[style*="gap: 12px; padding: 12px 16px"] { flex-wrap: wrap; }
  #dc [style*="padding: 48px; border-radius: 28px"] { padding: 24px !important; }
  #dc [role="row"] { grid-template-columns: 1fr 1fr 1fr !important; gap: 8px !important; font-size: 13px !important; }
  #dc ol[style*="repeat(3"] > li { transform: none !important; min-height: 220px !important; }
  #dc [style*="width: 320px; height: 600px"] { width: 280px !important; height: 540px !important; }
  #dc footer[style*="padding: 28px 96px"] { padding: 24px 20px 30px !important; flex-direction: column; gap: 14px; }

  /* Pages légales */
  #dc header[style*="padding: 0 96px"][style*="height: 88px"] { height: 68px !important; }
  #dc main.doc { padding: 48px 20px 80px !important; }
}
@media (max-width: 760px) {
  #dc [data-mix-root] span[style*="font-size: 220px"] { font-size: 76px !important; }
  #dc [data-mix-root] span[style*="font-size: 120px"] { font-size: 40px !important; }
  #dc [data-mix-root] footer div[style*="align-items: flex-end"] { flex-wrap: nowrap; }
}
@media (max-width: 760px) {
  #dc [data-mix-root] footer div[style*="align-items: baseline; gap: 28px"] { gap: 10px !important; white-space: nowrap; }
  #dc [data-mix-root] footer svg[width="160"] { width: 56px; height: 56px; margin-bottom: 6px !important; }
  #dc [data-mix-root] footer div[style*="padding: 24px 0 32px"] { flex-direction: column; gap: 6px; }
}
@media (max-width: 760px) {
  #dc [data-imm] .frame { aspect-ratio: auto !important; top: 76px !important; height: calc(var(--vh) * 0.5) !important; }
  #dc [data-imm] [data-loader] { top: 86px !important; }
}
@media (max-width: 760px) {
  #dc ol[style*="repeat(3"] > li { min-height: 250px !important; }
  #dc ol[style*="repeat(3"] > li > span.serif[style*="font-size: 108px"] { font-size: 76px !important; }
  #dc span.serif[style*="font-size: 26px"], #dc span.serif[style*="font-size: 30px"] { white-space: nowrap; font-size: 22px !important; }
  #dc div[style*="justify-content: space-between; align-items: center; gap: 16px"] > span:first-child { min-width: 0; }
}
@media (max-width: 760px) {
  #dc [data-imm] .avance { left: 20px !important; bottom: auto !important; top: calc(76px + var(--vh) * 0.5 - 50px) !important; padding: 7px 12px !important; gap: 10px !important; }
  #dc [data-imm] .avance > span[style*="width: 140px"] { width: 80px !important; }
}
/* Formulaires : message d'erreur visible */
.form-msg { margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: #FDECEA; color: #8C1D18; font-size: 13.5px; line-height: 1.5; font-weight: 500; }
#dc .is-invalid { border-color: #C62828 !important; box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.18) !important; }
#dc input[type="checkbox"].is-invalid { outline: 2px solid #C62828; outline-offset: 2px; }
#dc fieldset[hidden] { display: none !important; }
#dc fieldset legend { float: none; width: 100%; }
@media (max-width: 760px) {
  #dc form input:not([type=checkbox]), #dc form select, #dc form textarea { font-size: 16px !important; }
}
