/* =====================================================
   Club Ferrero Pro — Styles personnalisés
   Complément à Bootstrap 4
   ===================================================== */

/* ─── Typographie ────────────────────────────────────── */
body {
    font-family: 'Open Sans', sans-serif;
}
.text-muted {
    color: #5a6068 !important;
}

/* ─── Skip link (accessibilité RGAA) ────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #5C0A14;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ─── Focus global ───────────────────────────────────── */
:focus-visible {
    outline: 3px solid #C8972A;
    outline-offset: 2px;
}

/* ─── Header ────────────────────────────────────────── */
.header-left {
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.logo-wrapper {
    display: inline-block;
    line-height: 0;
}
.logo-wrapper img {
    height: 80px;
    width: auto;
}

/* ─── Navigation principale ──────────────────────────── */
.main-nav-link {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2c2c2c !important;
    padding: 6px 16px !important;
    transition: color 0.2s;
    position: relative;
}
.main-nav-link::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #C8972A;
    transform: scaleX(0);
    transition: transform 0.2s;
}
.main-nav-link:hover,
.main-nav-link:focus {
    color: #C8972A !important;
    text-decoration: none;
}
.main-nav-link:hover::after,
.main-nav-link:focus::after,
.main-nav-link.active::after {
    transform: scaleX(1);
}
.main-nav-link.active {
    color: #C8972A !important;
}
.navbar-toggler {
    border-color: #C8972A;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(200,151,42,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ─── Page Modalités ────────────────────────────────── */
.modalites-content {
    background: #fff;
    border: 1px solid #ddd4b0;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

/* ─── Bannière ───────────────────────────────────────── */
.banner-wrapper {
    overflow: hidden;
}
.banner-wrapper .banner {
    width: 100%;
    display: block;
}

/* ─── Section étapes (background crème) ─────────────── */
.background-3 {
    background-color: #F5EFD4;
    padding: 45px 0;
}
.main-wrapper {
    padding-top: 40px;
    padding-bottom: 40px;
}
.home-desc-wrapper {
    max-width: 860px;
    margin: 0 auto;
}
.home-desc-wrapper .col-md-4 {
    padding: 10px 20px;
}
.num-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: #52A665;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1;
}
.home-desc-wrapper img {
    margin: 0 auto 16px;
    display: block;
}
.p-wrapper-3 {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-top: 12px;
}

/* ─── Titres de sections ─────────────────────────────── */
.title-wrapper {
    text-align: center;
    margin-bottom: 30px;
}
.title-wrapper h1,
.title-wrapper h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 10px;
}
.config-hr {
    border: 0;
    border-top: 3px solid #C8972A;
    width: 56px;
    margin: 0 auto;
    opacity: 1;
}
.cgu-content h2,
.modalites-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2c2c2c;
    margin-top: 30px;
    margin-bottom: 12px;
}
.cgu-content h3,
.modalites-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: #2c2c2c;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* ─── Cards offres ───────────────────────────────────── */
.config-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 -10px;
}
.config-card {
    width: calc((100% - 40px) / 3);
    min-width: 0;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* Zone visuel : carré strict (padding-bottom 100% = ratio 1:1) */
.config-card-visual {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    height: 0;
    background: #f5f0e6;
    overflow: hidden;
}
.config-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.config-title {
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.config-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #eee;
}
.config-moda {
    color: #333;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}
.config-card-actions {
    margin-top: auto;
}
.config-btn {
    background-color: #2D6A4F !important;
    border-color: #2D6A4F !important;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-decoration: none;
}
.config-btn:hover,
.config-btn:focus {
    background-color: #1e4f3a !important;
    border-color: #1e4f3a !important;
    color: #fff !important;
    text-decoration: none;
}
.config-btn.disabled {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Placeholder quand l'offre n'a pas d'image — même ratio carré que le visuel */
.config-card .card-img-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #F5EFD4 0%, #e0d8b0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 36px;
}

/* ─── Footer ────────────────────────────────────────── */
.footer {
    background: #f0ece0;
    border-top: 1px solid #ddd4b0;
}
.footer-top {
    padding: 14px 0;
    border-bottom: 1px solid #ddd4b0;
}
.footer-top .nav-link {
    font-size: 12px;
    color: #666;
    padding: 3px 10px;
    transition: color 0.2s;
}
.footer-top .nav-link:hover {
    color: #5C0A14;
    text-decoration: underline;
}
.footer-top .nsav-link {
    font-size: 12px;
    color: #666;
    padding: 3px 10px;
}
.footer-bottom {
    padding: 14px 0;
}
.footer-logo-wrapper img {
    max-height: 50px;
    width: auto;
    margin: 0 auto;
}

/* ─── Page formulaire de demande ─────────────────────── */
.page-demande-header {
    background: #F5EFD4;
    border-left: 4px solid #5C0A14;
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 28px;
}
.page-demande-header .offer-name {
    font-weight: 700;
    font-size: 15px;
    color: #5C0A14;
    margin: 0 0 2px;
}
.page-demande-header .offer-dates {
    font-size: 12px;
    color: #767676;
    margin: 0;
}
.page-demande-header img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.form-section {
    background: #fff;
    border: 1px solid #ddd4b0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #5C0A14;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #F5EFD4;
}
.form-section label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.form-section .form-control {
    font-size: 14px;
    border-color: #ddd4b0;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-section .form-control:focus {
    border-color: #5C0A14;
    box-shadow: 0 0 0 0.2rem rgba(92, 10, 20, 0.1);
}
.form-section .form-control.is-invalid {
    border-color: #dc3545;
}
.form-control--code {
    font-size: 16px !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-color: #52A665 !important;
    border-width: 2px !important;
}
.form-control--code:focus {
    border-color: #2D6A4F !important;
    box-shadow: 0 0 0 0.2rem rgba(82, 166, 101, 0.2) !important;
}
.form-control--iban {
    font-family: 'Courier New', monospace;
    font-size: 13px !important;
}
.form-hint {
    font-size: 11px;
    color: #767676;
    font-style: italic;
    margin-top: 2px;
}
.form-legal {
    font-size: 11.5px;
    color: #767676;
    line-height: 1.5;
}
.btn-submit {
    background: #5C0A14;
    border-color: #5C0A14;
    color: #fff;
    font-weight: 600;
    padding: 10px 32px;
    font-size: 15px;
    transition: background 0.2s;
}
.btn-submit:hover, .btn-submit:focus {
    background: #7a1020;
    border-color: #7a1020;
    color: #fff;
}
.btn-submit:disabled,
.btn-submit[aria-disabled="true"] {
    background: #c4a0a5;
    border-color: #c4a0a5;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}
.form-cgu-wrapper {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fdf8f8;
    border: 1px solid #e8d0d3;
    border-radius: 6px;
}
.form-cgu-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: #333;
    margin: 0;
    font-weight: 400;
}
.form-cgu-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #5C0A14;
    cursor: pointer;
}
.form-cgu-label a {
    color: #5C0A14;
    text-decoration: underline;
}
.required-star {
    color: #5C0A14;
    margin-left: 2px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-bottom: 20px;
}
.back-link:hover { color: #5C0A14; }

/* ─── Page confirmation ─────────────────────────────── */
.confirmation-wrapper {
    padding: 60px 20px;
    text-align: center;
}
.confirmation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: #f0fdf4;
    border: 3px solid #86efac;
    border-radius: 50%;
    color: #166534;
    font-size: 32px;
    margin-bottom: 20px;
}
.confirmation-box {
    background: #F5EFD4;
    border-radius: 8px;
    padding: 20px 28px;
    display: block;
    max-width: 360px;
    text-align: left;
    margin: 20px auto 0;
    min-width: 260px;
}
.confirmation-box dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-top: 12px;
}
.confirmation-box dt:first-child { margin-top: 0; }
.confirmation-box dd {
    font-size: 14px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
}

/* ─── Alertes flash ──────────────────────────────────── */
.alert-domain {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 991px) {
    .config-card {
        width: calc((100% - 20px) / 2);
    }
}
@media (max-width: 576px) {
    .config-card {
        width: 100%;
    }
    .config-row {
        flex-direction: column;
        align-items: center;
    }
    .home-desc-wrapper .col-md-4 {
        margin-bottom: 24px;
    }
    .confirmation-box {
        min-width: 0;
        width: 100%;
    }
}
