/*
 * Eclair — Page Famille Widget CSS
 * Style éditorial premium : typographie forte, grille propre, hero cinématique.
 * Variables : --efp-color (couleur famille), --efp-text (texte sur couleur).
 */

/* ── Reset / base ─────────────────────────────────────── */
.efp-wrap *,
.efp-wrap *::before,
.efp-wrap *::after { box-sizing: border-box; }

.efp-wrap {
    --efp-color: #2D5A3D;
    --efp-text: #ffffff;
    --efp-font-display: 'Barlow Condensed', 'DM Sans', 'Arial Narrow', sans-serif;
    --efp-font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
    --efp-radius: 4px;
    --efp-gap: 2rem;
    --efp-container: 1200px;
    --efp-container-narrow: 760px;
    font-family: var(--efp-font-body);
    color: #1a1a1a;
    line-height: 1.6;
}

/* ── Container ─────────────────────────────────────────── */
.efp-container {
    max-width: var(--efp-container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 3rem);
}
.efp-container--narrow {
    max-width: var(--efp-container-narrow);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* ── Section commune ───────────────────────────────────── */
.efp-section {
    padding: clamp(3rem, 8vw, 6rem) 0;
    background: #fff;
}
.efp-section--alt {
    background: #F8F7F5;
}
.efp-section-head {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.efp-section-head--light .efp-section-title {
    color: #fff;
}
.efp-section-head--light .efp-section-rule {
    background: rgba(255,255,255,.25);
}
.efp-section-title {
    font-family: var(--efp-font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 0;
    text-transform: uppercase;
    flex-shrink: 0;
}
.efp-section-rule {
    flex: 1;
    height: 1px;
    background: #e0ddd8;
}

/* ── HERO ──────────────────────────────────────────────── */
.efp-hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #111;
}

/* Image de fond */
.efp-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 8s ease;
    will-change: transform;
}
.efp-hero:hover .efp-hero-bg {
    transform: scale(1.0);
}

/* Overlay couleur famille */
.efp-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--efp-color);
    opacity: .55;
    mix-blend-mode: multiply;
    transition: opacity .4s;
}

/* Bande décorative gauche */
.efp-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--efp-color);
    filter: brightness(1.8);
    z-index: 2;
}

.efp-hero-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--efp-container);
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-end;
    gap: 2rem;
}

.efp-hero-content {
    max-width: 640px;
}

/* Badge */
.efp-hero-badge {
    display: inline-block;
    font-family: var(--efp-font-display);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--efp-color);
    filter: brightness(2) saturate(.6);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    padding: .3em .9em;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

/* Titre */
.efp-hero-title {
    font-family: var(--efp-font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    font-style: italic;
    line-height: .95;
    letter-spacing: -.03em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 1rem;
}

/* Accroche */
.efp-hero-accroche {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    color: rgba(255,255,255,.9);
    margin: 0 0 .75rem;
    letter-spacing: .01em;
}

/* Description */
.efp-hero-desc {
    font-size: .9375rem;
    color: rgba(255,255,255,.72);
    margin: 0 0 2rem;
    max-width: 520px;
    line-height: 1.65;
}

/* CTA */
.efp-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    font-family: var(--efp-font-display);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,.4);
    padding: .75em 1.5em;
    border-radius: 2px;
    transition: background .2s, border-color .2s, gap .2s;
}
.efp-hero-cta:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.7);
    gap: .9em;
}

/* Scroll hint */
.efp-hero-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: rgba(255,255,255,.5);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding-bottom: .5rem;
}
.efp-hero-scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.4));
    animation: efp-scroll-pulse 2s ease-in-out infinite;
}
@keyframes efp-scroll-pulse {
    0%, 100% { opacity: .4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.15); }
}

/* ── ATOUTS ────────────────────────────────────────────── */
.efp-atouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.efp-atout {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid #e8e5e0;
    border-radius: var(--efp-radius);
    border-top: 3px solid var(--efp-color);
    transition: box-shadow .2s, transform .2s;
}
.efp-section--alt .efp-atout {
    background: #fff;
}
.efp-atout:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.efp-atout-icon {
    font-size: 2rem;
    margin-bottom: .75rem;
    line-height: 1;
}
.efp-atout-titre {
    font-family: var(--efp-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: uppercase;
    margin: 0 0 .5rem;
    color: #111;
}
.efp-atout-desc {
    font-size: .875rem;
    color: #5a5752;
    margin: 0;
    line-height: 1.55;
}

/* ── MAILLES ───────────────────────────────────────────── */
.efp-mailles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.efp-maille-card {
    background: #fff;
    border: 1px solid #e8e5e0;
    border-radius: var(--efp-radius);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.efp-maille-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.efp-maille-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #F8F7F5;
}
.efp-maille-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.efp-maille-card:hover .efp-maille-img {
    transform: scale(1.05);
}

.efp-maille-placeholder {
    aspect-ratio: 4/3;
    background: var(--efp-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.efp-maille-mm {
    font-family: var(--efp-font-display);
    font-size: 2.5rem;
    font-weight: 900;
    font-style: italic;
    color: var(--efp-text);
    line-height: 1;
    display: flex;
    align-items: flex-end;
    gap: .1em;
}
.efp-maille-mm small {
    font-size: .45em;
    opacity: .7;
    margin-bottom: .15em;
}

.efp-maille-body {
    padding: .875rem 1rem;
    flex: 1;
}
.efp-maille-id {
    font-family: var(--efp-font-display);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--efp-color);
    margin-bottom: .2rem;
}
.efp-maille-label {
    font-size: .9rem;
    font-weight: 600;
    color: #111;
    margin-bottom: .25rem;
}
.efp-maille-usage {
    font-size: .775rem;
    color: #6b6866;
    line-height: 1.4;
    margin-bottom: .2rem;
}
.efp-maille-comp {
    font-size: .7rem;
    color: #9a9795;
    font-family: 'Courier New', monospace;
}

/* ── USAGES ────────────────────────────────────────────── */
.efp-usages-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .75rem 2rem;
}

.efp-usage-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #2a2825;
    padding: .75rem 0;
    border-bottom: 1px solid #e8e5e0;
}
.efp-usage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--efp-color);
    flex-shrink: 0;
}

