/* Formulaire de demande de Carte du Professionnel du Cinéma.
   Présentation institutionnelle, volontairement sobre et sans effets décoratifs. */

.cpc-form{
    max-width:960px;
    color:#333;
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    line-height:1.55;
}

.cpc-form > h1{
    margin:0 0 22px;
    padding:0 0 14px;
    color:#242424;
    border-bottom:3px solid #8f2119;
    font-size:24px;
    font-weight:normal;
}

.cpc-form-aside{ display:none; }
.cpc-rub-block{ float:none; }

.cpc-intro{
    margin:0 0 22px;
    padding:15px 17px;
    background:#f7f7f5;
    border:1px solid #d6d6d2;
}
.cpc-intro p{ margin:0; }
.cpc-intro .cpc-required-note{
    margin-top:8px;
    color:#666;
    font-size:12.5px;
}
.cpc-required-note span{ color:#8f2119; font-weight:bold; }

/* Sommaire des étapes */
.cpc-toc{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:0;
    margin:0 0 24px;
    padding:13px 16px;
    background:#f5f5f3;
    border:1px solid #d9d9d5;
    border-left:4px solid #8f2119;
}
.cpc-toc span{
    display:inline-block;
    padding:2px 5px;
    color:#343434;
    font-size:12.5px;
    font-weight:bold;
}
.cpc-toc .cpc-toc-arrow{
    padding:0 5px;
    color:#888;
    font-weight:normal;
}

/* Indicateur d'avancement */
.cpc-progress-spacer{ display:none; height:44px; }
.cpc-progress-wrap{
    margin:0 0 24px;
    padding:8px 0;
}
.cpc-progress-wrap.is-fixed{
    position:fixed;
    top:0;
    right:0;
    left:0;
    z-index:50;
    margin:0;
    padding:10px 20px;
    background:#fff;
    border-bottom:1px solid #cfcfcf;
}
.cpc-progress-inner{
    display:flex;
    align-items:center;
    gap:12px;
    max-width:960px;
    margin:0 auto;
}
.cpc-progress-bar{
    flex:1 1 auto;
    height:4px;
    overflow:hidden;
    background:#d9d9d9;
}
.cpc-progress-fill{
    width:0;
    height:100%;
    background:#8f2119;
    transition:width .2s ease;
}
.cpc-progress-label{
    min-width:82px;
    color:#555;
    font-size:12px;
    font-weight:bold;
    text-align:right;
}

/* Sections */
.cpc-card{
    margin:0 0 24px;
    padding:24px 26px 8px;
    background:#fff;
    border:1px solid #d7d7d7;
}
.cpc-form h2{
    margin:0 -26px 22px;
    padding:0 26px 12px;
    color:#2b2b2b;
    border-bottom:1px solid #d7d7d7;
    font-size:16px;
    font-weight:bold;
    text-transform:none;
}
.cpc-form h2::before{
    display:none;
}
.cpc-section-number{
    display:inline-block;
    min-width:25px;
    margin-right:9px;
    padding:3px 0;
    background:#8f2119;
    color:#fff;
    font-size:12px;
    line-height:19px;
    text-align:center;
    vertical-align:1px;
}
.cpc-form h2 small{
    color:#777;
    font-size:12px;
    font-weight:normal;
}
.cpc-section-help{
    margin:-7px 0 20px;
    padding:0 0 10px;
    color:#666;
    border-bottom:1px dotted #c5c5c5;
    font-size:12.5px;
}
.cpc-form h3{
    margin:0 0 15px;
    padding:0 0 7px;
    color:#555;
    border-bottom:1px dotted #bdbdbd;
    font-size:13px;
    font-weight:bold;
    text-transform:none;
}
.cpc-form .cpc-subgroup{ margin:0 0 26px; }
.cpc-form .cpc-subgroup:last-child{ margin-bottom:8px; }

/* Champs */
.cpc-form fieldset{
    margin:0 0 18px;
    padding:0;
    border:0;
    text-align:left;
}
.cpc-form label{
    display:block;
    margin:0 0 6px;
    color:#292929;
    font-size:13px;
    font-weight:bold;
}
.cpc-form fieldset > p{ margin:0; color:#222; font-size:13.5px; }
.cpc-field-help{
    display:block;
    margin-top:5px;
    color:#707070;
    font-size:12px;
}

.cpc-form fieldset:has(:required) > label::after,
.cpc-form fieldset:has([data-was-required]) > label::after{
    content:" *";
    color:#8f2119;
}

.cpc-form input[type="text"],
.cpc-form input[type="email"],
.cpc-form input[type="tel"],
.cpc-form input[type="date"],
.cpc-form input[type="number"],
.cpc-form select,
.cpc-form .cpc-combobox-toggle,
.cpc-form textarea{
    width:100%;
    max-width:420px;
    padding:9px 10px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #8e8e8e;
    border-radius:0;
    color:#222;
    font-family:Arial, Helvetica, sans-serif;
    font-size:13.5px;
}
.cpc-form textarea{
    height:90px;
    max-width:100%;
    resize:vertical;
}

/* Dossier de pieces justificatives : bloc administratif clairement identifiable. */
.cpc-form .cpc-drive-field{
    margin:24px 0;
    padding:16px 18px;
    background:#f7f7f7;
    border:1px solid #d2d2d2;
    border-left:4px solid #8f2119;
}
.cpc-form .cpc-drive-field label{
    margin-bottom:9px;
    font-size:14px;
}
.cpc-form .cpc-drive-field input[type="url"]{
    display:block;
    width:100%;
    max-width:100%;
    min-height:42px;
    padding:10px 12px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #777;
    border-radius:0;
    color:#222;
    font-family:Arial, Helvetica, sans-serif;
    font-size:13.5px;
}
.cpc-form .cpc-drive-field .cpc-field-help{
    margin-top:8px;
    max-width:900px;
    line-height:1.5;
}
.cpc-form input:hover,
.cpc-form select:hover,
.cpc-form .cpc-combobox-toggle:hover,
.cpc-form textarea:hover{ border-color:#555; }
.cpc-form input:focus,
.cpc-form select:focus,
.cpc-form .cpc-combobox-toggle:focus,
.cpc-form textarea:focus{
    outline:2px solid #c9918d;
    outline-offset:1px;
    border-color:#8f2119;
    box-shadow:none;
}

/* Les icônes décoratives sont masquées : les libellés portent l'information. */
.cpc-icon-field,
.cpc-icon-field.cpc-icon-top{ position:relative; max-width:100%; }
.cpc-icon-field .cpc-field-icon{ display:none; }
.cpc-icon-field input,
.cpc-icon-field.cpc-icon-top textarea{
    max-width:420px !important;
    padding-left:10px !important;
}
.cpc-icon-field.cpc-icon-top textarea{ max-width:100% !important; }

.cpc-form select,
.cpc-form .cpc-combobox-toggle{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    padding-right:32px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='square'%3E%3Cpolyline points='7 9 12 14 17 9'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 10px center;
    background-size:12px;
    cursor:pointer;
}
.cpc-form select:disabled,
.cpc-form .cpc-combobox-toggle:disabled{
    background-color:#ededed;
    color:#858585;
    cursor:not-allowed;
}

.cpc-form .champ-row{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
}
.cpc-form .champ-row fieldset{ flex:1 1 240px; }

/* Sélecteurs avec recherche */
.cpc-combobox{ position:relative; max-width:420px; }
.cpc-combobox-toggle{
    display:block;
    overflow:hidden;
    text-align:left;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.cpc-combobox-toggle-label.is-placeholder{ color:#777; }
.cpc-combobox-panel{
    position:absolute;
    top:calc(100% + 2px);
    right:0;
    left:0;
    z-index:40;
    padding:7px;
    background:#fff;
    border:1px solid #777;
    box-shadow:0 5px 14px rgba(0,0,0,.16);
}
.cpc-combobox-search{
    display:block;
    width:100%;
    margin:0 0 6px;
    padding:8px 9px;
    box-sizing:border-box;
    border:1px solid #999;
    border-radius:0;
    color:#222;
    font-family:Arial, Helvetica, sans-serif;
    font-size:13px;
}
.cpc-combobox-search:focus{
    outline:2px solid #c9918d;
    outline-offset:1px;
    border-color:#8f2119;
}
.cpc-combobox-list{
    max-height:240px;
    margin:0;
    padding:0;
    overflow-y:auto;
    list-style:none;
}
.cpc-combobox-option{
    padding:8px 9px;
    color:#292929;
    font-size:13px;
    cursor:pointer;
}
.cpc-combobox-option.is-empty{ display:none; }
.cpc-combobox-option:hover,
.cpc-combobox-option.is-active{ background:#efefed; }
.cpc-combobox-option.is-selected{
    background:#8f2119;
    color:#fff;
    font-weight:bold;
}
.cpc-combobox-option.is-selected:hover,
.cpc-combobox-option.is-selected.is-active{ background:#741a14; }

/* Blocs répétables */
.cpc-form .cpc-repeatable-block{
    position:relative;
    margin:0 0 18px;
    padding:20px 20px 4px;
    background:#f8f8f7;
    border:1px solid #bdbdbd;
    border-left:3px solid #777;
}
.cpc-form #participations-container{ counter-reset:participation; }
.cpc-form #filmographie-container{ counter-reset:filmographie; }
.cpc-form #participations-container .cpc-repeatable-block{ counter-increment:participation; }
.cpc-form #filmographie-container .cpc-repeatable-block{ counter-increment:filmographie; }
.cpc-form #participations-container .cpc-repeatable-block::before,
.cpc-form #filmographie-container .cpc-repeatable-block::before{
    display:block;
    margin:0 38px 16px 0;
    padding:0 0 7px;
    color:#555;
    border-bottom:1px solid #d2d2d2;
    font-size:12.5px;
    font-weight:bold;
}
.cpc-form #participations-container .cpc-repeatable-block::before{
    content:"Participation " counter(participation);
}
.cpc-form #filmographie-container .cpc-repeatable-block::before{
    content:"Film " counter(filmographie);
}
.cpc-form .cpc-repeatable-block .champ-row fieldset{ flex:1 1 190px; }
.cpc-form .cpc-remove-row{
    position:absolute;
    top:10px;
    right:10px;
    width:27px;
    height:27px;
    padding:0;
    background:#fff;
    border:1px solid #8f2119;
    border-radius:0;
    color:#8f2119;
    font-size:18px;
    line-height:23px;
    cursor:pointer;
}
.cpc-form .cpc-remove-row:hover{ background:#8f2119; color:#fff; }
.cpc-form .cpc-add-row{
    display:inline-block;
    margin:0 0 24px;
    padding:8px 14px;
    background:#fff;
    border:1px solid #8f2119;
    border-radius:0;
    color:#8f2119;
    font-size:13px;
    font-weight:bold;
    cursor:pointer;
}
.cpc-form .cpc-add-row::before{ content:"+ "; }
.cpc-form .cpc-add-row:hover{ background:#f5ecea; }

/* Déclaration et actions */
.cpc-form .declaration-row{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:14px;
    background:#f5f5f3;
    border:1px solid #d0d0cd;
}
.cpc-form .declaration-row input[type="checkbox"]{
    flex:0 0 auto;
    width:17px;
    height:17px;
    margin-top:2px;
    accent-color:#8f2119;
    cursor:pointer;
}
.cpc-form .declaration-row label{
    display:inline;
    margin:0;
    color:#333;
    font-weight:normal;
}
.cpc-form .cpc-radio-group{
    display:flex;
    align-items:center;
    gap:20px;
    min-height:38px;
}
.cpc-form .cpc-radio-label{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:0;
    color:#333;
    font-weight:normal;
    cursor:pointer;
}
.cpc-form .cpc-radio-label input[type="radio"]{
    width:16px;
    height:16px;
    accent-color:#8f2119;
}
.cpc-form .submit,
.cpc-cta{
    display:inline-block;
    padding:11px 24px;
    background:#8f2119;
    border:1px solid #8f2119;
    border-radius:0;
    color:#fff !important;
    font-size:14px;
    font-weight:bold;
    text-decoration:none;
    cursor:pointer;
    box-shadow:none;
}
.cpc-form .submit:hover,
.cpc-cta:hover{ background:#701813; border-color:#701813; }
.cpc-form .submit:disabled{
    background:#d1d1d1;
    border-color:#bdbdbd;
    color:#747474 !important;
    cursor:not-allowed;
}

/* Messages */
.cpc-form .msg_err,
.cpc-form .msg_ok,
.cpc-success-banner{
    margin:0 0 22px;
    padding:14px 16px;
    border-radius:0;
    font-size:13.5px;
}
.cpc-form .msg_err{
    color:#6f1712;
    background:#fbf0ef;
    border:1px solid #d9aaa6;
    border-left:4px solid #8f2119;
}
.cpc-form .msg_err strong{ display:block; margin-bottom:6px; }
.cpc-form .msg_err ul{ margin:0; padding-left:20px; }
.cpc-form .msg_ok,
.cpc-success-banner{
    color:#28552b;
    background:#f0f7f0;
    border:1px solid #a9c7aa;
    border-left:4px solid #477b49;
}
.cpc-success-banner{
    display:flex;
    align-items:center;
    gap:14px;
}
.cpc-success-banner strong{ color:#28552b; }
.cpc-success-banner p{ margin:3px 0 0; color:#426c44; }
.cpc-success-icon{
    flex:0 0 auto;
    color:#477b49;
    font-size:21px;
}
.cpc-form .obligatoire{ display:none; }

@media (max-width:599px){
    .cpc-form > h1{ font-size:20px; }
    .cpc-toc{ display:block; }
    .cpc-toc span{ display:block; padding:3px 0; }
    .cpc-toc .cpc-toc-arrow{ display:none; }
    .cpc-card{ padding:20px 16px 4px; }
    .cpc-form h2{ margin:0 -16px 18px; padding:0 16px 11px; }
    .cpc-form .cpc-drive-field{ padding:14px 12px; }
    .cpc-form .champ-row{ gap:0; }
    .cpc-form input,
    .cpc-form select,
    .cpc-form textarea,
    .cpc-combobox{ max-width:100%; }
    .cpc-form .submit{ width:100%; }
}

@media (min-width:1024px){
    .cpc-page-wrapper{ width:1000px; }
    .cpc-rub-block{ width:100%; }
    .cpc-form{ max-width:none; }
}
