/* =========================================================
   MON CARNET GOURMAND
   V1.4.0.1 — INTERFACE DU BROUILLON LIBRE
   ========================================================= */

.recipe-creation-methods[hidden],
.recipe-free-draft[hidden],
.recipe-form[hidden] {
    display: none;
}

/* CHOIX DE LA MÉTHODE */

.recipe-creation-methods {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(201, 120, 82, 0.16);
    border-radius: var(--radius-large, 24px);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.94),
            rgba(255, 246, 234, 0.91)
        );
    box-shadow: var(--shadow-card);
}

.recipe-creation-methods-heading {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.recipe-creation-methods-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(
            135deg,
            rgba(247, 227, 220, 0.96),
            rgba(255, 255, 255, 0.92)
        );
    box-shadow:
        inset 0 0 0 1px
        rgba(201, 120, 82, 0.11);
    font-size: 25px;
}

.recipe-creation-methods-heading h2 {
    margin-top: 5px;
    color: var(--color-brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(23px, 6vw, 29px);
    line-height: 1.13;
}

.recipe-creation-methods-heading p {
    margin-top: 8px;
    color: var(--color-text-soft);
    font-size: 12px;
    line-height: 1.6;
}

.recipe-method-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.recipe-method-card {
    width: 100%;
    min-height: 126px;
    padding: 15px;
    position: relative;
    border: 1px solid rgba(111, 64, 44, 0.1);
    border-radius: 19px;
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    color: var(--color-brown-dark);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 7px 18px
        rgba(79, 48, 31, 0.05);
    text-align: left;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

.recipe-method-card:hover {
    border-color: rgba(201, 120, 82, 0.25);
    box-shadow:
        0 10px 23px
        rgba(79, 48, 31, 0.08);
}

.recipe-method-card:active {
    transform: scale(0.988);
}

.recipe-method-card:focus-visible {
    outline: 3px solid rgba(201, 120, 82, 0.28);
    outline-offset: 3px;
}

.recipe-method-card.is-active {
    border-color: rgba(125, 146, 112, 0.34);
    background:
        linear-gradient(
            135deg,
            rgba(232, 238, 227, 0.96),
            rgba(255, 255, 255, 0.91)
        );
    box-shadow:
        0 10px 24px
        rgba(92, 111, 80, 0.1);
}

.recipe-method-card-free.is-active {
    border-color: rgba(201, 120, 82, 0.34);
    background:
        linear-gradient(
            135deg,
            rgba(247, 227, 220, 0.95),
            rgba(255, 255, 255, 0.91)
        );
}

.recipe-method-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--color-cream-dark);
    font-size: 21px;
}

.recipe-method-card.is-active
.recipe-method-card-icon {
    background: rgba(255, 255, 255, 0.8);
}

.recipe-method-card-content {
    min-width: 0;
    padding-right: 19px;
}

.recipe-method-card-content strong {
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.recipe-method-card-content small {
    margin-top: 6px;
    display: block;
    color: var(--color-text-soft);
    font-size: 10px;
    line-height: 1.5;
}

.recipe-method-card-check,
.recipe-method-card-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--color-terracotta-dark);
    font-size: 17px;
    font-weight: 900;
}

.recipe-method-card-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--color-green, #7d9270);
    font-size: 12px;
}

.recipe-method-card:not(.is-active)
.recipe-method-card-check {
    display: none;
}

/* BROUILLON LIBRE */

.recipe-free-draft {
    margin-bottom: 18px;
    padding: 21px;
    border: 1px solid rgba(201, 120, 82, 0.18);
    border-radius: var(--radius-large, 24px);
    background:
        linear-gradient(
            150deg,
            rgba(255, 252, 247, 0.97),
            rgba(247, 227, 220, 0.84)
        );
    box-shadow: var(--shadow-card);
}

.recipe-free-draft-header {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.recipe-free-draft-header-icon {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(
            135deg,
            rgba(247, 227, 220, 0.98),
            rgba(255, 255, 255, 0.94)
        );
    box-shadow:
        inset 0 0 0 1px
        rgba(201, 120, 82, 0.12);
    font-size: 27px;
}

.recipe-free-draft-header h2 {
    margin-top: 5px;
    color: var(--color-brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 6.5vw, 31px);
    line-height: 1.12;
}

.recipe-free-draft-header p {
    margin-top: 8px;
    color: var(--color-text-soft);
    font-size: 12px;
    line-height: 1.6;
}

.recipe-free-draft-example {
    margin-top: 18px;
    padding: 13px;
    border: 1px solid rgba(125, 146, 112, 0.16);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--color-text-soft);
    background: rgba(244, 248, 241, 0.74);
}

.recipe-free-draft-example > span {
    font-size: 19px;
}

.recipe-free-draft-example p {
    font-size: 11px;
    line-height: 1.6;
}

