/**
 * CSS pour le bloc Pre-Footer Levrard
 * Fichier : assets/css/blocks/pre-footer.css
 */

/* Variables couleurs */
:root {
    --levrard-red: #E73331;
    --levrard-dark-red: #E73331;
    --levrard-white: #ffffff;
    --levrard-gray: #f5f5f5;
    --levrard-light-gray: #f8f8f8;
    --levrard-dark-gray: #333333;
    --levrard-text: #363636;
    --levrard-border: #e0e0e0;
}

/**
 * Structure principale
 */
.levrard-pre-footer-section {
    position: relative;
}

/* Espacements */

.levrard-pre-footer-section.spacing-large {
    padding: 120px 0;
}

.levrard-pre-footer-section.spacing-small {
    padding: 60px 0;
}

/* Backgrounds */
.levrard-pre-footer-section.background-white {
    border-radius: 50px;
    z-index: 1;
    position: relative;
}

.levrard-pre-footer-section.background-white:before{
    content:"";display:block;position:absolute;top:50%;left:0;right:0;bottom:-10px;background:#fff;border-radius:50px;z-index:1;
}

.levrard-pre-footer-section.background-white > *{position:relative;z-index:2}

.levrard-pre-footer-section.background-light-gray {
    background-color: var(--levrard-light-gray);
}

.levrard-pre-footer-section.background-red {
    background-color: var(--levrard-red);
    color: var(--levrard-white);
}

.pre-footer-container {
    max-width: 1600px;
    margin: 0 auto;
    transform:translateY(80px);
}
/* ---------------------------- */
@media (max-width:110em){
    .pre-footer-container{max-width:100%;width:calc(100% - 100px);margin:0 50px}
}
@media screen and (max-width: 90em) {
    .pre-footer-container{width:calc(100% - 70px);margin:0 35px}
}
@media screen and (max-width: 60em) {
    .pre-footer-container{width:calc(100% - 40px);margin:0 20px}
}
/* ---------------------------- */

.pre-footer-layout {
    display: flex;
    gap: 60px;
    margin-top:-80px;
}
/* ---------------------------- */
@media (max-width:80em){
    .pre-footer-layout{gap: 40px;}
}
@media (max-width:60em){
    .pre-footer-layout{gap: 30px;flex-direction:column-reverse;}
}
/* ---------------------------- */
.pre-footer-left {
    position: relative;
    padding: 60px; flex:1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 30px 0 30px 30px;
    background-color: var(--levrard-white);
    display:flex;
}
/* ---------------------------- */
@media (max-width:90em){
    .pre-footer-left{padding:40px}
}
@media (max-width:60em){
    .pre-footer-left{padding:30px}
}
/* ---------------------------- */
.pre-footer-left-content {
    background-color: var(--levrard-white);
    padding: 50px;
    border: 2px solid var(--levrard-red);
    /* Border radius SAUF angle haut droite */
    border-radius: 30px 0 30px 30px;
    position: relative;
}
/* Styles pour le contenu WYSIWYG */
.pre-footer-left-content h1,
.pre-footer-left-content h2,
.pre-footer-left-content h3,
.pre-footer-left-content h4,
.pre-footer-left-content h5,
.pre-footer-left-content h6 {
    color: var(--levrard-text);
    margin-bottom: 15px;
    margin-top: 0;
}

.pre-footer-left-content h3 {
    font-weight: 700;
    color: var(--levrard-red);
    margin-bottom: -8px;
}

.pre-footer-left-content p:nth-of-type(1) {
    font-family:var(--font-alternate);
}
.pre-footer-left-content p:nth-of-type(2) strong:nth-of-type(1) { font-style:italic; }
.pre-footer-left-content p {
    color: var(--levrard-text);
    line-height: 1.4;
    margin-bottom: 25px;
    font-size: 26px;
}
/* ---------------------------- */
@media (max-width:135em){
    .pre-footer-left-content p{font-size:22px}
}
@media (max-width:120em){
    .pre-footer-left-content p{font-size:20px}
}
@media (max-width:90em){
    .pre-footer-left-content p{font-size:18px}
}
@media (max-width:60em){
    .pre-footer-left-content p{font-size:16px}
}
/* ---------------------------- */

.pre-footer-left-content p:last-child {
    margin-bottom: 0;
}

.pre-footer-left-content strong {
    font-weight: 600;font-family:var(--font-alternate);
}

.pre-footer-left-content ul,
.pre-footer-left-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.pre-footer-left-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/**
 * Contenu de droite
 */
.pre-footer-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width:560px;
}
/* ---------------------------- */
@media (max-width:110em){
    .pre-footer-right{width:480px}
}
@media (max-width:90em){
    .pre-footer-right{width:420px}
}
@media (max-width:60em){
    .pre-footer-right{flex-direction:row;width:100%;max-width:100%}
    .pre-footer-right-top{display:flex;flex-direction:column;justify-content:center;}
}
@media (max-width:50em){
    .pre-footer-right{flex-direction:column;}

}
/* ---------------------------- */
/**
 * Bloc du haut (CTA principal)
 */
.pre-footer-right-top {
    background-color: var(--levrard-red);
    padding: 40px 30px;
    border-radius: 0 20px 20px  20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(233, 57, 52, 0.2);
}

