  * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Segoe UI", "Tahoma", "Cairo", sans-serif;
      }

      body {
        background: #F8F3E1;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 16px;
      }

      .card {
        background: #F8F3E1;
        border-radius: 48px 48px 32px 32px;
        box-shadow: 0 30px 40px -12px #41431B;
        width: 100%;
        max-width: 1000px;
        padding: 30px 35px 40px;
        border: 2px solid #F8F3E1;
      }

      .identity {
        background: #41431B;
        color: #F8F3E1;
        padding: 20px 30px;
        border-radius: 100px;
        margin-bottom: 30px;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: center;
        gap: 15px 25px;
        font-size: 1.3rem;
        box-shadow: inset 0 -3px 0 #41431B;
        border: 1px solid #AEB784;
      }

      .identity .student {
        background: #F8F3E1;
        color: #41431B;
        padding: 8px 35px;
        border-radius: 60px;
        font-weight: 700;
        font-size: 1.7rem;
        letter-spacing: 1px;
        box-shadow: 0 6px 0 #84B179;
      }

      .identity .details {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
      }

      .identity span {
        background: #AEB784;
        padding: 6px 24px;
        border-radius: 40px;
        color: #1f1f1f;
        font-weight: 600;
      }

      h1 {
        font-size: 2.2rem;
        font-weight: 700;
        color: #41431B;
        display: flex;
        align-items: center;
        gap: 15px;
        border-bottom: 4px solid #AEB784;
        padding-bottom: 15px;
        margin-bottom: 30px;
        line-height: 1.4;
      }

      h1 .badge {
        background: #41431B;
        color: white;
        font-size: 1.2rem;
        padding: 8px 25px;
        border-radius: 60px;
        margin-right: auto;
        font-weight: 500;
        white-space: nowrap;
      }

      .switch-row {
        display: flex;
        justify-content: center;
        gap: 30px;
        margin: -10px 0 30px 0;
      }

      .switch-btn {
        background: #F8F3E1;
        border: 4px solid #AEB784;
        color: #41431B;
        padding: 16px 40px;
        border-radius: 70px;
        font-size: 1.5rem;
        font-weight: 700;
        cursor: pointer;
        transition: 0.2s;
        box-shadow: 0 8px 0 #41431B;
        display: inline-flex;
        align-items: center;
        gap: 12px;
      }

      .switch-btn.active {
        background: #41431B;
        color: white;
        border-color: #F8F3E1;
        box-shadow: 0 8px 0 #41431B;
        transform: translateY(2px);
      }

      .switch-btn:hover {
        transform: scale(1.02);
      }

      .grid-form {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
        gap: 22px 25px;
        margin-bottom: 20px;
        transition: 0.3s;
      }

      .input-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .input-group label {
        font-weight: 700;
        color: #41431B;
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        gap: 8px;
        background: #F8F3E1;
        padding: 5px 15px;
        border-radius: 40px;
      }

      .input-group label i {
        font-style: normal;
        font-size: 1.3rem;
      }

      .input-wrapper {
        display: flex;
        align-items: center;
        background: #F8F3E1;
        border: 3px solid #AEB784;
        border-radius: 60px;
        transition: 0.15s;
        padding: 0 20px;
      }

      .input-wrapper:focus-within {
        border-color: #41431B;
        box-shadow: 0 0 0 5px #41431B;
      }

      .input-wrapper input {
        width: 100%;
        padding: 15px 5px 15px 0;
        border: none;
        background: transparent;
        font-size: 1.2rem;
        font-weight: 600;
        color: #41431B;
        outline: none;
        text-align: right;
      }

      .input-wrapper input::placeholder {
        color: #F8F3E1;
        font-weight: 400;
      }

      .input-wrapper span {
        font-weight: 700;
        color: #41431B;
        padding-right: 15px;
        border-right: 2px dashed #AEB784;
        font-size: 1.15rem;
      }

      input[type="number"] {
        -moz-appearance: textfield;
      }

      .coeff-badge {
        background: #AEB784;
        color: white;
        border-radius: 30px;
        padding: 4px 12px;
        font-size: 0.85rem;
        font-weight: 600;
        margin-right: auto;
      }

      .actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
        margin: 40px 0 35px;
      }

      .btn {
        border: none;
        background: #F8F3E1;
        padding: 16px 45px;
        border-radius: 70px;
        font-size: 1.5rem;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 12px 22px -12px #41431B;
        cursor: pointer;
        transition: 0.2s;
        border: 3px solid transparent;
      }

      .btn-primary {
        background: #41431B;
        color: white;
      }

      .btn-primary:hover {
        background: #AEB784;
        transform: scale(1.02);
        border-color: #F8F3E1;
      }

      .btn-secondary {
        background: #F8F3E1;
        color: #41431B;
        border-color: #AEB784;
      }

      .btn-secondary:hover {
        background: #AEB784;
      }

      .result-panel {
        background: linear-gradient(145deg, #F8F3E1, #F8F3E1);
        border-radius: 80px;
        padding: 25px 35px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        border: 3px solid #AEB784;
        box-shadow: inset 0 3px 10px #AEB784, 0 16px 28px -18px #41431B;
      }

      .moyenne-display {
        background: #41431B;
        border-radius: 70px;
        padding: 15px 35px;
        color: white;
        text-align: center;
        min-width: 230px;
      }

      .moyenne-display .label {
        font-size: 1.3rem;
        opacity: 0.85;
      }

      .moyenne-display .value {
        font-size: 4.5rem;
        font-weight: 800;
        line-height: 1.1;
      }

      .mention {
        font-size: 2.5rem;
        font-weight: 700;
        color: #41431B;
        padding-left: 10px;
        text-shadow: 2px 2px 0 #AEB784;
      }

      .footer-note {
        text-align: center;
        margin-top: 30px;
        background: #F8F3E1;
        padding: 14px 25px;
        border-radius: 70px;
        color: #41431B;
        font-weight: 600;
        font-size: 1rem;
        border: 2px solid #AEB784;
      }