/* ── FORMULAIRE SIMPLE ─────────────────────────────────── */
.efp-section--form {
    background: #0F0F0F;
    color: #fff;
}
.efp-form-intro {
    color: rgba(255,255,255,.6);
    font-size: .9375rem;
    margin: 0 0 2rem;
    line-height: 1.65;
}

.efp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.efp-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.efp-field--full {
    grid-column: 1 / -1;
}
.efp-field label {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
}
.efp-required { color: var(--efp-color); filter: brightness(1.8); }

.efp-field input,
.efp-field textarea,
.efp-field select {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--efp-radius);
    color: #fff;
    font-family: var(--efp-font-body);
    font-size: .9375rem;
    padding: .7rem .9rem;
    transition: border-color .2s, background .2s;
    outline: none;
    width: 100%;
}
.efp-field input:focus,
.efp-field textarea:focus {
    border-color: var(--efp-color);
    background: rgba(255,255,255,.1);
}
.efp-field input::placeholder,
.efp-field textarea::placeholder {
    color: rgba(255,255,255,.3);
}
.efp-field textarea {
    resize: vertical;
    min-height: 110px;
}

/* Lignes de commande */
.efp-form-line-items {
    margin-bottom: 1.5rem;
}
.efp-form-line-label {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin: 0 0 .75rem;
}
.efp-line-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: .5rem;
    margin-bottom: .5rem;
    align-items: center;
}
.efp-line-item input {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--efp-radius);
    color: #fff;
    font-size: .875rem;
    padding: .6rem .8rem;
    outline: none;
    transition: border-color .2s;
    width: 100%;
}
.efp-line-item input:focus { border-color: var(--efp-color); }
.efp-line-item input::placeholder { color: rgba(255,255,255,.3); }

.efp-line-remove {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.4);
    border-radius: var(--efp-radius);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color .2s, border-color .2s;
    flex-shrink: 0;
}
.efp-line-remove:hover { color: #ff6b6b; border-color: #ff6b6b; }

.efp-line-add {
    background: none;
    border: 1px dashed rgba(255,255,255,.2);
    color: rgba(255,255,255,.5);
    border-radius: var(--efp-radius);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .05em;
    padding: .5rem 1rem;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.efp-line-add:hover { color: #fff; border-color: rgba(255,255,255,.4); }

/* Actions */
.efp-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.efp-form-status {
    font-size: .875rem;
    color: rgba(255,255,255,.6);
    min-height: 1.4em;
}
.efp-form-status.is-error { color: #ff8080; }
.efp-form-status.is-success { color: #80ff9f; }

.efp-submit {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: var(--efp-color);
    color: var(--efp-text);
    border: none;
    border-radius: var(--efp-radius);
    font-family: var(--efp-font-display);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .85em 2em;
    cursor: pointer;
    transition: filter .2s, transform .15s;
    position: relative;
    overflow: hidden;
}
.efp-submit:hover { filter: brightness(1.12); transform: translateY(-1px); }
.efp-submit:active { transform: translateY(0); }
.efp-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.efp-submit-loader {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: efp-spin .7s linear infinite;
}
.efp-submit.is-loading .efp-submit-loader { display: block; }
.efp-submit.is-loading .efp-submit-label { opacity: .7; }
@keyframes efp-spin { to { transform: rotate(360deg); } }

.efp-form-success {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(100,220,130,.12);
    border: 1px solid rgba(100,220,130,.3);
    border-radius: var(--efp-radius);
    color: #80ffaa;
    font-size: .9375rem;
    font-weight: 500;
}

/* ── FORMULAIRE GUIDÉ ──────────────────────────────────── */
.efp-guided-wrap {
    margin-top: 1.5rem;
}
/* Surcharge légère du configurateur dans contexte form sombre */
.efp-section--form .eclair-wrap {
    --ec-primary: var(--efp-color);
    background: transparent;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .efp-hero-inner {
        grid-template-columns: 1fr;
    }
    .efp-hero-scroll-hint { display: none; }
    .efp-hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }
    .efp-form-grid { grid-template-columns: 1fr; }
    .efp-line-item { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .efp-line-item input:nth-child(3) { grid-column: 1; }
    .efp-line-remove { grid-column: 2; grid-row: 2; }
    .efp-form-actions { flex-direction: column; align-items: stretch; }
    .efp-submit { justify-content: center; }
    .efp-atouts-grid { grid-template-columns: 1fr 1fr; }
    .efp-mailles-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 480px) {
    .efp-atouts-grid { grid-template-columns: 1fr; }
    .efp-usages-list { grid-template-columns: 1fr; }
    .efp-line-item { grid-template-columns: 1fr auto; }
    .efp-line-item input:nth-child(2),
    .efp-line-item input:nth-child(3) { grid-column: 1; }
}