.pre-footer-cta-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pre-footer-cta-centered{display:flex;justify-content:center;align-items:center;}

.pre-footer-icon {
    color: var(--levrard-white);
    font-size: 24px;
}

/**
 * Bloc du bas (Actions secondaires)
 */
.pre-footer-right-bottom {
    background-color: var(--levrard-white);
    padding: 40px 25px 50px;
    border-radius: 0 30px 30px 30px;
    position: relative;
    box-shadow: 0px 0px 20px 10px rgba(99, 21, 21, 0.05);
    flex:1;display:flex;flex-direction:column;justify-content:center;
}

.pre-footer-cta-header-urgence{display:flex;align-items:center;gap:25px;}
.pre-footer-cta-header-urgence__title{color:var(--levrard-current);line-height:1.45;text-align:left;}
.pre-footer-cta-header-urgence__title span{display:block;}
.pre-footer-cta-header-urgence__title span:last-child{font-family:var(--font-alternate);font-weight:bold;color:#fff;font-style:italic;}

.pre-footer-text {
    color: var(--levrard-text);
    margin-bottom: 35px;
    text-align: center;
}
/* ---------------------------- */
@media (max-width:110em){
    .pre-footer-text{margin-bottom:35px;}
}
@media (max-width:90em){
    .pre-footer-text{margin-bottom:25px;}
}
@media (max-width:60em){
    .pre-footer-text{margin-bottom:15px;}
}
/* ---------------------------- */

.pre-footer-text .highlight {
    color: var(--levrard-red);font-family:var(--font-alternate);font-style:italic;
    font-weight: 700;
}

.pre-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/**
 * Boutons
 */
.pre-footer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

/* Bouton principal (rouge) */
.pre-footer-button-primary {
    background-color: var(--levrard-dark-gray);
    color: var(--levrard-white);
    border: 2px solid var(--levrard-dark-gray);
}

.pre-footer-button-primary:hover {
    background-color: var(--levrard-white);
    color: var(--levrard-dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Bouton secondaire (contour) */
.pre-footer-button-secondary {
    background-color: transparent;
    color: var(--levrard-text);
    border: 2px solid var(--levrard-border);
}

.pre-footer-button-secondary:hover {
    background-color: var(--levrard-red);
    color: var(--levrard-white);
    border-color: var(--levrard-red);
    transform: translateY(-2px);
}

/**
 * Lien email
 */
.pre-footer-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--levrard-light-gray);
    color: var(--levrard-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid var(--levrard-border);
}

.pre-footer-email:hover {
    background-color: var(--levrard-red);
    color: var(--levrard-white);
    border-color: var(--levrard-red);
}

.pre-footer-email i {
    font-size: 11px;
}

/**
 * Styles pour fond rouge
 */
.levrard-pre-footer-section.background-red .pre-footer-left-content {
    background-color: var(--levrard-white);
    border-color: var(--levrard-white);
}

.levrard-pre-footer-section.background-red .pre-footer-right-bottom {
    background-color: var(--levrard-white);
}

/**
 * Preview dans l'éditeur
 */
.levrard-pre-footer-preview {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
}

.levrard-pre-footer-preview h3 {
    margin-bottom: 15px;
    color: var(--levrard-text);
}

.levrard-pre-footer-preview p {
    color: #666;
    margin-bottom: 20px;
}

.pre-footer-preview-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.preview-left {
    background: white;
    padding: 20px;
    border-radius: 10px 0 10px 10px;
    border: 2px solid var(--levrard-red);
    text-align: left;
}

.preview-left h4 {
    color: var(--levrard-text);
    margin-bottom: 10px;
}

.preview-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-button {
    background: var(--levrard-red);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

/**
 * Responsive Design
 */
@media screen and (max-width: 992px) {
    .pre-footer-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pre-footer-left-content {
        padding: 30px;
    }
}

@media screen and (max-width: 768px) {

    .levrard-pre-footer-section.spacing-large {
        padding: 80px 0;
    }

    .levrard-pre-footer-section.spacing-small {
        padding: 40px 0;
    }

    .pre-footer-layout {
        gap: 30px;
    }

    .pre-footer-left-content {
        padding: 25px;
        border-radius: 15px 0 15px 15px;
    }

    .pre-footer-right-top {
        padding: 25px;
    }

    .pre-footer-right-bottom {
        padding: 20px;
    }

    .pre-footer-cta-header {
        flex-direction: column;
        gap: 8px;
    }

    .pre-footer-icon {
        font-size: 20px;
    }
}

@media screen and (max-width: 576px) {
    .pre-footer-left-content {
        padding: 20px;
        border-radius: 12px 0 12px 12px;
    }

    .pre-footer-right-top {
        padding: 20px;
    }

    .pre-footer-right-bottom {
        padding: 18px;
    }

    .pre-footer-button {
        font-size: 13px;
        padding: 10px 20px;
    }
}

/**
 * STYLES SPÉCIFIQUES À L'ÉDITEUR GUTENBERG
 */
.block-editor-block-list__block .levrard-pre-footer-section {
    border: 2px dashed rgba(233, 57, 52, 0.3);
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.block-editor-block-list__block .pre-footer-left-content h3 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--levrard-text) !important;
}
