@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=Fraunces:ital,wght@0,600;1,700&display=swap');

#teb-nut, #teb-nut * {
  box-sizing: border-box;
  font-family: 'DM Sans', system-ui, sans-serif;
}

#teb-nut {
  --sky:      #38BDF8;
  --sky-d:    #0EA5E9;
  --sky-l:    #E0F6FE;
  --sky-xl:   #F0FBFF;
  --ora:      #F97316;
  --ora-d:    #EA580C;
  --ora-l:    #FFF7ED;
  --ora-xl:   #FFFBF5;
  --teal:     #2DD4BF;
  --teal-l:   #CCFBF1;
  --grad:     linear-gradient(110deg, #38BDF8 0%, #2DD4BF 100%);
  --grad-ora: linear-gradient(110deg, #F97316 0%, #FBBF24 100%);
  --dark:     #0C1A2E;
  --slate:    #334155;
  --mid:      #64748B;
  --muted:    #94A3B8;
  --border:   #E2E8F0;
  --border-a: rgba(56,189,248,0.18);
  --border-o: rgba(249,115,22,0.2);
  --white:    #FFFFFF;
  --light:    #F8FAFC;
  --sh:       0 1px 3px rgba(15,23,42,0.06), 0 8px 32px rgba(249,115,22,0.08);
  --sh-sm:    0 1px 2px rgba(15,23,42,0.05);
  --sh-btn:   0 4px 16px rgba(249,115,22,0.35);
  --r:        16px;
  --r-sm:     10px;

  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  max-width: 880px;
  margin: 40px auto;
  box-shadow: var(--sh);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
  border: 1px solid var(--border);
}

/* ── HERO ── */
#teb-nut .tn-hero {
  background: var(--dark);
  padding: 44px 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#teb-nut .tn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(56,189,248,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(249,115,22,0.2) 0%, transparent 60%);
  pointer-events: none;
}
#teb-nut .tn-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38BDF8 0%, #2DD4BF 40%, #F97316 100%);
  opacity: 0.7;
}
#teb-nut .tn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249,115,22,0.2);
  border: 1px solid rgba(249,115,22,0.4);
  color: #FED7AA;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
  position: relative;
}
#teb-nut .tn-title {
  font-family: 'Fraunces', serif !important;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem) !important;
  font-weight: 600 !important;
  color: #fff !important;
  line-height: 1.15 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  text-transform: none !important;
  letter-spacing: -0.02em !important;
  position: relative;
}
#teb-nut .tn-title em {
  font-style: italic;
  background: var(--grad-ora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#teb-nut .tn-sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

/* ── BODY ── */
#teb-nut .tn-body {
  padding: 32px 36px;
  background: var(--white);
}

/* ── FORM GRID ── */
#teb-nut .tn-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
#teb-nut .tn-col {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#teb-nut .tn-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ora);
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border-o);
}

/* ── FIELD ── */
#teb-nut .tn-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#teb-nut .tn-field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
  margin: 0;
  padding: 0;
}
#teb-nut .tn-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
#teb-nut .tn-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
  width: 100%;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
  height: auto;
  margin: 0;
}
#teb-nut .tn-select { cursor: pointer; }
#teb-nut .tn-input::-webkit-outer-spin-button,
#teb-nut .tn-input::-webkit-inner-spin-button { -webkit-appearance: none; }
#teb-nut .tn-input::placeholder { color: var(--muted); }
#teb-nut .tn-input:focus {
  border-color: var(--ora);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
  background: var(--white);
  outline: none;
}
#teb-nut .tn-unit {
  padding: 0 14px;
  background: var(--ora-l);
  border: 1.5px solid var(--border-o);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ora);
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#teb-nut .tn-third { width: 33.33%; }

/* ── BUTTON ── */
#teb-nut .tn-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: var(--grad-ora);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  margin: 0 0 28px 0;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: var(--sh-btn);
  line-height: 1;
  text-transform: none;
}
#teb-nut .tn-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(249,115,22,0.4);
  color: var(--white);
  text-decoration: none;
}

/* ── RESULT ── */
#teb-nut .tn-result {
  display: none;
  animation: tnFade 0.35s ease;
}
#teb-nut .tn-result.tn-show { display: block; }

@keyframes tnFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#teb-nut .tn-res-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
#teb-nut .tn-res-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ora);
}
#teb-nut .tn-res-sub {
  font-size: 0.85rem;
  color: var(--mid);
}

/* ── CARDS ── */
#teb-nut .tn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
#teb-nut .tn-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}
#teb-nut .tn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
#teb-nut .tn-card.c-cal::before  { background: var(--grad-ora); }
#teb-nut .tn-card.c-gluc::before { background: linear-gradient(90deg, #FBBF24, #F97316); }
#teb-nut .tn-card.c-eau::before  { background: var(--grad); }
#teb-nut .tn-card.c-sel::before  { background: linear-gradient(90deg, #2DD4BF, #0EA5E9); }

#teb-nut .tn-card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: block;
}
#teb-nut .tn-card-val {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
  margin-bottom: 2px;
}
#teb-nut .c-cal  .tn-card-val { color: var(--ora); }
#teb-nut .c-gluc .tn-card-val { color: #D97706; }
#teb-nut .c-eau  .tn-card-val { color: var(--sky-d); }
#teb-nut .c-sel  .tn-card-val { color: var(--teal-d, #0D9488); }

#teb-nut .tn-card-unit {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
#teb-nut .tn-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  display: block;
}

/* ── RAVITO PLAN ── */
#teb-nut .tn-ravito {
  background: var(--ora-xl);
  border: 1px solid var(--border-o);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 18px;
}
#teb-nut .tn-ravito-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ora-d);
  margin-bottom: 16px;
}
#teb-nut .tn-ravito-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#teb-nut .tn-ravito-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(249,115,22,0.1);
  font-size: 0.88rem;
  color: var(--slate);
}
#teb-nut .tn-ravito-km {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ora);
  min-width: 60px;
  flex-shrink: 0;
}

/* ── DISCLAIMER ── */
#teb-nut .tn-disclaimer {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--light);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  line-height: 1.6;
}

/* ── TABLE ── */
#teb-nut .tn-table-wrap {
  border-top: 1px solid var(--border);
  background: var(--white);
}
#teb-nut .tn-table-head {
  background: var(--light);
  color: var(--slate);
  padding: 16px 24px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
#teb-nut .tn-scroll { overflow-x: auto; }
#teb-nut table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
#teb-nut table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
  background: var(--light);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  margin: 0;
}
#teb-nut table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--slate);
  margin: 0;
}
#teb-nut table td:first-child { font-weight: 600; color: var(--dark); }
#teb-nut table tr:last-child td { border-bottom: none; }
#teb-nut table tr.tn-hl td { background: var(--ora-xl); }
#teb-nut table tr:hover td { background: var(--sky-xl); }

/* ── RESPONSIVE ── */
@media (max-width: 620px) {
  #teb-nut .tn-form-grid { grid-template-columns: 1fr; }
  #teb-nut .tn-body { padding: 20px 16px; }
  #teb-nut .tn-hero { padding: 28px 20px 30px; }
  #teb-nut .tn-title { font-size: 1.6rem !important; }
  #teb-nut .tn-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  #teb-nut .tn-cards { grid-template-columns: 1fr; }
}
