/* ==========================================================
   Offer Card Widget — Styles
   ========================================================== */

.oc-widget {
    font-family: inherit;
    box-sizing: border-box;
}

.oc-widget *,
.oc-widget *::before,
.oc-widget *::after {
    box-sizing: border-box;
}

/* ----------------------------------------------------------
   CARD
   ---------------------------------------------------------- */
.oc-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    background: #ffffff;
}

/* ----------------------------------------------------------
   HEADER
   ---------------------------------------------------------- */
.oc-header {
    background-color: #A8D5C6;
    padding: 24px;
    text-align: center;
}

.oc-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A3D35;
    line-height: 1.2;
}

.oc-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #1A3D35;
    opacity: 0.8;
}

/* ----------------------------------------------------------
   BODY
   ---------------------------------------------------------- */
.oc-body {
    display: flex;
    flex-direction: column;
}

/* ----------------------------------------------------------
   ROW
   ---------------------------------------------------------- */
.oc-row {
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
}

.oc-row:last-child {
    border-bottom: none;
}

.oc-row-main {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 8px;
    transition: background .15s;
}

/* ----------------------------------------------------------
   NAME & VALUE
   ---------------------------------------------------------- */
.oc-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1A3D35;
}

.oc-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2D6A5E;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.oc-check {
    color: #2D6A5E;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   INACTIVE ROWS
   ---------------------------------------------------------- */
.oc-row.oc-inactive,
.oc-row.oc-inactive .oc-row-main,
.oc-row.oc-inactive .oc-dropdown {
    background-color: #f7f7f7 !important;
}

.oc-row.oc-inactive .oc-name {
    color: #aaaaaa;
    font-weight: 400;
}

.oc-row.oc-inactive .oc-value {
    color: #cccccc;
}

.oc-row.oc-inactive .oc-dropdown,
.oc-row.oc-inactive .oc-dropdown p {
    color: #aaaaaa;
    font-style: italic;
}

/* ----------------------------------------------------------
   CHEVRON
   ---------------------------------------------------------- */
.oc-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s;
    margin-left: 4px;
}

.oc-chevron svg {
    width: 12px;
    height: 12px;
}

.oc-row.open .oc-chevron {
    transform: rotate(180deg);
}

/* Row ouverte */
.oc-row.open .oc-row-main {
    background-color: #f0f7f5;
}

/* ----------------------------------------------------------
   DROPDOWN (contenu WYSIWYG)
   ---------------------------------------------------------- */
.oc-dropdown {
    display: none;
    padding: 0 20px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #3D5E56;
    border-top: 1px solid transparent;
}

.oc-row.open .oc-dropdown {
    display: block;
    padding: 16px 20px;
    border-top-color: #e8e8e8;
}

.oc-dropdown p:first-child { margin-top: 0; }
.oc-dropdown p:last-child  { margin-bottom: 0; }

.oc-dropdown .cr-cond {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.oc-dropdown .cr-cond::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #2D6A5E;
    font-weight: 700;
    font-size: 0.9rem;
}

.oc-dropdown .cr-cond.warn {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.oc-dropdown .cr-cond.warn::before {
    content: '!';
    position: absolute;
    left: 2px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d4820a;
    color: #d4820a;
    font-weight: 700;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ----------------------------------------------------------
   MOBILE TABS (injectés par JS sur <= 768px)
   ---------------------------------------------------------- */
.oc-tab-hidden {
    display: none !important;
}

.oc-tabs-nav {
    display: flex;
    background: #ffffff;
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 16px;
}

body .oc-tabs-nav .oc-tab-btn {
    flex: 1;
    padding: 10px 30px;
    border: none !important;
    background-color: transparent;
    border-radius: 50px !important;
    font-size: 0.9rem;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: background-color .2s, color .2s;
    white-space: nowrap;
    line-height: 1;
    box-shadow: none !important;
    text-decoration: none;
    letter-spacing: normal;
    border: none !important;
}

body .oc-tabs-nav .oc-tab-btn:focus {
    outline: none;
}

body .oc-tabs-nav .oc-tab-btn:focus-visible {
    outline-offset: 2px;
}

/* La barre de tabs ne s'affiche qu'en mobile — sur desktop elle n'est jamais injectée */

/* ----------------------------------------------------------
   MOBILE : cartes pleine largeur
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .oc-offer-tab,
    .oc-offer-tab .elementor-widget-container,
    .oc-widget,
    .oc-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}
