/* Ty Cloud — feuille de style de la plateforme.
   Couleurs provisoires, à remplacer par la charte graphique (lot 1) : variables ci-dessous.
   Contrastes vérifiés pour le niveau AA des WCAG 2.1 (QUA-07). */
:root {
  /* Charte graphique de tycloud.bzh : bleu pétrole #23404A, vert #74B842, polices Made Tommy et Lie to Me.
     Le vert de marque (contraste 2,4:1 sur blanc) sert aux accents et aux titres sur fond sombre ;
     un vert foncé de même teinte porte le texte et les boutons (niveau AA des WCAG 2.1, QUA-07). */
  --navy: #23404a;
  --navy-700: #1a3139;
  --teal: #467d22;
  --teal-bright: #74b842;
  --teal-50: #eef6e8;
  --ink: #23404a;
  --muted: #5c6b70;
  --line: #dde3e5;
  --surface: #ffffff;
  --bg: #f5f7f6;
  --ok: #3d6f1d;
  --ok-bg: #eaf5e2;
  --warn: #8a5a00;
  --warn-bg: #fdf1dc;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --info: #23404a;
  --info-bg: #e6eef0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 64, 74, .06), 0 2px 6px rgba(35, 64, 74, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand-font: "Made Tommy", system-ui, sans-serif;
  --script-font: "Lie to Me", cursive;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
@font-face { font-family: "Made Tommy"; font-weight: 400; font-display: swap; src: url("../brand/fonts/made_tommy_regular_personal_use-webfont.893053f45c8f.woff2") format("woff2"); }
@font-face { font-family: "Made Tommy"; font-weight: 700; font-display: swap; src: url("../brand/fonts/made_tommy_bold_personal_use-webfont.c31d15a23e2c.woff2") format("woff2"); }
@font-face { font-family: "Made Tommy"; font-weight: 200; font-display: swap; src: url("../brand/fonts/made_tommy_thin_personal_use-webfont.ff5ebc6730ef.woff2") format("woff2"); }
@font-face { font-family: "Lie to Me"; font-weight: 400; font-display: swap; src: url("../brand/fonts/lie_to_me_-_otf-webfont.08eec4c0f147.woff2") format("woff2"); }
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid #f4b400; outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; color: var(--navy); font-family: var(--brand-font); font-weight: 700; }
h1 { font-size: 1.9rem; margin: 0 0 .75rem; }
h2 { font-size: 1.35rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .5rem; }
p { margin: .5rem 0; }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
pre { background: #0f1720; color: #e6edf3; padding: 1rem; border-radius: 8px; overflow-x: auto; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.page { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 60vh; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline { display: inline; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Bandeaux */
.env-banner { background: #fff3cd; color: #6b4e00; text-align: center; font-size: .85rem; padding: .25rem; }
.impersonation-banner { background: var(--bad); color: #fff; text-align: center; padding: .5rem; }
.impersonation-banner a { color: #fff; font-weight: 600; }

/* En-tête */
.site-header { background: #fff; color: var(--navy); border-bottom: 1px solid var(--line); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand-sub { font-family: var(--brand-font); color: var(--muted); font-size: .95rem; border-left: 1px solid var(--line); padding-left: .6rem; }
.main-nav { display: flex; align-items: center; gap: 1.1rem; }
.main-nav a, .main-nav .link-button { color: var(--navy); text-decoration: none; font-family: var(--brand-font); font-size: 1.02rem; }
.main-nav a:hover, .main-nav .link-button:hover { color: var(--teal); }
.main-nav .btn { color: #fff; background: var(--teal); }
.main-nav .btn:hover { color: #fff; background: #3a6a1b; }
.cart-link .count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--teal-bright); color: var(--navy); font-weight: 700; font-size: .8rem; text-align: center; }
.nav-toggle { display: none; background: transparent; color: var(--navy); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .7rem; font-family: var(--brand-font); }
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem; z-index: 50; }
  .main-nav.open { display: flex; }
}

/* Pied de page */
.site-footer { background: var(--navy); padding: 2.5rem 0; font-size: .9rem; color: #d4dfe2; }
.site-footer strong { color: #fff; font-family: var(--brand-font); }
.site-footer a { color: #b7df98; }
.site-footer a:hover { color: #fff; }
.footer-logo { height: 28px; margin-bottom: .6rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.site-footer nav { display: flex; flex-direction: column; gap: .25rem; }

/* Boutons */
.btn { font-family: var(--brand-font) !important; letter-spacing: .01em; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid transparent; background: var(--navy); color: #fff; font-size: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--navy-700); color: #fff; }
.btn-accent { background: var(--teal); }
.btn-accent:hover { background: #17635b; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg); color: var(--navy); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #8f1d17; }
.btn-small { padding: .35rem .75rem; font-size: .9rem; }
.btn-large { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.card-header h2, .card-header h3 { margin: 0; }
.card-muted { background: #f9fafb; }
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat .value { font-family: var(--brand-font); font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.stat .label { color: var(--muted); font-size: .9rem; }

/* Formulaires */
form .field { margin-bottom: 1rem; }
fieldset.field { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; }
label, legend { display: block; font-weight: 600; margin-bottom: .3rem; }
.req { color: var(--bad); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #b8c2cc; border-radius: 7px; background: #fff; font: inherit; color: var(--ink);
}
textarea { min-height: 6rem; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,.25); outline: none; }
.field-checkbox { display: flex; align-items: flex-start; gap: .5rem; }
.field-checkbox label { font-weight: 500; margin: 0; }
.field-checkbox input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.field ul { list-style: none; padding: 0; margin: 0; }
.field ul li label { font-weight: 500; display: flex; gap: .5rem; align-items: center; }
.help { color: var(--muted); font-size: .875rem; margin-top: .25rem; }
.help ul { padding-left: 1.2rem; list-style: disc; }
.errors, .has-error .errors { color: var(--bad); font-size: .9rem; margin-top: .25rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.form-narrow { max-width: 480px; }
.form-medium { max-width: 720px; }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card label { display: block; border: 2px solid var(--line); border-radius: 10px; padding: .75rem 1rem; cursor: pointer; font-weight: 500; background: #fff; }
.radio-card input:checked + label { border-color: var(--teal); background: var(--teal-50); }
.radio-card input:focus-visible + label { outline: 3px solid #f4b400; outline-offset: 2px; }
.radio-card .price { display: block; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.altcha { font-size: .85rem; color: var(--muted); margin: .5rem 0 1rem; }
.altcha.ok { color: var(--ok); }

/* Alertes et badges */
.alert { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c5d7f2; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cb; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #f0d9a8; }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #f2c2bd; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-wait { background: #eef0ff; color: #3b3f9c; }
.badge-muted { background: #eceff3; color: var(--muted); }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: #fff; }
table.table th, table.table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f8fafc; }
table.table td.num, table.table th.num { text-align: right; white-space: nowrap; }
table.table tr:last-child td { border-bottom: none; }
table.table tfoot td { font-weight: 700; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; font-weight: 500; }

/* Catalogue */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 20% 0%, #2f5a67 0%, #23404a 55%, #1a3139 100%); color: #fff; padding: 3.5rem 0 3rem; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 2.4rem; max-width: 760px; }
.hero h1 em { color: var(--teal-bright); font-style: normal; }
.hero p { max-width: 640px; font-size: 1.1rem; color: #e1ebee; }
.hero .script { font-size: 2.4rem; color: var(--teal-bright); margin: .25rem 0 1rem; }
.hero-shape { position: absolute; width: 70px; opacity: .95; pointer-events: none; }
.hero-shape.s1 { right: 8%; top: 18%; transform: rotate(-12deg); }
.hero-shape.s2 { right: 22%; bottom: 10%; width: 46px; transform: rotate(24deg); }
.hero-shape.s3 { left: -18px; bottom: -12px; width: 90px; opacity: .5; }
@media (max-width: 820px) { .hero-shape { display: none; } .hero h1 { font-size: 1.8rem; } }
.script { font-family: var(--script-font); font-weight: 400; color: var(--teal); font-size: 1.9rem; line-height: 1.1; }
.offer { display: flex; flex-direction: column; border-top: 4px solid var(--teal-bright); }
.offer h3 { margin-top: 0; font-size: 1.25rem; }
.offer .price { font-family: var(--brand-font); font-size: 2rem; font-weight: 700; color: var(--navy); }
.offer .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.offer ul.features { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.offer ul.features li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.offer ul.features li::before { content: ""; position: absolute; left: 0; top: .6rem; width: .7rem; height: .6rem; background: url("../brand/forme.fb28076fbb46.svg") center / contain no-repeat; }
.tax-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.tax-toggle a { padding: .35rem .9rem; text-decoration: none; color: var(--navy); font-size: .9rem; font-family: var(--brand-font); }
.tax-toggle a.active { background: var(--teal-bright); color: var(--navy); font-weight: 700; }

/* Récapitulatif */
.summary { position: sticky; top: 1rem; }
.summary .total { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.summary-lines { list-style: none; margin: 0; padding: 0; }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.layout-checkout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .layout-checkout { grid-template-columns: 1fr; } .summary { position: static; } }

/* Espace client */
.portal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.portal-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; align-self: start; position: sticky; top: 1rem; }
.portal-nav a { font-family: var(--brand-font); display: block; padding: .5rem .75rem; border-radius: 7px; text-decoration: none; color: var(--ink); font-weight: 500; }
.portal-nav a:hover { background: var(--bg); }
.portal-nav a[aria-current=page] { background: var(--teal-50); color: var(--teal); font-weight: 700; }
.portal-nav .nav-section { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .75rem .75rem .25rem; }
.client-switch { margin-bottom: .75rem; font-size: .85rem; }
@media (max-width: 900px) { .portal { grid-template-columns: 1fr; } .portal-nav { position: static; display: flex; flex-wrap: wrap; gap: .25rem; } .portal-nav .nav-section { width: 100%; } }
.page-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.page-title h1 { margin: 0; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .5rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a[aria-current=page] { color: var(--navy); border-color: var(--teal); }

/* Étapes de mise en service */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; }
.steps .dot { width: 1.3rem; height: 1.3rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; color: #fff; background: #c4ccd5; flex: none; }
.steps .done .dot, .steps .skipped .dot { background: var(--ok); }
.steps .running .dot { background: var(--teal-bright); animation: pulse 1.2s infinite; }
.steps .failed .dot { background: var(--bad); }
.steps .waiting .dot { background: #d38b00; }
@keyframes pulse { 50% { opacity: .45; } }
.progress { height: .5rem; background: #e3e8ee; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal-bright); }
.meter { height: .6rem; background: #e3e8ee; border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--teal); }
.meter.warn > span { background: #d38b00; }
.meter.bad > span { background: var(--bad); }

/* VPS */
.power { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.power::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: #9aa5b1; }
.power.running::before { background: #22a55b; box-shadow: 0 0 0 3px rgba(34,165,91,.2); }
.power.stopped::before { background: var(--bad); }
.power.paused::before { background: #d38b00; }
.chart { width: 100%; height: 120px; display: block; }
.chart path.line { fill: none; stroke: var(--teal); stroke-width: 2; }
.chart path.area { fill: rgba(42,157,143,.14); stroke: none; }
.chart text { font-size: 15px; fill: var(--muted); }
.console-page { background: #0b0f14; color: #e6edf3; min-height: 100vh; }
.console-bar { display: flex; justify-content: space-between; align-items: center; padding: .5rem 1rem; background: #111821; gap: 1rem; flex-wrap: wrap; }
.console-bar a, .console-bar button { color: #e6edf3; }
#terminal, #vnc-screen { height: calc(100vh - 52px); width: 100%; }
#vnc-screen { display: flex; justify-content: center; align-items: center; background: #000; }
.secret-box { font-family: var(--mono); background: #0f1720; color: #e6edf3; padding: .75rem 1rem; border-radius: 8px; word-break: break-all; }
.dns-table td:first-child { font-family: var(--mono); }
.copy { cursor: pointer; }

/* Divers */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.legal-content h2 { font-size: 1.15rem; }
.confirm-box { border: 2px solid var(--bad); border-radius: 10px; padding: 1rem 1.25rem; background: #fff; }
.terminate-cta { display: inline-block; font-weight: 700; }
@media print { .site-header, .site-footer, .portal-nav { display: none; } }
.console-bar .btn-secondary { color: var(--navy); }
