/* ====================================================
   PRESCRIPTION IDE - FORMULAIRE
   ==================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    color: #2c3e50;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0e6f6 100%);
    min-height: 100vh;
    line-height: 1.5;
}

/* ====================================================
   CONTENEUR
   ==================================================== */
.ide-container {
    max-width: 720px;
    margin: 20px auto 40px;
    padding: 0 15px;
}

/* ====================================================
   EN-TÊTE
   ==================================================== */
.ide-header {
    text-align: center;
    padding: 25px 20px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 14px 14px 0 0;
    color: white;
}

.ide-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.ide-subtitle {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

/* ====================================================
   SECTIONS
   ==================================================== */
.ide-section {
    background: #fff;
    padding: 18px 22px;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #eef1f5;
}

.ide-section-highlight {
    background: linear-gradient(135deg, #f8f4ff, #f0eaff);
    border-left-color: #d4c8f0;
    border-right-color: #d4c8f0;
}

.ide-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #eef1f5;
}

.ide-section-highlight .ide-section-title {
    color: #764ba2;
    border-bottom-color: #e0d4f5;
}

/* ====================================================
   CHAMPS
   ==================================================== */
.ide-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ide-field-row label {
    font-weight: 600;
    font-size: 13.5px;
    color: #34495e;
    white-space: nowrap;
    min-width: 130px;
}

.ide-field-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ide-field-col label {
    font-weight: 600;
    font-size: 13px;
    color: #34495e;
}

input[type="text"],
input[type="date"],
select {
    padding: 8px 12px;
    border: 1.5px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ide-input-wide {
    flex: 1;
    min-width: 0;
}

.ide-select {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* ====================================================
   CHIPS (ALD)
   ==================================================== */
.ide-options-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ide-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f0f4f8;
    border: 1.5px solid #d0d7de;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.2s;
}

.ide-chip:hover {
    background: #e8eef5;
    border-color: #667eea;
}

.ide-chip:has(input:checked) {
    background: #eef0ff;
    border-color: #667eea;
    color: #4338ca;
}

.ide-chip input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #667eea;
    cursor: pointer;
}

/* ====================================================
   GRILLE FRÉQUENCE / DURÉE
   ==================================================== */
.ide-freq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ====================================================
   BOUTONS
   ==================================================== */
.ide-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 22px 25px;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 14px 14px;
}

.ide-btn {
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.ide-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.ide-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ide-btn-secondary {
    background: #f0f4f8;
    color: #4a5568;
    border: 1.5px solid #d0d7de;
}

.ide-btn-secondary:hover {
    background: #e8ecf0;
    border-color: #b0b8c4;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media screen and (max-width: 600px) {
    .ide-freq-grid {
        grid-template-columns: 1fr;
    }

    .ide-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ide-field-row label {
        min-width: auto;
    }

    .ide-input-wide,
    .ide-select {
        width: 100%;
    }

    .ide-actions {
        flex-direction: column;
    }

    .ide-btn {
        width: 100%;
    }
}
