/* Calculateurs d'enseigne drapeau : complète les styles .calc / .opt de diferance.css */
.cd-stage { position: relative; background: var(--off-white); border: 1px solid var(--silver); border-radius: var(--radius); overflow: hidden; aspect-ratio: 640 / 420; }
.cd-stage svg { display: block; width: 100%; height: 100%; }
.cd-stage.is-nuit { border-color: var(--charcoal); }
.cd-tag { position: absolute; left: 10px; top: 10px; font-family: var(--font-mono); font-weight: var(--mono-weight); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; background: var(--charcoal); color: var(--white); padding: 4px 8px; border-radius: var(--radius); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 12px; }
.cd-file { color: var(--gray-light); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.cd-nuit { display: flex; align-items: center; gap: 8px; color: var(--gray); font-size: 14px; margin-left: auto; cursor: pointer; }
.opt.cd-mod { padding: 8px 8px 12px; gap: 6px; text-align: left; align-content: start; justify-items: start; }
.opt.cd-mod svg { width: 100%; height: auto; aspect-ratio: 640 / 420; border-radius: var(--radius); background: var(--white); }
.opt.cd-mod small { font-size: 12px; }
.opts--wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.opts--wrap .opt { flex: 0 1 auto; }
.opts--wrap .opt small { display: block; margin-top: 2px; }
.cd-fixe { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.cd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cd-input { width: 100%; min-width: 0; font-size: 16px; padding: 12px 14px; border: 1px solid var(--silver); border-bottom: 2px solid var(--charcoal); border-radius: var(--radius); background: var(--white); }
.cd-color { width: 100%; height: 48px; padding: 4px; border: 1px solid var(--silver); border-radius: var(--radius); background: var(--white); cursor: pointer; }
.cd-row label[hidden] { display: none; }
.cd-hint { font-size: 13px; color: var(--gray-light); margin: 10px 0 0; }
.cd-ttc { color: var(--gray-light); font-size: 14px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.cd-pose-total { margin-top: 18px; font-size: 14px; }
.cd-pose-total[hidden] { display: none; }
.cd-pose-total div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #B0B0B0; }
.cd-pose-total b { color: var(--white); font-weight: 600; text-align: right; }
.cd-pose-total .cd-tot { border-top: 1px solid var(--charcoal-line); margin-top: 6px; padding-top: 10px; }
.cd-pose-total .cd-tot b { font-family: var(--font-display); font-weight: 900; font-size: 20px; }
.cd-autre { display: block; margin-top: 18px; color: #B0B0B0; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.cd-autre:hover { color: var(--white); }

/* Section « Les modèles » */
.cd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cd-card { border: 1px solid var(--silver); border-radius: var(--radius); padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 10px; background: var(--white); }
.cd-card__vis svg { display: block; width: 100%; height: auto; aspect-ratio: 640 / 420; background: var(--off-white); border-radius: var(--radius); }
.cd-card__des { font-family: var(--font-mono); font-weight: var(--mono-weight); text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; color: var(--red); margin-top: 6px; }
.cd-card h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 18px; margin: 0; }
.cd-card p { font-size: 15px; color: var(--gray); margin: 0; line-height: 1.55; }
.cd-card ul { margin: 4px 0 8px; padding-left: 18px; font-size: 14.5px; color: var(--charcoal); }
.cd-card li { margin-bottom: 4px; }
.cd-card .btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 1000px) { .cd-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
@media (max-width: 760px) { #cd-mod.opts--3, #cd-pose.opts--3 { grid-template-columns: minmax(0, 1fr); } .opt.cd-mod { grid-template-columns: 120px minmax(0, 1fr); display: grid; align-items: center; } .opt.cd-mod svg { grid-row: span 2; } }
@media (max-width: 420px) { .cd-row { grid-template-columns: 1fr; } .cd-nuit { margin-left: 0; } }
#cd-opts .calc__field:last-child { margin-bottom: 30px; }

/* Bouton « i » : visuel photo du choix */
.cd-w { position: relative; display: block; min-width: 0; }
.opts--wrap > .cd-w { display: inline-block; flex: 0 1 auto; }
.cd-w > .opt { width: 100%; height: 100%; }
.cd-w.has-i > .opt { padding-right: 34px; }
.cd-i { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 1px solid var(--charcoal); border-radius: var(--radius); background: var(--white); color: var(--charcoal); font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; font-size: 13px; line-height: 1; cursor: zoom-in; transition: background .2s, color .2s; z-index: 1; }
.cd-i:hover, .cd-i:focus-visible { background: var(--charcoal); color: var(--white); outline: none; }
.cd-mod + .cd-i { top: 14px; right: 14px; width: 26px; height: 26px; font-size: 15px; }

/* Visionneuse */
.cd-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 15, 15, .82); display: grid; place-items: center; padding: 16px; }
.cd-lb[hidden] { display: none; }
.cd-lb__box { position: relative; background: var(--white); max-width: min(920px, 100%); width: 100%; border-radius: var(--radius); overflow: hidden; }
.cd-lb__box img { display: block; width: 100%; height: auto; max-height: 74vh; object-fit: cover; background: var(--off-white); }
.cd-lb__cap { padding: 14px 18px 16px; display: grid; gap: 4px; }
.cd-lb__cap b { font-family: var(--font-mono); font-weight: var(--mono-weight); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.cd-lb__cap small { color: var(--gray); font-size: 13px; }
.cd-lb__x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: var(--charcoal); color: var(--white); font-size: 24px; line-height: 1; cursor: pointer; }
body.cd-lb-open { overflow: hidden; }

/* Cartes modèles : photo */
.cd-card__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--off-white); }
@media (max-width: 760px) { .cd-w > .opt.cd-mod { padding-right: 40px; } }

/* Section « Nos réalisations » (fond anthracite) */
.cd-reals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cd-real { margin: 0; }
.cd-real img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--charcoal-soft); }
.cd-real figcaption { margin-top: 14px; display: grid; gap: 3px; }
.cd-real b { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 17px; color: var(--white); }
.cd-real span { font-family: var(--font-mono); font-weight: var(--mono-weight); text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; color: var(--gray-light); }
.cd-real small { font-size: 14px; color: #B0B0B0; }
@media (max-width: 1000px) { .cd-reals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .cd-reals { gap: 16px; } .cd-real b { font-size: 15px; } }