.recipe-free-draft-example strong {
    color: var(--color-brown-dark);
}

.recipe-free-draft-field {
    margin-top: 17px;
}

.recipe-free-draft-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-brown-dark);
    font-size: 12px;
    font-weight: 850;
}

.recipe-free-draft-field textarea {
    width: 100%;
    min-height: 250px;
    padding: 16px;
    resize: vertical;
    border: 1px solid rgba(111, 64, 44, 0.14);
    border-radius: 18px;
    outline: none;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.9);
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}

.recipe-free-draft-field textarea::placeholder {
    color: rgba(104, 81, 66, 0.55);
}

.recipe-free-draft-field textarea:focus {
    border-color: rgba(201, 120, 82, 0.52);
    background: #ffffff;
    box-shadow:
        0 0 0 4px
        rgba(201, 120, 82, 0.1);
}

.recipe-free-draft-field textarea.is-invalid {
    border-color: rgba(180, 78, 59, 0.52);
    box-shadow:
        0 0 0 4px
        rgba(180, 78, 59, 0.1);
}

.recipe-free-draft-field-footer {
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-text-soft);
}

.recipe-free-draft-field-footer small {
    max-width: 72%;
    font-size: 9px;
    line-height: 1.45;
}

.recipe-free-draft-field-footer span {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
}

.recipe-free-draft-trust {
    margin-top: 15px;
    padding: 13px;
    border: 1px solid rgba(111, 64, 44, 0.09);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: var(--color-text-soft);
    background: rgba(255, 255, 255, 0.64);
}

.recipe-free-draft-trust > span {
    width: 31px;
    height: 31px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--color-green-soft);
    font-size: 16px;
}

.recipe-free-draft-trust p {
    font-size: 10px;
    font-weight: 650;
    line-height: 1.55;
}

.recipe-free-draft-message {
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 720;
    line-height: 1.55;
}

.recipe-free-draft-message[hidden] {
    display: none;
}

.recipe-free-draft-message.is-ready {
    border: 1px solid rgba(125, 146, 112, 0.2);
    color: var(--color-brown-dark);
    background: rgba(232, 238, 227, 0.86);
}

.recipe-free-draft-message.is-error {
    border: 1px solid rgba(180, 78, 59, 0.16);
    color: #793b2e;
    background: rgba(249, 229, 224, 0.92);
}

.recipe-free-draft-actions {
    margin-top: 17px;
    display: grid;
    gap: 10px;
}

.recipe-free-draft-analyze {
    width: 100%;
    min-height: 72px;
    padding: 12px 15px;
    border: 0;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--color-terracotta, #c97852),
            var(--color-brown, #8f5638)
        );
    box-shadow:
        0 12px 27px
        rgba(143, 86, 56, 0.23);
    text-align: left;
    transition:
        transform 150ms ease,
        opacity 150ms ease,
        box-shadow 150ms ease;
}

.recipe-free-draft-analyze:not(:disabled):hover {
    box-shadow:
        0 15px 31px
        rgba(143, 86, 56, 0.29);
}

.recipe-free-draft-analyze:not(:disabled):active {
    transform: scale(0.988);
}

.recipe-free-draft-analyze:focus-visible {
    outline: 3px solid rgba(201, 120, 82, 0.3);
    outline-offset: 3px;
}

.recipe-free-draft-analyze:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.recipe-free-draft-analyze > span:first-child {
    width: 47px;
    height: 47px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 22px;
}

.recipe-free-draft-analyze strong {
    display: block;
    font-size: 14px;
}

.recipe-free-draft-analyze small {
    margin-top: 4px;
    display: block;
    color: rgba(255, 255, 255, 0.77);
    font-size: 10px;
    line-height: 1.4;
}

.recipe-free-draft-guided {
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    border: 1px solid rgba(111, 64, 44, 0.12);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--color-brown-dark);
    background: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 820;
}

.recipe-free-draft-guided:focus-visible {
    outline: 3px solid rgba(125, 146, 112, 0.24);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .recipe-method-grid {
        grid-template-columns: 1fr;
    }

    .recipe-method-card {
        min-height: 105px;
    }
}

@media (max-width: 390px) {
    .recipe-creation-methods,
    .recipe-free-draft {
        padding: 17px;
    }

    .recipe-creation-methods-heading {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 11px;
    }

    .recipe-creation-methods-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 22px;
    }

    .recipe-free-draft-header {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 11px;
    }

    .recipe-free-draft-header-icon {
        width: 50px;
        height: 50px;
        border-radius: 17px;
        font-size: 23px;
    }

    .recipe-free-draft-field textarea {
        min-height: 220px;
        padding: 14px;
    }

    .recipe-free-draft-field-footer {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .recipe-free-draft-field-footer small {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recipe-method-card,
    .recipe-free-draft-analyze {
        transition: none;
    }
}
