/* =========================================================
   cmspassword.css  –  Protection page CMS + grille notices
   PrestaShop 8.1.7
   ========================================================= */

/* ----------------------------------------------------------
   1. PAGE DE SAISIE DU MOT DE PASSE
   ---------------------------------------------------------- */

.cmspassword-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem 4rem;
    min-height: 50vh;
}

.cmspassword-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .08);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 460px;
}

/* Icône cadenas */
.cmspassword-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.cmspassword-icon svg {
    width: 52px;
    height: 52px;
    color: #93c72d;
    background: #edf4fb;
    border-radius: 50%;
    padding: 12px;
    box-sizing: content-box;
}

/* Titres */
.cmspassword-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 .4rem;
}

.cmspassword-subtitle {
    font-size: .9rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

/* Alerte erreur */
.cmspassword-alert {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #c0392b;
    font-size: .875rem;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.cmspassword-alert svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Champ mot de passe */
.cmspassword-field {
    margin-bottom: 1.25rem;
}

.cmspassword-field label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.cmspassword-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cmspassword-input-wrap .form-control {
    padding: 0 2.8rem 0 10px;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    font-size: .95rem;
    height: 46px;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.cmspassword-input-wrap .form-control:focus {
    border-color: #93c72d;
    box-shadow: 0 0 0 3px rgba(42, 96, 153, .18);
    outline: none;
}

.cmspassword-input-wrap .form-control.is-invalid {
    border-color: #e74c3c;
}

/* Bouton afficher/masquer */
.cmspassword-toggle-pwd {
    position: absolute;
    right: .75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color .2s;
}

.cmspassword-toggle-pwd:hover {
    color: #93c72d;
}

.cmspassword-toggle-pwd svg {
    width: 18px;
    height: 18px;
}

/* Bouton valider */
.cmspassword-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    background: #93c72d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    padding: .75rem 1.5rem;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.cmspassword-btn:hover {
    background: #ff1717;
}

.cmspassword-btn:active {
    transform: scale(.98);
}

.cmspassword-btn svg {
    width: 18px;
    height: 18px;
}

/* ----------------------------------------------------------
   2. GRILLE 4 COLONNES – NOTICES PRODUITS
   Utilisée dans le contenu HTML de la page CMS
   ---------------------------------------------------------- */

/*
 * Dans le back-office PrestaShop (Pages CMS → Contenu),
 * enveloppez vos notices dans :
 *
 *   <div class="notices-grid">
 *     <div class="notice-item">
 *       <div class="notice-item__icon">…svg ou img…</div>
 *       <h3 class="notice-item__title">Nom du produit</h3>
 *       <p class="notice-item__desc">Description courte</p>
 *       <a class="notice-item__link" href="…" target="_blank">
 *         Télécharger la notice (PDF)
 *       </a>
 *     </div>
 *     …
 *   </div>
 */

.notices-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0 2rem;
}

.notice-item {
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: box-shadow .2s, transform .2s;
}

.notice-item:hover {
    box-shadow: 0 6px 24px rgba(42, 96, 153, .15);
    transform: translateY(-3px);
}

/* Icône / vignette */
.notice-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #edf4fb;
    border-radius: 8px;
    color: #93c72d;
}

.notice-item__icon svg,
.notice-item__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Titre notice */
.notice-item__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

/* Description */
.notice-item__desc {
    font-size: .875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.55;
    flex: 1;
}

/* Lien téléchargement */
.notice-item__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
    color: #93c72d;
    text-decoration: none;
    border: 1.5px solid #93c72d;
    border-radius: 6px;
    padding: .4rem .85rem;
    transition: background .2s, color .2s;
    align-self: flex-start;
    margin-top: auto;
}

.notice-item__link:hover {
    background: #93c72d;
    color: #ffffff;
}

/* Badge optionnel (ex: "Nouveau", "PDF", …) */
.notice-item__badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .15rem .55rem;
    border-radius: 50px;
    background: #e8f0fb;
    color: #93c72d;
    align-self: flex-start;
}

/* ----------------------------------------------------------
   3. RESPONSIVE
   ---------------------------------------------------------- */

/* Tablette paysage → 3 colonnes */
@media (max-width: 1199px) {
    .notices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablette portrait → 2 colonnes */
@media (max-width: 767px) {
    .notices-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile → 1 colonne */
@media (max-width: 479px) {
    .notices-grid {
        grid-template-columns: 1fr;
    }

    .cmspassword-card {
        padding: 1.75rem 1.25rem;
    }
}
