

  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body {
      min-height: 100vh;
      background: #f8f9fa;
      padding: 0;
      color: #212529;
    }

    .page-container {
      max-width: 1600px;
      margin: 0 auto;
      padding: 20px;
    }

    /* ====== HEADER ====== */
    .site-header {
      background: white;
      border-radius: 20px;
      padding: 24px 32px;
      margin-bottom: 28px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
    }

    .site-header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .site-logo {
      display: flex;
      align-items: center;
      gap: 14px;
      text-decoration: none;
    }

    .logo-mark {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 800;
      font-size: 18px;
      letter-spacing: -0.5px;
      box-shadow: 0 4px 12px rgba(76, 110, 245, 0.25);
    }

    .logo-text {
      font-size: 20px;
      font-weight: 700;
      color: #212529;
      letter-spacing: -0.5px;
    }

    .site-nav {
      display: flex;
      gap: 6px;
      background: #f8f9fa;
      padding: 6px;
      border-radius: 12px;
    }

    .site-nav a, .site-nav button {
      color: #495057;
      text-decoration: none;
      padding: 10px 18px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      transition: all 0.2s ease;
      border: none;
      background: transparent;
      cursor: pointer;
    }

    .site-nav a:hover, .site-nav button:hover {
      background: white;
      color: #4c6ef5;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .nav-btn-logout {
      color: #fa5252 !important;
    }

    .nav-btn-logout:hover {
      color: #fa5252 !important;
    }

    /* ====== GREETING ====== */
    .user-greeting {
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      border-radius: 16px;
      padding: 20px 28px;
      margin-bottom: 28px;
      font-size: 16px;
      color: white;
      box-shadow: 0 4px 12px rgba(76, 110, 245, 0.2);
      display: none;
    }

    .user-greeting span {
      font-weight: 700;
      text-decoration: underline;
      text-decoration-thickness: 2px;
      text-underline-offset: 3px;
    }

    /* ====== LAYOUT PRINCIPAL ====== */
    .main-layout {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 28px;
      align-items: flex-start;
    }

    .main-content {
      display: flex;
      flex-direction: column;
      gap: 28px;
    }

    /* ====== SIDEBAR DROITE (SOMMAIRE) ====== */
    .sidebar-right {
      position: sticky;
      top: 20px;
    }

    .sidebar-widget {
      background: white;
      border-radius: 20px;
      padding: 28px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
      margin-bottom: 20px;
    }

    .widget-title {
      font-size: 16px;
      font-weight: 800;
      color: #212529;
      margin-bottom: 20px;
      letter-spacing: -0.3px;
      text-transform: uppercase;
      font-size: 12px;
      color: #868e96;
      letter-spacing: 1px;
    }

    .article-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .article-list-item {
      display: block;
      padding: 14px 16px;
      background: #f8f9fa;
      border-radius: 12px;
      text-decoration: none;
      transition: all 0.2s ease;
      border: 2px solid transparent;
    }

    .article-list-item:hover {
      background: white;
      border-color: #4c6ef5;
      transform: translateX(4px);
    }

    .article-list-title {
      font-size: 14px;
      font-weight: 700;
      color: #212529;
      margin-bottom: 4px;
      line-height: 1.4;
    }

    .article-list-excerpt {
      font-size: 12px;
      color: #868e96;
      line-height: 1.5;
    }

    /* ====== SECTION HERO ====== */
    .hero-section {
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      border-radius: 20px;
      padding: 48px;
      color: white;
      box-shadow: 0 4px 12px rgba(76, 110, 245, 0.25);
      margin-bottom: 28px;
    }

    .hero-title {
      font-size: 42px;
      font-weight: 900;
      margin-bottom: 16px;
      letter-spacing: -1px;
    }

    .hero-subtitle {
      font-size: 18px;
      line-height: 1.6;
      opacity: 0.95;
    }

    /* ====== SECTIONS ARTICLES ====== */
    .article-section {
      background: white;
      border-radius: 20px;
      padding: 48px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
    }

    .article-section h2 {
      font-size: 32px;
      font-weight: 800;
      color: #212529;
      margin-bottom: 20px;
      letter-spacing: -0.5px;
    }

    .article-section h3 {
      font-size: 24px;
      font-weight: 700;
      color: #212529;
      margin-top: 32px;
      margin-bottom: 16px;
      letter-spacing: -0.3px;
    }

    .article-section p {
      font-size: 16px;
      line-height: 1.8;
      color: #495057;
      margin-bottom: 20px;
    }

    .article-section ul {
      margin: 20px 0;
      padding-left: 0;
      list-style: none;
    }

    .article-section li {
      font-size: 16px;
      line-height: 1.8;
      color: #495057;
      margin-bottom: 12px;
      padding-left: 32px;
      position: relative;
    }

    .article-section li::before {
      content: "•";
      position: absolute;
      left: 12px;
      color: #4c6ef5;
      font-weight: 900;
      font-size: 20px;
    }

    .article-section strong {
      color: #212529;
      font-weight: 700;
    }

    .info-box {
      background: #e7f5ff;
      border-left: 4px solid #4c6ef5;
      border-radius: 12px;
      padding: 20px 24px;
      margin: 28px 0;
    }

    .info-box p {
      margin-bottom: 0;
      color: #1864ab;
    }

    .read-more {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      color: white;
      padding: 14px 24px;
      border-radius: 12px;
      text-decoration: none;
      font-weight: 700;
      font-size: 14px;
      margin-top: 20px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(76, 110, 245, 0.25);
    }

    .read-more:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(76, 110, 245, 0.35);
    }

    /* ====== CALCULATEUR IMC ====== */
    .calculator-section {
      background: white;
      border-radius: 20px;
      padding: 48px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
    }

    .calculator-title {
      font-size: 32px;
      font-weight: 800;
      color: #212529;
      margin-bottom: 12px;
      letter-spacing: -0.5px;
      text-align: center;
    }

    .calculator-subtitle {
      font-size: 16px;
      color: #6c757d;
      text-align: center;
      margin-bottom: 32px;
      line-height: 1.7;
    }

    .calculator-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 40px;
      align-items: start;
    }

    /* ====== SECTION HISTORIQUE ====== */
    .history-section {
      background: white;
      border-radius: 20px;
      padding: 48px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
    }

    .imc-form {
      display: grid;
      gap: 20px;
    }

    .imc-field label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: #495057;
      margin-bottom: 10px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .imc-input-wrapper {
      display: flex;
      align-items: center;
      background: #f8f9fa;
      border: 2px solid #dee2e6;
      border-radius: 14px;
      padding: 16px 18px;
      transition: all 0.25s ease;
    }

    .imc-input-wrapper:focus-within {
      border-color: #4c6ef5;
      background: white;
      box-shadow: 0 0 0 4px rgba(76, 110, 245, 0.08);
    }

    .imc-field input, .imc-field select {
      background: transparent;
      border: none;
      outline: none;
      color: #212529;
      width: 100%;
      font-size: 17px;
      font-weight: 600;
    }

    .imc-input-wrapper span {
      font-size: 15px;
      color: #868e96;
      font-weight: 600;
      margin-left: 10px;
    }

    .imc-button {
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      border: none;
      color: white;
      font-weight: 700;
      padding: 18px;
      border-radius: 14px;
      width: 100%;
      cursor: pointer;
      font-size: 16px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(76, 110, 245, 0.3);
      margin-top: 8px;
    }

    .imc-button:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 24px rgba(76, 110, 245, 0.4);
    }

    .imc-error {
      margin-top: 10px;
      font-size: 14px;
      color: #fa5252;
      font-weight: 500;
      text-align: center;
      min-height: 20px;
    }

    /* ====== RÉSULTAT IMC ====== */
    .imc-result {
      display: none;
      background: #f8f9fa;
      border-radius: 16px;
      padding: 32px;
    }

    .result-header {
      text-align: center;
      margin-bottom: 24px;
    }

    .result-label {
      font-size: 12px;
      color: #868e96;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-bottom: 12px;
    }

    .imc-value {
      font-size: 64px;
      font-weight: 900;
      background: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      line-height: 1;
      letter-spacing: -2px;
    }

    .imc-category {
      font-size: 16px;
      font-weight: 700;
      margin-top: 16px;
      padding: 10px 20px;
      border-radius: 30px;
      display: inline-block;
    }

    .badge-normal {
      background: #d3f9d8;
      color: #2b8a3e;
    }
    .badge-maigre {
      background: #d0ebff;
      color: #1864ab;
    }
    .badge-surpoids {
      background: #ffe8cc;
      color: #d9480f;
    }
    .badge-obesite {
      background: #ffe0e0;
      color: #c92a2a;
    }

    .imc-bar {
      position: relative;
      height: 12px;
      border-radius: 30px;
      background: linear-gradient(to right,
        #74c0fc 0%,
        #51cf66 30%,
        #ffd43b 60%,
        #ff6b6b 100%
      );
      margin: 24px 0 10px;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .imc-indicator {
      position: absolute;
      top: -6px;
      width: 5px;
      height: 24px;
      background: #212529;
      border-radius: 6px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
      transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .imc-scale {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      color: #868e96;
      font-weight: 600;
    }

    .imc-note {
      margin-top: 20px;
      padding: 16px;
      background: white;
      border-radius: 12px;
      font-size: 14px;
      color: #495057;
      line-height: 1.7;
      border-left: 4px solid #dee2e6;
    }

    /* ====== HISTORIQUE ====== */
    .history-panel {
      display: none;
    }

    .imc-history-title {
      font-size: 24px;
      font-weight: 800;
      color: #212529;
      margin-bottom: 20px;
      letter-spacing: -0.5px;
    }

    .imc-history-summary {
      font-size: 14px;
      color: #6c757d;
      line-height: 1.8;
      margin-bottom: 20px;
    }

    .imc-history-summary strong {
      color: #4c6ef5;
      font-weight: 700;
    }

    .imc-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 20px;
      margin-bottom: 28px;
    }

    .imc-card {
      background: #f8f9fa;
      border-radius: 12px;
      padding: 16px;
      border: 2px solid #e9ecef;
      transition: all 0.3s ease;
    }

    .imc-card:hover {
      border-color: #4c6ef5;
      box-shadow: 0 4px 16px rgba(76, 110, 245, 0.1);
    }

    .imc-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .imc-card-name {
      font-weight: 700;
      font-size: 14px;
      color: #212529;
    }

    .imc-card-date {
      font-size: 12px;
      color: #868e96;
      margin-top: 4px;
    }

    .imc-card-delete {
      background: white;
      border: 2px solid #ffe0e0;
      color: #fa5252;
      font-size: 14px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 8px;
      transition: all 0.2s ease;
      font-weight: 700;
    }

    .imc-card-delete:hover {
      background: #fff5f5;
      border-color: #fa5252;
      transform: scale(1.05);
    }

    .imc-card-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 12px;
    }

    .imc-card-label {
      color: #868e96;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    .imc-card-value {
      color: #212529;
      font-weight: 700;
      font-size: 14px;
      margin-top: 4px;
    }

    .imc-card-imc {
      color: #4c6ef5;
      font-size: 18px;
      font-weight: 800;
    }

    .imc-bar.small-bar {
      height: 6px;
      margin-top: 12px;
      margin-bottom: 0;
    }

    .small-bar .imc-indicator {
      height: 16px;
      top: -5px;
    }

    .chart-box {
      background: #fff;
      border: 1px solid #e9ecef;
      border-radius: 12px;
      padding: 16px;
      height: 400px;
      margin: 24px 0;
    }

    .chart-box canvas {
      width: 100% !important;
      height: 100% !important;
      display: block;
    }

    .imc-no-account {
      text-align: center;
      padding: 40px 24px;
      background: #f8f9fa;
      border-radius: 16px;
      color: #6c757d;
      font-size: 15px;
      line-height: 1.7;
    }

    .imc-select-wrapper select {
      width: 100%;
      padding: 0;
      border: none;
      background: transparent;
      font-weight: 700;
    }

    /* ====== FOOTER ====== */
    .site-footer {
      background: white;
      border-radius: 20px;
      padding: 28px;
      text-align: center;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      border: 1px solid #e9ecef;
      margin-top: 40px;
    }

    .site-footer-inner {
      font-size: 14px;
      color: #868e96;
    }

    .site-footer-links {
      display: flex;
      gap: 20px;
      justify-content: center;
      align-items: center;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .site-footer-links a {
      color: #4c6ef5;
      text-decoration: none;
      font-weight: 600;
      transition: all 0.2s ease;
    }

    .site-footer-links a:hover {
      color: #5f3dc4;
      text-decoration: underline;
    }

    /* ====== RESPONSIVE ====== */
    @media (max-width: 1400px) {
      .calculator-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1200px) {
      .main-layout {
        grid-template-columns: 1fr;
      }

      .sidebar-right {
        position: static;
        order: -1;
      }
    }

    @media (max-width: 600px) {
      .page-container {
        padding: 16px;
      }

      .site-header {
        padding: 20px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .site-header-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 18px;
        
      }

      .site-nav {
        width: 100%;
        flex-wrap: wrap;
          display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 18px;

      }

      .hero-section {
        padding: 32px 24px;
      }

      .hero-title {
        font-size: 32px;
      }

      .article-section,
      .calculator-section,
      .history-section {
        padding: 32px 24px;
      }

      .article-section h2,
      .calculator-title {
        font-size: 28px;
      }

      .article-section h3 {
        font-size: 22px;
      }

      .imc-value {
        font-size: 48px;
      }

      .chart-box {
        height: 320px;
      }

      .imc-cards {
        grid-template-columns: 1fr;
      }
    }
  </style>